Skip to content

{ Tag Archives } Ubuntu

WTF power scripts went in Intrepid….

On previous versions of Ubuntu, the scripts which are called after a resume from suspend have been found in /etc/acpi/resume.d directory. I used this functionality to turn off some of the hardware in my Vaio which I don’t use (such as the bluetooth and the cdrom drive).

This stopped working when I upgraded to Ubuntu Intrepid. Even more strangely while the scripts are still installed, even they are never called.

It appears that thanks to moving towards HAL (which is probably a “Good Thing”) these scripts are no longer used. The scripts which are used can be found in /etc/pm/. Not only has the location changed, but the script format has too.

Previously, my script was found in /etc/acpi/resume.d/ looked like the following,

#! /bin/sh
# Turn off the CD drive and the bluetooth device
echo 1 > /sys/devices/platform/sony-laptop/cdpower
echo 0 > /sys/devices/platform/sony-laptop/cdpower
echo 1 > /sys/devices/platform/sony-laptop/bluetoothpower
echo 0 > /sys/devices/platform/sony-laptop/bluetoothpower

Now my script script must be found in /etc/pm/sleep.d/10-custom and looks like the following,

#!/bin/sh -e
case "$1" in
		# Turn off the CD drive and the bluetooth device
		echo 1 > /sys/devices/platform/sony-laptop/cdpower
		echo 0 > /sys/devices/platform/sony-laptop/cdpower
		echo 1 > /sys/devices/platform/sony-laptop/bluetoothpower
		echo 0 > /sys/devices/platform/sony-laptop/bluetoothpower

The main reason I’m posting this on my blog is that this change does not seem to be documented anywhere. Searching on Google for things like “resume script intrepid” or “/etc/acpi/resume.d intrepid” does not come up with anything useful. Hopefully some people will find this helpful.

Also tagged , , , , , ,

My three weeks on a Mac

As everyone knows, I recently started at Google. When I started I was given a MacBook Pro to use as the company laptop before I had a chance to change it, I had to head off to Mountain View for training. This meant I ended up using a Mac for 3 and half weeks.

Now I am back in Australia I have decided to trade in my Mac for a nice PC running Linux. People have continually told me that Macs are the epitome for polished UI and once you get use to them, there is no going back. When I suggested that this might not be the case, I was told “but you have never used Mac” – well now I have and I have specific examples of why Apple’s are less usable then Linux.

My first bone to pick is with the unlock screen. As I work at Google and might have the codes for the orbital space laser on my laptop, I need to lock my screen anytime I walk away from my desk. In gnome on Linux I can just walk back to my computer and start typing my password, it makes sure that all the keys end up in the password box – no so on a Mac. When I get back, I first have to move the mouse or hit a key, I then have to wait for the twirling multi-color ball and then I get to type my password. If I just start typing I loose the first 3 or more characters of the password.

Next is the useless wireless indicator that Mac has. On Linux I can clearly see if I am connected, trying to connect or waiting, I can also see if I am on wireless or wired network. This is all thanks to Network Manager which is very, very cool. On Mac, you can’t tell if you are connected or the Mac is having a shit and still trying to connect. Often, I had to bring up a ping program to see if the wireless bars meant I was actually connected or not. If I plug in the ethernet, without specifically disabling the Airport how do I know where my packets are going?

The twirling ball of doom. Normally programs either lock hard or work. Not on Mac, instead you get a ball which twirls forever. After waiting for 15 minutes I just hard reset my computer. At least if I knew the computer was locked up I wouldn’t have to wait that 15 minutes.

I have often gotten this error “You cannot move any item to the Trash because it is being emptied” when doing a secure empty of my trash bin. How hard is it to put things in the trash while emptying it?

Alt Tab doesn’t work. It doesn’t change between windows, only applications. Often I have multiple windows open in one application. I first have to “alt tab” to the correct application, then I have to “command tab” to the correct window. How annoying!

So that was just a few issues I have had. Overall, I am much happier with Ubuntu and it keeps getting even better.

Also tagged , , ,