Tuesday, May 20, 2008

Hardy Apple Crumble

Update This wiki page on the Ubuntu site addresses this issue in full.

Following the resolution problem with Ubuntu 8.0.4, the next hurdle I had was getting my slim apple keyboard to play nice. Due to driver updates, after logging into Ubuntu the keyboard becomes unusable. I later read this post which reassured me that I wasn't going mad. (or madder than I currently am!)

"pressing "Clear" (numlock key) results in right part of the main keyboard part (keys g-l on the middle row + keys around) to behave as a numeric pad. To set it back, I found after lengthy trial-error, that I have to press F5 (or F6, I'm not sure)."

After banging the F6 key, my keyboard returned to normal. Phew. The only problem now was that the function keys performed as if the previously vestigial Fn was pressed the whole time. So for example if I pressed F1, it would decrease the brightness of my laptop screen! How annoying!

After digging around the I found a this excellent post which helped me turn off the default Fn key behaviour for apple keyboards.

To get your apple keyboard back to how it functioned in Ubuntu 7.10 do the following:

1. Add a file to the /etc/modprobe.d/ directory with the following contents:

options hid pb_fnmode=2

This turns off the default Fn key behaviour of always being on.

2. Add the following to Preferences->Session->Startup Programs section:

xmodmap -e 'keycode 77='

This turns off the mapping for the "Clear" key (keycode 77) on the apple keyboard which is wreaking havoc.

3. Restart your machine and enjoy the normality :)

This is now a bug. Hopefully it will be resolved soon.

Hardy Resolution

I recently upgraded from Ubuntu 7.10 to 8.0.4 through the automatic update process. I naively assumed "this is linux....it will just work". Yes. I was wrong.

Firstly I was running Ubuntu on my Dell Inspiron 6400 laptop which has a ATl Mobility Radeon X1400 graphics card. I had this all setup on 7.10 to run @ the native 1680x1050 resolution. 8.0.4 had dropped that back to 1440 x 1050. Great. I followed all the same steps I had in 7.10 to get back my previous resolution and it worked (thankfully) once I manually added my 1680x1050 resolution to the /etc/X11/xorg.conf file. The steps are outlined below:

1. Disable composite extensions
The proprietary ATI dirver (fglrx) does not yet support composite.extensions In order to disable composite extensions you have to edit the xorg.conf file:

sudo gedit /etc/X11/xorg.conf

and add these lines at the end of the /etc/X11/xorg.conf file:

Section "Extensions"
   Option "Composite" "0"
EndSection

2. Install the ATI driver
Open a terminal and enter the following in order to install the ATI driver:

sudo apt-get update
sudo apt-get install linux-restricted-modules-$(uname -r)
sudo apt-get install xorg-driver-fglrx
sudo depmod -a

3. Configure the driver
Type in the following to update the xorg.conf file with the new driver:

sudo aticonfig --initial
sudo aticonfig --overlay-type=Xv

4. Completing the installation
Restart the computer with the following:

sudo shutdown -r now

5. Post installation check
Upon restarting the machine you should be able to choose the screen resolution of 1680x1050 under the Preferences -> Screen Resolution setting. If the screen resolution can't be found and the max resolution is still 1440x1050, edit the xorg.cof file and add the 1680x1050 resolution manually:

sudo edit /etc/X11/xorg.conf

Update the Modes section to include the 1680x1050 resolution:

Section "Screen"
   Identifier "Default Screen"
   Device "Generic Video Card"
   Monitor "Generic Monitor"
   DefaultDepth 24
   SubSection "Display"
      Modes "1400x1050" "1680x1050"
   EndSubSection
EndSection


Restart the computer with the following:

sudo shutdown -r now

Check the Preferences -> Screen Resolution setting and change the resolution to 1680x1050.

To verify that the fgl driver has been installed correctly, run the following command to check its output to ensure the fglrx driver is installed properly:

fglrxinfo

The output from the driver should read:

display: :0.0 screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: ATI Mobility Radeon X1400
OpenGL version string: 2.1.7412 Release

Enjoy! :)