Vattery+IBAM
Vattery+IBAM
I've modified Vattery, a lightweight battery meter for the system tray and modified it to use IBAM as the backend. You can read about IBAM's coolness here: http://ibam.sourceforge.net/
Vattery also will warn you when your battery is getting low so you know you need to save your data. I changed it to use Xdialog instead of xmessage. You can change it to have it run any script you like when the battery gets low.
I've only tested this on 4.3.1 so there's some chance Vattery won't work with other versions or it may have dependencies.
Edit: updated to not need /proc/acpi/battery/BAT0
Edit: 1/19/10 updated to use the charging color for fully charged battery
Edit: 1/20/10 Added trayclock, an analog clock for the systray by the same developer.
Edit 1/26/10 Cosmetic updates to Vattery, and added traytemp for monitoring your Cpu temperature.
Edit:4/29 Apparently I unintentionally removed ibam from the Vattery pet last time I uploaded it, so I've attached the ibam pet here. Sorry about that.
Vattery also will warn you when your battery is getting low so you know you need to save your data. I changed it to use Xdialog instead of xmessage. You can change it to have it run any script you like when the battery gets low.
I've only tested this on 4.3.1 so there's some chance Vattery won't work with other versions or it may have dependencies.
Edit: updated to not need /proc/acpi/battery/BAT0
Edit: 1/19/10 updated to use the charging color for fully charged battery
Edit: 1/20/10 Added trayclock, an analog clock for the systray by the same developer.
Edit 1/26/10 Cosmetic updates to Vattery, and added traytemp for monitoring your Cpu temperature.
Edit:4/29 Apparently I unintentionally removed ibam from the Vattery pet last time I uploaded it, so I've attached the ibam pet here. Sorry about that.
- Attachments
-
- ibam-0.5.2.pet
- (19.14 KiB) Downloaded 1655 times
-
- traytemp-0.7.pet
- (56.08 KiB) Downloaded 1728 times
-
- vattery-ibam-0.7.pet
- (56.73 KiB) Downloaded 1919 times
-
- systrayApplets.jpg
- (2.38 KiB) Downloaded 10267 times
-
- trayclock-0.33.pet
- (18.4 KiB) Downloaded 1460 times
Last edited by jemimah on Thu 29 Apr 2010, 13:41, edited 9 times in total.
No tickee, no workee, at least on my Toshiba Portege R100:
It doesn't create the config file, which I can certainly do if I know the format, and the second error may be resolved with proper configuration, as my machine has two batteries, BAT1 and BAT2.
However the 'state' files for the batteries are empty ...
-Shel
EDIT: Also, it doesn't uninstall cleanly. I installed it by download/save, then clicking on the .pet file. It installed fine: vattery and ibam went into /usr/local/bin, and a startup script into /root/Startup. Uninstalling from the package manager, although it reported no error, did nothing; all the files were still present.
I'll give it another go on the next rev, though, as I really want better power management on this laptop.
-S
Code: Select all
flatso:/root # vattery
can not read /root/.config/vattery/config: File is empty
** (vattery:25899): CRITICAL **: file main.vala.c: line 1276: uncaught error: Failed to open file '/proc/acpi/battery/BAT0/state': No such file or directory
** (vattery:25899): CRITICAL **: file main.vala.c: line 1276: uncaught error: Failed to open file '/proc/acpi/battery/BAT0/state': No such file or directory
However the 'state' files for the batteries are empty ...
-Shel
EDIT: Also, it doesn't uninstall cleanly. I installed it by download/save, then clicking on the .pet file. It installed fine: vattery and ibam went into /usr/local/bin, and a startup script into /root/Startup. Uninstalling from the package manager, although it reported no error, did nothing; all the files were still present.
I'll give it another go on the next rev, though, as I really want better power management on this laptop.
-S
Last edited by Shel on Thu 31 Dec 2009, 10:20, edited 1 time in total.
Not working on AsusEEE 900
same on AsusEEE 900:
can not read /root/.config/vattery/config: File is empty
can not read /root/.config/vattery/config: File is empty
The config file error is normal for the first run. It will create the config file automatically if you click on the preferences.
It needs acpi battery support in the kernel so it won't work work without a /proc/acpi/battery directory. It probably also assumes you have only one battery.
I will look into the uninstall thing.
It needs acpi battery support in the kernel so it won't work work without a /proc/acpi/battery directory. It probably also assumes you have only one battery.
I will look into the uninstall thing.
Maybe, but it never got far enough for me to have anything on which to click.jemimah wrote:The config file error is normal for the first run. It will create the config file automatically if you click on the preferences.
I'm using the supplied kernel that came with 4.3.1. Your 'acpitool' works, at least as far as checking the battery:It needs acpi battery support in the kernel so it won't work work without a /proc/acpi/battery directory. It probably also assumes you have only one battery.
Code: Select all
flatso:/root # acpitool -b
Battery #1 : charged, 100.0%, 00:00:00
Battery #2 : charging, 54.19%, 03:10:36
If it only checks one battery, but I can tell it which one, that would be OK.
The /proc/acpi/battery directory exists, as do the state files for BAT1 and BAT2. The files are zero-length, however:
Code: Select all
flatso:/root # ls -la /proc/acpi/battery
total 0
dr-xr-xr-x 4 root root 0 2009-12-31 16:02 .
dr-xr-xr-x 12 root root 0 2009-12-31 15:17 ..
dr-xr-xr-x 2 root root 0 2009-12-31 16:02 BAT1
dr-xr-xr-x 2 root root 0 2009-12-31 16:02 BAT2
flatso:/root # ls -la /proc/acpi/battery/BAT1
total 0
dr-xr-xr-x 2 root root 0 2009-12-31 16:02 .
dr-xr-xr-x 4 root root 0 2009-12-31 16:02 ..
-rw-r--r-- 1 root root 0 2009-12-31 16:02 alarm
-r--r--r-- 1 root root 0 2009-12-31 16:02 info
-r--r--r-- 1 root root 0 2009-12-31 16:02 state
flatso:/root # ls -la /proc/acpi/battery/BAT2
total 0
dr-xr-xr-x 2 root root 0 2009-12-31 16:02 .
dr-xr-xr-x 4 root root 0 2009-12-31 16:02 ..
-rw-r--r-- 1 root root 0 2009-12-31 16:02 alarm
-r--r--r-- 1 root root 0 2009-12-31 16:02 info
-r--r--r-- 1 root root 0 2009-12-31 16:02 state
-Shel
PS: As a quick battery check, this one-line script, attached to a desktop icon, isn't all bad:
Code: Select all
gxmessage -title "Battery Status" "`acpitool -b`"
acpitool is working well on my eeepc 1005HA using wmii wm.
I symlinked acpitool to acpi and use this for the task bar in wmiirc:
I symlinked acpitool to acpi and use this for the task bar in wmiirc:
Code: Select all
#Modified by trapster Status Bar Info
status() {
echo -n ' WiFi:' $(iwconfig wlan0 | sed 's/ /\n/g' | grep Quality) '|' $(acpi -b | sed 's/.*, \{0,2\}\([0-9]\{1,3\}%\),.*/BAT0: \1 | /') '|' $(uptime |
sed 's/.*://; s/,//g') '|' $(date +%I:%m)
trapster
Maine, USA
Asus eeepc 1005HA PU1X-BK
Frugal install: Slacko
Currently using full install: DebianDog
Maine, USA
Asus eeepc 1005HA PU1X-BK
Frugal install: Slacko
Currently using full install: DebianDog
Kinda-sorta.Shel wrote: ibam works, vattery works, and it seems to reflect the total of both batteries.on my Toshiba Portege R100.
Since this machine fully charges the internal battery before charging the external one, but discharges them more or less at the same time, it'll take me a little while to know how accurate it is.
At the moment, the vattery icon is showing fully charged, and the mouse-over hovertext reflects that.
ibam reports ...
Code: Select all
flatso:/root # ibam -a
Bios percentage: 100 %
Battery percentage: 100 %
Soft low percentage limit: 5 %
Charge percentage: 100 %
Bios time left: 4:17:51
Battery time left: 5:03:29
Adapted battery time left: 5:03:29
Charge time left: 0:00:00
Adapted charge time left: 0:00:00
Total battery time: 5:03:29
Adapted total battery time: 5:03:29
Total charge time: 8:53:33
Adapted total charge time: 8:53:33
Profile logging enabled.
Current file: /root/.ibam/profile-002-full
Code: Select all
flatso:/root # acpitool -b
Battery #1 : charged, 100.0%, 00:00:00
Battery #2 : charging, 73.65%, 01:57:09
However, if I snatch the AC cord out, vattery's icon+mouseover quickly drops to 83%, which is a reasonable balance between the power stored in the internal battery and the twice-as-large external one.
It looks pretty good to me so far.
-Shel
Just a small further progress report ...
This worksgreat. It reports what the BIOS thinks is the battery life remaining, and that basically reflects the real state of things. It's a little conservative, in that there's a bit more power available than it reports, but I'd rather have a gas gauge that reads low than be standing on the side of the road holding a gas can and waving down a ride.
This with a two-battery Toshiba Portege R100.
Now for the big problem ... why does the battery run down when the machine is nominally "off?"
-Shel
This worksgreat. It reports what the BIOS thinks is the battery life remaining, and that basically reflects the real state of things. It's a little conservative, in that there's a bit more power available than it reports, but I'd rather have a gas gauge that reads low than be standing on the side of the road holding a gas can and waving down a ride.
This with a two-battery Toshiba Portege R100.
Now for the big problem ... why does the battery run down when the machine is nominally "off?"
-Shel
My bad, I didn't realize that icon is red when the notebook is plugged in and the battery is topped off. Not what I was expecting. I figured as long as it was plugged in it would be in "charging mode". When the battery is discharged some amount and you plug it in, the icon *does* turn blue and then when it tops off it goes back to red even though it is still plugged in. So, like I said, it does change colors, just not in the way I was expecting.
Best Regards
OverDrive
Best Regards
OverDrive
Instant Puppy Fan!!!