jb_
July 30th, 2008, 06:17 PM
After the Win XP install on my laptop getting completely owned by a virus which I can't even figure out how it got on there I've decided to go full time Ubuntu on my laptop.
Everything is fantastic except a few issues:
I would like to know how I can run a script or command on resume from hibernate or standby. This is so I can disable APM on my lappys hdd because it has faulty firmware. It's the Hitachi piece of crap that has probably be discussed many times before, basically sometimes it decides to park it's head after each and every read or write, putting seek times through the roof. I put hdparm -B 255 /dev/sda in my rc.local to fix the drive at boot, just need to do it on resume now.
Second issue, not really an issue but I thought I might throw it out there incase someone knows the answer... when I resume from hibernate gpm tells me my machine failed to hibernate, but all my programs are still running, so it seems to work.
And lastly, my battery life is around 4.5 hours without Compiz running and around 3 hours with it running. I'm looking for a reliable way to run commands when the power switches from AC to battery and visa versa. It would also need to work when it's running on AC, put into sleep/hibernate then switched to battery and woken. Same goes for booting on battery, it would need to have Compiz disabled.
Any help would be much appreciated, help me get away from Windows! :)
Everything is fantastic except a few issues:
I would like to know how I can run a script or command on resume from hibernate or standby. This is so I can disable APM on my lappys hdd because it has faulty firmware. It's the Hitachi piece of crap that has probably be discussed many times before, basically sometimes it decides to park it's head after each and every read or write, putting seek times through the roof. I put hdparm -B 255 /dev/sda in my rc.local to fix the drive at boot, just need to do it on resume now.
Second issue, not really an issue but I thought I might throw it out there incase someone knows the answer... when I resume from hibernate gpm tells me my machine failed to hibernate, but all my programs are still running, so it seems to work.
And lastly, my battery life is around 4.5 hours without Compiz running and around 3 hours with it running. I'm looking for a reliable way to run commands when the power switches from AC to battery and visa versa. It would also need to work when it's running on AC, put into sleep/hibernate then switched to battery and woken. Same goes for booting on battery, it would need to have Compiz disabled.
Any help would be much appreciated, help me get away from Windows! :)