Wednesday, June 18, 2008

T60p battery life

I was able to get over 4.5hrs on my T60p the other day. That is fantastic for the laptop. The other part is the laptop appears to be running much cooler under Fedora 9 than my previous setup. About 5-10C cooler which for a laptop is a lot.

Tuesday, June 17, 2008

Fedora 9 on my T60p

My T60p is a machine provided by my employer and it had been running Fedora 7 and then I yum upgraded to Fedora 8. Some of the things on it were not working as best as they could, like the screen saver and such. So I decided to do a clean install of Fedora 9.

I got the DVD and reinstalled, formatting the / and /boot partitions and leaving the /home partition mounted by not formatted (don't want to lose my data). Prior to doing all this I got all the packages I needed to get on the VPN so that I could connect to my office and get the additional tools I needed as well as a few config files.

The reinstall went quickly and then I had to install about 400MB of post Fedora 9 patches and another 400MB of tools for work. The only gripe I have about the install is that I did have my network activated during install, why could of the updated packages not have been installed at that point, anyway, minor nit.

All in all about 3hrs later I had my laptop working with VPN and connection to my office and I was able to get on our email system and get my mail. I then grabbed a couple of other apps and then got VMWare working (needed the vmware-any-any 117 patch). After that I added my acpi scripts and everything was working fine. 3d is not working on the machine since fglrx does not work with Fedora 9 yet and the r500 drivers have not been pushed to updates yet. I understand that they are in queue, just waiting for a bit more stabilization. Everything else on the machine is working except for the dialup modem, but I think I would have to be really desperate to have to resort to that.

I was able to use my laptop on battery for about 2.5hrs the other night which is not bad and the meter said I still had about an hour of battery left. The other thing is while I was on battery the machine was VERY cool. And in fact the machine seems cool even when plugged in. Which is nice as a hot laptop is a pain. The machine is a dual core (2.16Ghz) with 3GB of RAM in a < 1" slab so to even be slightly warm is something short of a miracle.

So to completely reload a machine from DVD and have it all updating and working in about 4-6hrs is pretty great. I've very sure I could not have done that with a Windows box. And remember with Windows you still have to install Office and all that other stuff, where with Fedora it comes as part of the install.

Thursday, June 12, 2008

Thinkpad T60p acpi script

This is the script I use on my T60p (2007-AD1) to get the most out of my battery life. With this script in place, I can get about 375-4hrs off of my battery.


state=`grep on-line /proc/acpi/ac_adapter/AC/state | wc -l`
if [ $state -gt 0 ]; then
hal-disable-polling --device /dev/scd0 --enable-polling
echo 0 > /proc/sys/vm/laptop_mode
echo 0 > /sys/devices/system/cpu/sched_mc_power_savings
hdparm -B 128 -s 0 /dev/sda
echo 499 > /proc/sys/vm/dirty_writeback_centisecs
for i in /sys/bus/usb/devices/*/power/autosuspend; do echo 0 > $i; done
ethtool -s eth0 wol g
echo 0 > /sys/module/snd_hda_intel/parameters/power_save
echo enable > /proc/acpi/ibm/bluetooth
echo max_performance > /sys/class/scsi_host/host0/link_power_management_
hal-disable-polling --device /dev/scd0
echo 5 > /proc/sys/vm/laptop_mode
echo 1 > /sys/devices/system/cpu/sched_mc_power_savings
hdparm -B 1 -s 12 /dev/sda
echo 1500 > /proc/sys/vm/dirty_writeback_centisecs
killall beagled
for i in /sys/bus/usb/devices/*/power/autosuspend; do echo 1 > $i; done
ethtool -s eth0 wol d
echo 1 > /sys/module/snd_hda_intel/parameters/power_save
echo disable > /proc/acpi/ibm/bluetooth
echo min_power > /sys/class/scsi_host/host0/link_power_management_policy

And of course the config file in /etc/acpi/events/battery.conf

# Configuration to turn on DPMS again on video activity, needed for some
# laptops. Disabled by default, uncomment if your laptop display stays blank
# after you close and open the lid.


Album Art

I was interesting in putting some album art for music files into gnome-mplayer but I have not found any good C libraries to do that. So if anyone has any pointers I'll look into them. I think Amazon my have a developer program for searching images, but I'm not sure I could distribute that with gnome-mplayer. So I'm looking for a GPL way of doing this.

I've thought about doing a screen scrape of google images, but a little concerned about that.