Ubuntu 11.10 Oneiric Ocelot on Toshiba Tablet

I recently installed 11.10 on an old Toshiba tablet - color me impressed. I was itching to try this new version especially since I just inadvertently blew up the linux 10.10 partition in my old dual boot Toshiba Tablet and rather than fix it I had decided to wait for the new release.

It installed very fast and I chose to delete my existing install and also get updates while installing. It seems like only 1 year ago or less I was installing OSs that were not smart enough to ask me things while downloading / copying files.. The whole thing took less than 30 minutes and it kept the existing partitions (though they were formatted) and mounting points and the Windows side was left untouched. I was also asked whether I wanted my home folder encrypted – I chose yes and was even given the random key to unlock my data in case of failure.

1. Video

When installing a desktop distro the first thing I try, before any further customization and troubleshooting, is to make sure I’m running the best video card drivers, as Linux lags behind Windows in this department (we have video card manufacturers, especially ATI and Intel to ‘thank’ for that). With my Toshiba m200 I noticed a problem from the very start – the startup screen was mangled:

Ubuntu 11.10 Oniric Ocelot nVidia startup screen

This had not happened with previous versions. Luckily, it recovered and I was able to login. Turns out that it installed by default the 96 nVidia driver when the 173 was recommended. I removed 96 and installed the 173 driver, reboot, then tried 173 updated, but the startup screen continued to look terrible. Nothing I could not live with..

Unity 3D won’t work with m200’s nVidia (GEForce FX Go 5200) because my old video card is blacklisted, as I found out with /usr/lib/nux/unity_support_test –p . And that’s quite alright, as I prefer performance over eye candy.

resolution

On the plus side, the M200 gets to use 1040x1050 maximum resolution. Sadly, this was not the case with the M400, which uses an Intel 945GM video card but which goes only to 1024x768. Perhaps this shouldn’t surprise me since a Windows 8 recent install would go only to 1024 x 768 as well. The 3D support seems to have more to do with the processor (Core Duo 1.8 GHz as opposed to Pentium M 1.8 GHz for m200).

Here’s Control-D’s guide on enabling the higher res for 7.04:

Fixing Screen Resolution

This is for the m400 with the SXGA screen with a native resolution of 1400×1050.

Install the 915resolution package using Synaptic or apt-get.

By running sudo 915resolution -l you can see the available video modes. We want mode 58, but we’re going to specify the correct resolution.

Edit /etc/default/915resolution so that it says

MODE=58
XRESO=1400
YRESO=1050
BIT=

x11-xorg-confNow, edit /etc/X11/xorg.conf and put the following at the end of the Screen section.

SubSection "Display"
    Depth           24
    Modes           "1400x1050" "1024x768" "800x600" "640x480"
EndSubSection

Finally, reboot and you should have the correct 1400×1050 resolution now.

915resolution is obsolete and cannot be easily installed. Furthermore, xorg.conf has gone through so many changes that I’m always afraid to touch it, and I’m not the only one. I reproduced above an xkcd cartoon from a few days ago.

We shall see this week-end, if I have a bit more time.

2. OS order in multiboot menu

When multibooting it’s important to install / upgrade OSs with the dumbest / rudest first. In other words, start with the earliest Windows version and continue on to Linux. Yet this isn’t what I want to talk about here.

In the old days of Lilo or Grub 1, the multiboot menu was directly editable from a “menu.lst” file found somewhere in a /etc subdirectory. This was replaced with a bunch of files in the /grub directory and changing them is quite difficult; after each change, the whole thing needs to be “recompiled”. In the past, I managed to place Windows at the top of the menu and have the new kernels (which linux installs while keeping the old ones) appear at the bottom. Now it seems that Windows was moved to the bottom, but on the other hand Computer Janitor (which appeared to help users deal with old kernels and other remnants) has been removed, which suggests that the developers have finally found a way to deal with the old kernels mess.

There was a program called startup manager which helped with the fight against the Grub Conspiracy, but it’s been abandoned. The one that took its place is grub-customizer. However, I have a feeling that all this might be unnecessary – linux might’ve finally learnt to deal with old kernels in which case the order of boot menu entries is irrelevant.

3. TV on the run

It’s not really on the run, it’s for home, where I have HDTV on the network, but it’s called hdhomerun

After downloading and expanding the source tarballs, I have to go in the Config dir and do

./configure
make
sudo make install

This is just to see how it works on the m400 with its Intel card; for regular use, a MythTV client server system makes far more sense for home use.

4. Rotating the screen

This seems to be a hit and miss with my Toshiba tablets in every Linux version – it never works right out of the box. I will try Jupiter to see if that solves it, but until then, here’s what control-d recommends in the script /home/derrick/bin/rotate.sh

#! /bin/sh

orientation=`xrandr -q | grep "LVDS"| awk '{print $4}' | sed 's/[^A-Za-z]//g'`
if [ "$orientation" = "normal" ]; then
    /usr/bin/X11/xrandr --orientation right
    xsetwacom set "Wacom Serial Tablet PC Pen Tablet/Digitizer" rotate CW
    onboard &
else
    /usr/bin/X11/xrandr --orientation normal
    xsetwacom set "Wacom Serial Tablet PC Pen Tablet/Digitizer" rotate
    killall onboard
fi

Once the script works, we need to attach it to the rotate button. Here’s the difficulty encountered in 9.04:

From here getting the rotate screen button to work is somewhat of a hack. There seems to be a bug in this version where the button triggers two key events, Super_L and 6, at the same time. I banged my head over this for a while. In the past it produced one distinct key event, and I would map this in Gnome to run a command. Now, the problem is it's not possible in Gnome to map, say Super+6, to the rotate script. You obviously don't want to map the 6 key for this, so how about just <Super>? That won't work either as the multi-directional button next to it generates Super+1 through Super+5, depending on what direction you press it. What I finally ended up doing was mapping Super_L to modifier key Mod4 using xmodmap.

His solution:

  1. Create a .Xmodmap file in your home directory (ie., /home/derrick/.Xmodmap)
  2. Edit the .Xmodmap file and put the following:

      clear Mod4
      add Mod4 = Super_L

  3. Run the command 'xmodmap ~/.Xmodmap'.

This then allows us to create a Gnome keyboard shortcut using this new Mod4 modifier key:

  1. Go to System -> Preferences -> Keyboard Shortcuts
  2. Click Add, give it a name, and in the Command field put the full path to your executable rotate.sh script
  3. Run the command 'gconf-editor'
  4. Go to /desktop/gnome/keybindings/ and find the customN folder that contains the custom keyboard shortcut that you created
  5. Edit the binding value and enter the following value: <Mod4>6

It should now rotate when pressing the rotate button.

5. Fingerprint reader

Until I found Control-d’s tutorial I had nearly given up trying. There’s lots of tutorials online (I added some in sources) but they are mostly for ThinkPad users and a different kind of reader. Mine is made by Upek, who is also selling a linux suite, but it’s old and unsupported.

  1. add repo deb http://ppa.launchpad.net/jon-oberheide/ppa/ubuntu jaunty main (I’ll try changing jaunty to oneiric)
  2. sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com F2A12FABE936A7BBDC4EA33351DB180D1323E149
  3. sudo apt-get update && sudo apt-get install thinkfinger-tools libpam-thinkfinger
  4. Create /etc/udev/rules.d/60-thinkfinger.rules with:

      #
      # udev rules file for the thinkfinger fingerprint scanner
      #

      # uinput device
      KERNEL=="uinput", MODE="0660", GROUP="plugdev"

  5. Reboot.
  6. Create the fingerprint file:

      $ tf-tool --acquire

      ThinkFinger 0.3 (http://thinkfinger.sourceforge.net/)
      Copyright (C) 2006, 2007 Timo Hoenig <thoenig@suse.de>

      Initializing... done.
      Please swipe your finger (successful swipes 3/3, failed swipes: 0)... done.
      Storing data (/home/derrick/.thinkfinger.bir)... done.

  7. Test it

      $ tf-tool --verify

      ThinkFinger 0.3 (http://thinkfinger.sourceforge.net/)
      Copyright (C) 2006, 2007 Timo Hoenig <thoenig@suse.de>

      Initializing... done.
      Please swipe your finger (successful swipes 1/1, failed swipes: 0)... done.
      Result: Fingerprint does match.

  8. Edit /etc/pam.d/common-auth adding auth sufficient pam_thinkfinger.so as follows

....
# here are the per-package modules (the "Primary" block)
auth    sufficient    pam_thinkfinger.so
auth    [success=1 default=ignore]    pam_unix.so try_first_pass nullok_secure
# here's the fallback if no module succeeds
....

You know should be able to login to gnome and unlock gnome-screensaver (which does not really exist in the current Gnome Shell) with your fingerprint, subject to the following limitations:

  1. if the first swipe fails it falls back to password auth only
  2. after logging into gnome by swiping your finger you will be prompted to enter your password for the gnome keyring
  3. reader gets hot - how to change the power level?

I’m eager to try it and see if it still works (subject to whatever modifications have come with upgrades).

 

<to be updated as I have time to apply the untried config tweaks>

I then looked at my old setup notes for 10.10 (especially Opera and network shares) and tried to follow most of it. Installing Opera for instance, but then I also had to remember to enable plugins on demand, change homepage, add to Forms, disable sounds, disable thumbs in tabs, empty cache on exit, no 3rd cookies, set & use master password, disable geo-location, add a few more to server completion, and finally sync.

Read on for general Ubuntu Oneiric Ocelot 11.10 tips!

Sources / More info: wiki-jj-9.04, 915-dl, 915-hack, 915-bgn, 915-intel, intel-detect, intel-kb, gtf, 915-ih2bc, tw-950, mandriva-945, hdhomerun

Comments

Popular posts from this blog