Installing Ubuntu 7.04 (Feisty Fawn) on an X61 Tablet

From ThinkWiki
Revision as of 16:18, 27 August 2007 by Sean (Talk | contribs) (Wireless)
Jump to: navigation, search

You can get Linux running pretty smoothly on this machine. I will simply repeat the steps I used to get my tablet working, some of these steps might be superfluous. Please edit, if some of the steps are unneccessary. I expect Gutsy Gibbon installs to be much smoother, when the system comes out in October...

Helpful Guides

A helpful guide for me was http://luke.no-ip.org/x60tablet/

Fiesty v. Gutsy

I have gotten the computer to work well with both Fiesty and Gutsy Tribe 4 and 5. If you install Fiesty, you will have to upgrade to the 2.6.22 kernel to get all the drivers to work. I would advise using Gutsy, as it makes everything easier to set up (with drivers). The 2.6.23 kernel, once it officially comes out, should *probably* make this laptop an out-of-the-box machine. (the 2.6.23 kernel has plans to include the graphics, sound, and wireless drivers for this machine by default)

Known Problems

These are issues that I have run into and have not resolved yet. None of them are 'show stoppers' in my book. If you have a fix, please add how to resolve the issue on this page (preferrably in the respective how-to section..)

  • Screen rotation with 3D acceleration. Both screen rotation (through xrandr) and 3d acceleration work independantly, however a rotated screen crashes when you try to run a 3d application.
  • ALSA sound glitch when rotating to tablet mode. For some reason rotating to tablet mode from laptop mode causes the sound to cut out. Sound works otherwise.
  • Brightness auto-adjust on Gutsy. Brightness auto adjust cannot determine what level to stay at, and indefinitely adjusts up and down. Pressing the brightness keys fixes this. See launchpad for the official bug
  • Suspend/Hibernate. From what I can tell, neither of these work very well. When trying to start up again, the backlight will not turn on, and if you use a bright light to look at your screen, you will see that the kernel has panicked.

Actual installation

      • Works in both fiesty and gutsy

The trickiest part about actually installing Ubuntu on this machine is that there is no CD drive. If you've shelled out the $200 for the 'ultrabase' then you can just pop the CD in that, and procede normally. I had to install via a pendrive. Instructions on how to do this are at

http://www.pendrivelinux.com/2007/02/12/usb-ubuntu-tutorial-for-linux-users/

  • On my machine, and with my particular USB drive, I found that it was difficult get power to the USB drive in a normal boot process. I had to enter the BIOS (F1 during power on), configure the USB HDD to be first boot choice, and then enable the POST memory check (extended boot?, I think it was called). Then I had to insert the USB drive during the memory check, and make sure the light on the USB came on in order to get it to boot from the installer. Hopefully most people won't have this problem, but I did, so if you have problems getting the drive to be seen, make sure the USB is getting powered.


Graphics Card

      • Fiesty

The X3100 with an Intel GMA965 runs Compiz Fusion very nicely, once the proper drivers are installed. The 'i810' driver that is installed by default with Fiesty does not support the X3100, but there are newer drivers (simply named 'intel') that do support it. Source is available from http://www.intellinuxgraphics.org/. Unfortunately, installing on the stock kernel (2.6.18, if I remember) does not work with these drivers, as agpgart is incorrectly registered. I upgraded to 2.6.22 and the drivers work nicely. Here's the walkthrough...

  • Install the new kernel
# gedit /etc/apt/sources.list

Add the Gutsy repositories

# deb http://archive.ubuntu.com/ubuntu gutsy main restricted universe multiverse
# deb-src http://security.ubuntu.com/ubuntu gutsy main restricted universe multiverse

Save and exit gedit

Install the new kernel

# apt-get update
# apt-get install linux-image-2.6.22-9-generic linux-ubuntu-modules-2.6.22-9-generic linux-backports-modules-2.6.22-9-generic linux-headers-2.6.22-9 linux-headers-2.6.22-9-generic  linux-restricted-modules-2.6.22-9-generic 

Reboot. Make sure to select the new kernel in GRUB when you turn on the computer.


Install the graphics card drivers from the repositories

# sudo apt-get install xserver-xorg-video-intel xserver-xorg libgl1-mesa-dri libgl1-mesa-glx libglu1-mesa mesa-utils

Let X11 know to use the Intel drivers

# gedit /etc/X11/xorg.conf

Change

Section "Device"
        Identifier      "Generic Video Card"
        Driver          "vesa"
        BusID           "PCI:0:2:0"
EndSection

to

Section "Device"
        Identifier      "Generic Video Card"
        Driver          "intel"
        BusID           "PCI:0:2:0"
EndSection


Reboot

      • Gutsy

3d acceleration works out of the box, but I had to compile compiz fusion and awm from source to get them to work. If I find time, I'll make a deb for both....


Solving the Weird Resolution Problems

      • Applies to both Fiesty and Gutsy

When you reboot into the new drivers, it seems that X defaults to the graphics card's 'TV' output instead of the 'LVDS' option as it should. This will cause X to be confused about where the screen edges are, and in general make everything weird. This can be corrected in one of two ways

  • Solution 1:

Everytime you log in, enter this command

# xrandr --output TV --off
  • Solution 2:

Edit xorg.conf to automatically correct this problem. Note that this will cause xrandr (which you may want to use for screen rotation) to fail when you try to use it.

add this to the device section

Option "monitor-TV" "TVOutput"
Option  "CacheLines"    "32768"
Option  "TripleBuffer"  "true"
Option  "DRI"   "true"
Option  "PageFlip"      "true"

add this at the bottom

Section "Monitor"
    Identifier "TVOutput"
    Option "Disable" "true"
EndSection

save and exit, restart X


Installing compiz fusion

      • Fiesty

Basically, I followed the instructions at http://fosswire.com/2007/07/11/how-to-compiz-fusion-on-ubuntu-704-feisty-fawn/

The line about adding the GPG keys is malformed, copying and pasting won't work. Use this command

# gpg --keyserver subkeys.pgp.net --recv-keys 81836EBF
# gpg --export --armor 81836EBF | sudo apt-key add -
      • Gutsy

I had to compile from source. This is a kinda long process, and you have to have programming/compiling skills, but it definitely works well if you can do it.


There you go! Now you have a visually gorgeous system running :-D! All the effects run very smoothly for me, I was very pleased with this integrated card's performance... (no stuttering for even complex effects like explode or airplane)

Wireless

This essential laptop feature will definitely work. The intel ABG card has drivers, guides should abound as to how to install it. (if anyone has time, put how you got it to work here) I purchased the newer AGN card, and this is how I installed the new drivers.

Walkthough for newbies :-)

download these: http://intellinuxwireless.org/mac80211/downloads/mac80211-8.0.2.tgz http://intellinuxwireless.org/iwlwifi/downloads/iwlwifi-4965-ucode-4.44.17.tgz http://intellinuxwireless.org/iwlwifi/downloads/iwlwifi-1.0.0.tgz

extract them

prepare the build environment

# sudo mkdir /lib/firmware/$(uname -r)
# sudo ln -s /usr/src/linux-headers-$(uname -r) /lib/modules/$(uname -r)/source

make everything

# cd mac80211-8.0.2
# sudo make patch_kernel
# cd ../iwlwifi-1.0.0
# make
# sudo make install
# cd ../iwlwifi-4965-ucode-4.44.17
# sudo cp iwlwifi-4965.ucode /lib/firmware/$(uname -r)


Finally, Load the modules

sudo modprobe mac80211
sudo modprobe iwl4965

You should have wifi now!

Thanks goes to rye_ of ubuntuforums!

They work pretty well, I've only noticed them being flaky once.

Wacom

We bought this machine largely for the tablet abilities, and the pen works out of the box! Yay! The side button automatically maps to scrollwheel-pressed-down, but you can remap it to right click if you want. Eraser also works.

Tablet-Specific Applications

We're tablet users and we have special needs! Here are some apps I found these apps indespensible

Jot. When I placed my order for my tablet, Lenovo said I had a full month wait til it arrived. I filled the time writing a handwriting recognition app for Linux. My goal is to allow for full sentence or full word recognition. As of 8/20/2007, its still in alpha testing, but I should have a pretty good release mid-September to early October. Source is available from http://bazaar.launchpad.net/~kdub432/jot/trunk. You need libfakekey0, gtkmm-2.4-dev, libcairomm-1.0-dev installed so the makefile will work...

Onestroke. This program will recognize a single character at a time pretty well. Its written by Michael Levin, and is in pretty usuable condition. Onestroke can be found at http://www.paperaffinity.com/risujin/onestroke.php

Xournal A journal clone, that is great for taking notes. Fully functional, an all-around great app.

#apt-get install xournal

GoK warning!!! Running GoK on Fiesty screwed up some things for me. It may be that I was just too lazy to fix my dependancies, but I was real ticked at how it installed itself when I was running Fiesty. Use the default Ubuntu program onboard ('onboard' from a terminal) if you want an onscreen keyboard

Sound

Sound does not work out of the box, with gutsy or fiesty, but the mercurial/cvs alsa drivers do have support. This issue was extremely hard to track down, and requires some advanced knowledge. I will provide a short walkthrough to give some guidance.

Step 1 Setup a fundamental build environment

# sudo apt-get install mercurial build-essential libncurses5-dev python2.5 
# sudo mkdir /usr/src/alsa
# cd /usr/src/alsa

(This was taken just from memory, if you get errors about something not being installed, just install whatever it complains about...)

Next, get latest alsa drivers

# sudo hg clone http://hg.alsa-project.org/alsa-driver alsa-driver
# sudo hg clone http://hg.alsa-project.org/alsa-kernel alsa-kernel
# sudo hg clone http://hg.alsa-project.org/alsa-lib alsa-lib
# sudo hg clone http://hg.alsa-project.org/alsa-utils alsa-utils

Install everything

# cd alsa-driver
# sudo ./cvscompile --with-cards=all --with-card-options=all    (Nota Bene, this makes all the drivers. do more research if you just want the intel ones ;-D)
# sudo make install
# cd ../alsa-lib
# sudo ./cvscompile
# sudo make install
# cd ../alsa-utils
# sudo ./cvscompile
# sudo make install

Phew, that was tough. Its not over yet though, you've gotta edit some configuration files

sudo nano /etc/modprobe.d/alsa-base


and add this to the bottom,

options snd-hda-intel model=thinkpad

Save, exit and reboot.

THIS IS VERY IMPORTANT! IT TOOK ME 5+ HOURS TO FIGURE THIS OUT ON MY OWN!

YOU MUST HAVE BIOS SET TO FACTORY INSTALL (for the most part)

Certain BIOS options seem to break these drivers! I'm not sure which, but the factory settings work fine.


On next login, you should have sound. If you don't, make sure nothing is muted in alsaconf/alsamixer. Also, make sure your login name is in the 'audio' or 'users' groups.

Alright, you have sound now! Yay!

Both headphones and speakers work, theres a switch on a tab in the gnome panel audio adjustment properties that turns either on/off


Keyboard and Buttons

You should have no trouble with getting the main 105 keys to work.

Some of the Fn buttons work, some don't. I'm still wading through ways to get these to work, but they're not super-high on my priority list. If you find ways, feel free to post :-)....

Screen Buttons. The D-pad will work, but by default maps to weird values. Add

setkeycodes 6f 108 
setkeycodes 71 103 
setkeycodes 6e 105 
setkeycodes 6d 106 

to /etc/rc.local to make the D-pad work like your keyboard arrow keys. The middle button is 'Enter'

The other buttons also work. I have not mapped them to anything specific yet, but in a real terminal (no X environment), you can use the showkey command and setkeycodes to map the other 4 buttons to whatever you want. More instructions on this will follow once I decide what I want to use these 4 buttons for