LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-19-2014, 06:38 PM   #1
zetrotrack000
Member
 
Registered: Dec 2011
Posts: 223

Rep: Reputation: Disabled
Create sound alerts for battery charging


Hi
I want to create 2 alerts which can produce a DING like sound (like when transmission client produces when torrent download completes) for me. One when battery charging reached 20% and other when battery charging reached 80%. How can I do this?
Regards
 
Old 07-19-2014, 08:28 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mageia, and whatever VMs I happen to be playing with
Posts: 12,125
Blog Entries: 14

Rep: Reputation: 3065Reputation: 3065Reputation: 3065Reputation: 3065Reputation: 3065Reputation: 3065Reputation: 3065Reputation: 3065Reputation: 3065Reputation: 3065Reputation: 3065
I've never done it, but this article says that you can do it with the apm command:

http://linux.about.com/library/cmd/blcmdl8_apmd.htm
 
Old 07-20-2014, 10:57 AM   #3
zetrotrack000
Member
 
Registered: Dec 2011
Posts: 223

Original Poster
Rep: Reputation: Disabled
After installing apm in my linuxmint, it says that "No APM support in kernel"
 
Old 07-20-2014, 12:54 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 15,702

Rep: Reputation: 1749Reputation: 1749Reputation: 1749Reputation: 1749Reputation: 1749Reputation: 1749Reputation: 1749Reputation: 1749Reputation: 1749Reputation: 1749Reputation: 1749
Unless you have an older laptop you would want to use acpi vs apm.

You can view the battery status by viewing the contents of:
/proc/acpi/battery/BAT0/
 
Old 07-20-2014, 02:44 PM   #5
zetrotrack000
Member
 
Registered: Dec 2011
Posts: 223

Original Poster
Rep: Reputation: Disabled
I am using HP G6-2298SE laptop
There is no directory named battery:
ls /proc/acpi/ shows:button and wakeup
 
Old 07-20-2014, 03:32 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 15,702

Rep: Reputation: 1749Reputation: 1749Reputation: 1749Reputation: 1749Reputation: 1749Reputation: 1749Reputation: 1749Reputation: 1749Reputation: 1749Reputation: 1749Reputation: 1749
Install acpi and or upower. This will give you the battery status and a script can parse the output and sound the bell.


http://www.cyberciti.biz/faq/howto-c...aptop-battery/
 
Old 07-20-2014, 04:06 PM   #7
zetrotrack000
Member
 
Registered: Dec 2011
Posts: 223

Original Poster
Rep: Reputation: Disabled
Quote:
This will give you the battery status and a script can parse the output and sound the bell
Yes, and that is the script I am looking for
and have no idea that how it can be done specially at 20% and 80% battery charging

Last edited by zetrotrack000; 07-20-2014 at 04:07 PM.
 
Old 07-20-2014, 08:00 PM   #8
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mageia, and whatever VMs I happen to be playing with
Posts: 12,125
Blog Entries: 14

Rep: Reputation: 3065Reputation: 3065Reputation: 3065Reputation: 3065Reputation: 3065Reputation: 3065Reputation: 3065Reputation: 3065Reputation: 3065Reputation: 3065Reputation: 3065
MichaelK, nice catch, thanks. I haven't dug deep into battery power management, as my batteries seem to last per specification; it hasn't itched, so I haven't scratched (the surface of) it.

GKrellM has the capability for setting battery alerts, but they seem to be based on "time remaining," rather than percentages. According to this page, you can also set up alerts on Conky and have them warn you in various ways with the proper scripts.

I have used the battery meter function of GKrellM, but not set up alerts.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Laptop battery not charging rstuff Linux - Newbie 19 07-14-2014 02:46 PM
SLA battery charging formula Fixit7 General 5 05-14-2014 10:02 PM
[SOLVED] Battery Charging business_kid Linux - Laptop and Netbook 3 10-30-2012 04:41 AM
Battery Charging Problem Tosh12 Linux - Newbie 5 09-08-2012 03:37 AM
Battery not charging... tenfoot Linux - Laptop and Netbook 5 02-04-2012 03:15 PM


All times are GMT -5. The time now is 03:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration