Installing Ubuntu Intrepid Ibex (8.10) on an X301

From ThinkWiki
Revision as of 03:59, 31 October 2008 by Blk (Talk | contribs) (Boot time: readahead)
Jump to: navigation, search

Please improve on this preliminary effort.

Overview

Undoubtedly, this post will age quickly as 8.10 nears final release. Some sections requiring quirks are clearly marked

Keyboard

pretty much all of the fn+... keys work (not all tested yet) tested: lock screen, brightness, sleep, hibernation, battery status, thinklight

Ethernet

The current 8.10 beta doesn't ship with the e1000e driver as of the time of publishing the kernel still contained a bug which could brick the card. Updating the kernel helps - THIS IS ALREADY FIXED UPSTREAM - so any later release than the beta will most probably work.

Wireless

The Ubuntu 8.10 Kernel (2.6.27) ships with support for the IWL5100 (iwlagn driver)

Fan

Works fine. It is spinning lightly almost all the time, but acceptable (like in windows)

Power Mgmt

Seems to work fine. The gnome power manager reports ~3h30 which sounds about right. The [Fn] + [F3] combination even causes the applet to pop up info :)

Display

Works fine OOB

Suspend and Hibernate

Closing the lid puts the machine to sleep, i often managed to resume from ram but i also got frozen (mouse moveable but switching to console doesn't work, screen remains black except for the pointer (i have a black screensaver)) - caution here - The Installing_Debian_(stable)_on_an_X300#Suspend_.26_Hibernate article suggests removing the e1000e module which i haven't tried but may help.

-suspend works for me with no problems, but hibernation is broken (64 bit 8.10 beta)

Sound

Works out of the box on the generic kernel, i've run into some trouble with my custom kernel - feel free to report on what i'm missing. alsamixer reports the Conexant chip being used so i've selected that one in the snd-hda-intel driver (selecting them all didn't help either)

i haven't extensively tested this feature untested remain:

  • usage with a sound server (esd)
  • microphone
  • headphone

-works correct so far with pulseaudio

-headphone port works


Camera

works fine in ekiga (green LED lights up as well)

External Displays

vga port works as expected. you can activate it through xrandr or the screen resolution preferences.

with xrandr HDMI-1 shows up as well, but i couldn't test it yet (no adaptor/displayport device)

untested:

  • displayport

Compiz / 3D Acceleration

Works OOB, requires p

Boot time

  • 12sec from power to GRUB
  • 22sec to GDM, 18sec with tweaked readahead
  • 29sec from GDM into fully loaded session, 28sec with readahead (seems awfully slow to me.. fluxbox takes like 2sec..)

Improvements

Concurent loading

edit /etc/init.d/rc set CONCURRENCY from none to shell

CONCURRENCY=shell

Readahead

install readahead

sudo apt-get install readahead

profile your GNOME login (instructions: [1], then filter out all files under 100kb (guessed number, feel free to experiment). i filtered out small files since access times on SSD is very good, throughput not. The linked page states about loading in Xsession.d, forget about that and put your profiled files in /etc/readahead/boot and /etc/readahead/desktop. This will cause the boot process to profit and the desktop-files to load earlier (before X starts) to create a boot file, append "profile" to the GRUB prompt

filter out the small files boot file:

cat boot | xargs -i ls -lk {} | sort -rn -k +5 | awk "{print(\$8)}" > boot.sorted

now delete any line below the wanted threshold from the sorted file (i took "dash" as masker with 104kb) since the boot file is ordered, we want to keep that order

cat boot | while read line; do grep "$line" boot.sorted >> boot.new; done;

same for the desktop file:

cat desktop | xargs -i ls -lk {} | sort -rn -k +5 | awk "{print(\$8)}" > desktop.sorted

remove lines from sorted file...

cat desktop | while read line; do grep "$line" desktop.sorted >> desktop.new; done;

Fingerprint Reader

Doesn't currently work as it's an AthenTec and not a Thompson chip.

Minimalistic installation instructions

The system you are installing when following these instructions will be a good starting point if you want a clean ubuntu system without all the bloat (which you may of course add yourself). For a simple installation just download and install the desktop version of ubuntu 8.10 (beta)

Boot from the Ubuntu Server AMD64 Disc (32bit also works, but what a waste) select Install Ubuntu Server

Choose language and country Select Keyboard layout

Don't worry about network interface right now.. (only ubuntu 8.10 Beta) choose your hostname then username and password change your proxy settings

At the software selection select:

  • OpenSSH server

you might want the Samba Server if you're sharing files on a mixed network

wait for the install to complete (5 min)

Reboot without the CD

login to you new system and switch to root

sudo -s

if you're using the beta and your network, download a newer kernel (amd64) from (this will require a second machine or other OS if you have)

http://packages.ubuntu.com/intrepid/linux-image-2.6.27-7-generic

copy it to usb stick

on the X301 mount usb stick with

mkdir /mnt/usb && mount /dev/sdb /mnt/usb

install kernel with

dpkg -i /mnt/usb/linux-image-2.6.27-7-generic_2.6.27-7.12_amd64.deb
umount /mnt/usb
reboot

if networking still doesn't work (try with ping google.com) edit the interfaces

nano /etc/network/interfaces

and add the line

iface eth0 inet dhcp

use [CTRL]+[X], [Y] to save and quite and start the interface

ifup eth0

it should now be ok...

now let's loose some fat:

apt-get remove --purge linux-image-server linux-image-2.6.27-4-server
apt-get remove --purge apparmor update-motd landscape-common installation-report \
libapparmor* libgpm2 memtest86+ ppp pppconfig pppoeconf reiserfsprogs \
strace tasksel tasksel-data ubuntu-minimal ubuntu-serverguide

rm -rf /var/log/landscape

and update the system with the newest upstream package catalog:

apt-get update

install sound:

apt-get install alsa

..and X

apt-get install xserver-xorg-video-intel xserver-xorg-input-mouse xserver-xorg-input-kbd xserver-xorg-input-synaptics

gdm:

apt-get install gnome-session gdm

and the network manager:

apt-get install network-manager-gnome

now upgrade the base system with:

apt-get dist-upgrade


if you added the line to fix networking, it is now time to remove it again from /etc/network/interfaces as NetworkManager will do that for us

reboot the machine

reboot

gdm should now appear and you may log in to X/Gnome

start synaptic from the gnome menu, you might want to add additional filters like

  • Installed: check only "Installed"
  • Upgradable: check only "Upgradable" (shows also upgradable packages which aren't upgraded to a new upstream version (i.e. only featuring ubuntu-specific patches)
  • Residual Config: "Residual config"
  • Orphaned: check only "Orphaned" (install deborphan package to use this)
  • Autoremove: check only "Automatic removable"

if you know you'll need one of the following packages, don't delete it or just reinstall it later on.. they should all be safe to delete (at least my system still works)

select the "Installed" filter and remove (right click, then mark for complete removal):

  • alacarte
  • app-install-data
  • aptitude
  • apt-xapian-index
  • cupsys
  • ed
  • esound-clients
  • gnome-user-guide
  • gnome-utils
  • libbeagle1
  • libmbca0
  • ltrace
  • mobile-broadband-provider-info
  • mtr-tiny
  • netcat netcat-traditional
  • oss-compat
  • parted popularity-contest
  • python-beagle python-debian
  • python-gnupginterface
  • python-openssl
  • python-pyopenssl
  • python-software-properties
  • python-twisted-bin
  • python-twisted-core
  • python-xapian
  • python-zopeinterface
  • radeontool
  • rsync
  • tcpd
  • tcpdump
  • ufw
  • unattended-upgrades
  • update-manager-core
  • vim-tiny
  • xdg-user-dirs
  • xserver-xorg-input-all
  • xserver-xorg-input-vmmouse
  • xserver-xorg-input-wacom

right now the system is pretty much stripped down and we can build up from here :)


some things i got from the missing-recommands tabs:

  • acpid
  • deborphan
  • evince
  • gnome-screensaver
  • gnome-system-tools
  • vim

once deborphan is installed: delete anything from the custom filter orphaned

what i also installed:

  • evolution
  • firefox
  • mesa-utils (for glxgears)
  • seahorse
  • totem-gstreamer
  • mozilla-plugin-gnash

what i still removed:

  • gnome-pilot
  • gnome-pilot-conduits

You may now want to install following packages:

  • gnome-terminal
  • gedit
  • gcalctool
  • cpufrequtils
  • powertop
  • system-config-printer-gnome (+ your printer driver)
  • linux-firmware (or download the firmware yourself from linuxintelwireless.com, or extract iwlan-5000-1.ucode from that package and put it into /lib/firmware)
  • libdvdcss from videolan.org/libdvdcss (read legal advices)

And remove those:

  • libv4l-0
  • libgtksourceview-common
  • libgtksourceview1.0-0
  • python-gnome2-desktop
  • gnome-app-install

Compiling custom fast-boot-patched kernel

install these packages:

  • libncurses5-dev
  • make

Get most recent 2.6.27 kernel from [[2]] untar it..

sudo -s
cd /usr/src
tar xjf /home/foo/downloads/linux-2.6.27.tar.bz2
ln -s linux-2.6.27 linux
cd linux

apply the Fastboot patch (there have been arguments about the implementation of this but it works fine for me)

patch -p1 < fastboot_2_6_27.diff

Get the kernel .config file and put it inside the root of your kernel source. This will make a good start. Not that i did not include support for IPv6, firewall and PCMCIA so you'll need to add those if wanted.

What's NOT working:

  • UUID-root partition

If sound is not working on your user (i.e. sudo alsamixer shows a device while just alsamixer (as your default user) doesen't) you'll need to

adduser youruser audio

log out and back into X and you'll have sound.

if you want to change the configuration:

make menuconfig

build the kernel:

make -j3

install kernel and modules:

make install
make modules_install

..adapt your /etc/grub/menu.lst file to boot the new kernel make sure to switch the root=UUID=.. for root=/dev/sda1 or you'll get a kernel panic when booting (can someone explain this to me why UUID won't work (because of not using an initrd?)) also remove the initrd line.

mine looks like this:

title           Ubuntu (development branch), kernel 2.6.27
root            (hd0,0)
kernel          /boot/vmlinuz-2.6.27 root=/dev/sda1 usbcore.autosuspend=1 ro quiet
quiet

Compiling intel xorg drivers

With my shiny new kernel i wasn't able to start X as exa was failing.. so after some googling i recompiled the driver. - this will hopefully be fixed before the final release - (it is fixed in the 2.5.0 driver, ubuntu currently has 2.4.1)

While this will work perfectly fine with the light new kernel, the generic ubuntu kernel displays ugly artifacts in firefox and gnome-terminal. So i'd rather wait if you're considering using the generic kernel. You revert these changes by reinstalling xserver-xorg-video-intel and libdrm2 with

apt-get install --reinstall xserver-xorg-video-intel libdrm2 libdrm-dev

Install these packages from apt

  • automake
  • xutils-dev
  • libtool
  • xserver-xorg-dev
  • xorg-dev
  • pkg-config
  • mesa-common-dev
  • (libdrm-dev) - currently also has to be compiled from source because of incompatibilities with intel's 2.5.0 driver

libdrm

Get the source from git:

git clone git://anongit.freedesktop.org/git/mesa/drm drm
cd drm
./autogen
./configure --prefix=/usr

now edit the "libtool" file and comment out the line with "directory not ending" aswell as the line before it. (won't install to /usr otherwise, only /usr/local)

make -j3
sudo make install

xf86-video-intel

git clone git://git.freedesktop.org/git/xorg/driver/xf86-video-intel/ xf86-video-intel
cd xf86-video-intel
./autogen
./configure --prefix=/usr
make -j3
sudo make install

Other tweaks

Don't start the rsync daemon at boot-time:

sudo update-rc.d -f rsync remove

Power-saving settings: insert these lines into /etc/sysctl.conf

vm.dirty_writeback_centisecs=1500

If you have lots of RAM (4Gb):

vm.swappiness=0

with 2Gb i recommand a value of 40 instead of 0

Switch getty for mingetty

Install mingetty

apt-get install mingetty

edit /etc/event.d/tty1 through 6 and change the last line to

exec /sbin/mingetty tty1

(you could add the --noclear switch on tty1 to leave the boot-messages) also comment out the lines starting with

start on ...

if you do not wish to span ttyX (in my case 4..6)

edit /etc/default/console-setup and change

ACTIVE_CONSOLES="/dev/tty[1-3]"

in my case 3, since i never need more than 3 TTYs

Credits

Article skeleton from the Ubuntu 8.10 on X200 article

Article --Blk 20:09, 21 October 2008 (CEST)