Sunday, May 20, 2007

Ubuntu on my new laptop (+ how-to)

Yes, my laptop (Toshiba A100-062) did arrive, and yes I had installed Ubuntu within the hour :)

I installed the latest version, 7.04, and had no trouble at all. A far cry from the way Linux used to be, absolutely everything worked out of the box. Once that would have been something uncommon, especially on a laptop. Certainly a pat on the back goes to the Ubuntu developers, and all who contribute directly or indirectly to it.

One of the first things I did was install Beryl, a 3D window manager. A full-quality video of it is here (if you're on Windows and it won't play, you need the Ogg Theora codec, try VLC video player, I think it works there).

A couple of things I would like to document here, in case they help anyone...

Memory card reader

At first I thought it wouldn't work (since that is what a lot of people told me). Sure enough, putting an SD card into the slot did nothing. However I forgot to remove it, and I rebooted with it still in the slot. It seems this was enough to trigger Ubuntu to recognise it, and mount the card.

It worked absolutely fine, until I tried a new card. The one that works is 256MB, and the one that doesn't is 2GB, so perhaps it is incompatible with the reader.

A couple of filed bugs for Ubuntu caught my eye:
Ubuntu Bug #53923
Ubuntu Bug #105284

I get the output posted there while the card is in the slot (Ubuntu tries to load it, fails, and tries again and again...).

ubuntu kernel: [ 3545.540000] end_request: I/O error, dev mmcblk0, sector xxxxx

I still have to test the card in this reader in Vista, so I can be sure it is not just a hardware incompatibility.

None of the workarounds posted in comments to those bugs worked (though I admit I did not try compiling new drivers, I am using the Feisty tifm module). I expect this will be fixed in an update.

Update: It decided to start working all by itself... :D Don't ask me what it was all about.

Second update: In fact this problem seems to be a completely intermittent problem. Sometimes it will work, sometimes it will not. When it doesn't work, I have yet to find a way to fix it, except to repeatedly remove and re-insert the card. Hopefully the next kernel will indeed fix this.

Touchpad
I knew there was a program called 'GSynaptics' which allows extra configuration of your touchpad. Being me, I had to install it. I got an error that I needed to set SHMConfig to "true" in xorg.conf. Not very helpful. Here is what I really had to do:

If you have a section that says "Synaptics Touchpad" in /etc/X11/xorg.conf already, you can just add the line:

Option "SHMConfig" "true"

to the section for the device. You must be root to edit this file, so run 'gksudo gedit /etc/X11/xorg.conf' for a GUI or 'sudo nano /etc/X11/xorg.conf' in Terminal.

If you don't have such a section, add this somewhere in /etc/X11/xorg.conf:
Section "InputDevice"
Identifier "Synaptics Touchpad"
Driver "synaptics"
Option "SendCoreEvents" "true"
Option "Device" "/dev/psaux"
Option "Protocol" "auto-dev"
Option "SHMConfig" "true"
EndSection
Close all your applications, log out, and press Ctrl+Alt+Backspace to restart the X server. If you haven't already, install GSynaptics.

Supend to RAM (Sleep), Hibernation and Resume

Although initially working, and working at the time I made this post, I have added this section when I discovered that somehow suspend/resume was broken. I fixed it by doing the following:

Change these options in /etc/default/acpi-support:

SAVE_VBE_STATE=false
POST_VIDEO=false
DOUBLE_CONSOLE_SWITCH=true

Note: I also changed: MODULES="tifm_core tifm_sd tifm_7xx1"
This probably isn't right, but I'm too lazy to change it back right now :). I am concerned that it may lose write-cache data for the SD card if you suspend to RAM. Maybe it won't, but you have been warned!

Next, reboot, and immediately press F2 to enter the BIOS. Change "Enable support for legacy USB devices" to 'Disabled', then Save and Exit.

Test suspend/resume, it should work. If you have a problem with the keyboard/touchpad not working after resume, download the patch (and apply it with the instructions) from this blog post.

Suspend/resume now works fine for me.

LCD Brightness

Maybe not an issue for most people. For some reason the LCD brightness controls in most places don't seem to work, yet controlling the brightness manually is possible.

Create a file /usr/bin/setbrightness:

sudo nano /usr/bin/setbrightness


Paste into it this:

#!/bin/bash
sudo sh -c "echo $1 > /proc/acpi/video/VGA/LCD/brightness"

Press Ctrl+O to save, and Ctrl+X to exit. You can now change the brightness with:
`sudo setbrightness 10` (this is the lowest brightness)
Possible values are: 10 25 35 50 60 75 90 100 (other values will be ignored)

To allow any user on the system to use setbrightness with no sudo:
`sudo chmod a+w /proc/acpi/video/VGA/LCD/brightness` (without the quotes)
This may not last between reboots though.

Links (the places from which I gathered all the information I used):
Debian Etch on a Toshiba Satellite A100-159
Ubuntu: Synaptics Touchpad

Also, how to automatically switch off the touchpad while you are typing (I haven't tried it yet):
Disable Touchpad While Typing - Ubuntu Forums
Ubuntu Tutorials - Temporarily Disable Touchpad While Typing
Disable Touchpad Tapping While Typing - Ubuntu Forums
Toshiba Satellite Laptop Success Story -Ubuntu Forums (Where I found the suspend/resume fix I wrote above, slightly modified for the A100 with Intel graphics)

4 comments:

Paul said...

I haven't tried configuring X to get GSynaptics to work but the card reader worked fine from the start.

Chris Houlis said...

Hi. Thanks for the post. Your instructions on how to fix my suspend/restore problem worked first time.

Now, if only my laptop would wake up with the PCM sound not muted...

Paul said...

@chris I don't know if this works but try it:
1. sudo -i
2. alsamixer
3. set your desired default levels
4. press ESC
5. alsactl store
6. exit
7. try and see if it works now

@Matthew Your post was the first thing I looked into when my dad asked that I make his LCD less brighter this afternoon.

Anonymous said...

Hi. I have a Toshiba A105 laptop and I tried the exact steps you mentioned for the LCD brightness thing and it didn't work.

Do you have any other suggestions or know of anything else I could try to get this going?

Thanks in advance for the help!