Posts: 57
chzuck
Joined: 01 Apr 2014
#1
I am trying to get a battery monitor working on my T22 laptop. I haved tried several ideas posted on here and none have worked. Under System Information, when I select battery, it says No battery found on this system.
When I check via acpi -b I get:

Code: Select all

$ acpi -b
Battery 0: Discharging, 54%, 00:52:07 remaining
So, it does recognize there is a battery, I just cannot get it to display on the screen. It is a needed item on a laptop.
Last edited by chzuck on 19 Apr 2014, 15:59, edited 1 time in total.
Posts: 630
Eino
Joined: 12 Oct 2012
#2
Try this, and add it to your conky
Open the terminal and type:

Code: Select all

$ ls /proc/acpi/battery
There can be various kinds of output:
CMB0
BAT1
BAT0
...etc

If it is BAT0
add the following to your conky below the TEXT line

Code: Select all

${battery BAT0}
${battery_bar 7,90 BAT0}
${battery_percent BAT0}
You can put the percentage and the bar together on the same line by doing this.

Code: Select all

${battery_percent BAT0}${battery_bar 7,90 BAT0}
Posts: 57
chzuck
Joined: 01 Apr 2014
#3

Code: Select all

$ ls /proc/acpi/battery
ls: cannot access /proc/acpi/battery: No such file or directory
Here is what I got. I went ahead and added your code anyway, but still did not get any battery info.
Posts: 850
fatmac
Joined: 26 Jul 2012
#4
Try changing BAT0 to BAT1, & see if that helps.
Posts: 57
chzuck
Joined: 01 Apr 2014
#5
Did not change anything.

Code: Select all

$ acpi -b
Above is the only way I can find info on the battery.
Posts: 57
chzuck
Joined: 01 Apr 2014
#6
Another good ending. I went to the antiX-FAQ page and read some of the info under Conky. I followed their example of code for a battery monitor. Some of my unsuccessful attempts before may have been my fault. When I made a code change, I would restart antiX to hopefully reflect changes in Conky. In the write up it was mentioned to toggle Conky from the desktop. I added the code, toggled Conky and now I have a battery monitor. Still learning! Little successes are good!
Posts: 850
fatmac
Joined: 26 Jul 2012
#7
You'll soon be up with the rest of us........
Posts: 4,164
rokytnji
Joined: 20 Feb 2009
#8
fatmac wrote:You'll soon be up with the rest of us........
batti-gtk-solved-t4662.html

__{{emoticon}}__
Posts: 57
chzuck
Joined: 01 Apr 2014
#9
fatmac,
I think that will be quite some time, if ever!
Posts: 57
chzuck
Joined: 01 Apr 2014
#10
Thought I had it, but each time I reboot I have to turn conky off then back on for the monitor to show. It is probably something easy, but I don't know what to do to make it appear when antiX boots up.
Posts: 667
jdmeaux1952
Joined: 01 Nov 2013
#11
chzuck wrote:Thought I had it, but each time I reboot I have to turn conky off then back on for the monitor to show. It is probably something easy, but I don't know what to do to make it appear when antiX boots up.
I had the same problem before. It appears to be linked to which kernel you use with with desktop manager theme. I'll have to see how my conky was setup to work. (I'm on a different computer.)
Posts: 1,062
Dave
Joined: 20 Jan 2010
#12
chzuck wrote:Thought I had it, but each time I reboot I have to turn conky off then back on for the monitor to show. It is probably something easy, but I don't know what to do to make it appear when antiX boots up.
This is probably because of the default wm being icewm and the default conky ~/.conkyrc. If you take the battery code out of the ~ / . Conkyrc and put it in ~/.conky/icewm-conkyrc or whatever the exact name is, then it should work when you reboot. I cannot recall the reason why there are two conkyrcs, but it seems to me that this is more than likely the cause of confusion.
Posts: 57
chzuck
Joined: 01 Apr 2014
#13
I could not find the second conky file.
Strike the above. I kept looking and found it. I have it both places now and it appears to work when I reboot. I also changed to a 12 hour time format.
Posts: 137
duncan_mk
Joined: 19 Sep 2012
#14
I had this probllem back in 2012:

post26689.html#p26689

but couldn't find any help.

Are you using a Dell? There do seem problems which are specifically connected with Dell machines - see:

post26228.html#p26228

Thanks for your post. I will see if I can (now) get my battery to show under conky!

dmk
Posts: 57
chzuck
Joined: 01 Apr 2014
#15
Not using a Dell. This is on an IBM T22 ThinkPad.