Difference between revisions of "Installing Arch Linux on a ThinkPad X40"

From ThinkWiki
Jump to: navigation, search
(←Created page with 'Some notes to get Arch Linux running on a Thinkpad X40. = Preface = I downloaded the FTP installation CD on http://www.archlinux.org/ = Wireless = My main concern was ...')
 
 
(27 intermediate revisions by one other user not shown)
Line 1: Line 1:
Some notes to get Arch Linux running on a Thinkpad X40.
+
Some notes to get [[:Category:Arch|Arch]] Linux running on a Thinkpad {{X40}}.
 +
 
 +
{{Todo|Not fnished yet. I'm documenting the installation process as it goes}}
  
 
= Preface =
 
= Preface =
Line 6: Line 8:
  
 
= Wireless =
 
= Wireless =
 +
 +
== Atheros-based ==
  
 
My main concern was getting the WIFI to work. As the downloaded ISO also
 
My main concern was getting the WIFI to work. As the downloaded ISO also
Line 13: Line 17:
  
 
I installed madwifi and madwifi-utils.
 
I installed madwifi and madwifi-utils.
In the modules section of /etc/rc.conf I banged the ath5k module, disabling
+
In the modules section of {{path|/etc/rc.conf}} I banged the ath5k module, disabling
 
it.
 
it.
With ath5k not banged in /etc/rc.conf the card showed up as wlan0,
+
With ath5k not banged the card showed up as wlan0,
 
associated correctly with the AP, but didn't get a DHCP lease. Even with
 
associated correctly with the AP, but didn't get a DHCP lease. Even with
 
manually setting the IP and adding the default route, I couldn't ping the AP.
 
manually setting the IP and adding the default route, I couldn't ping the AP.
Line 21: Line 25:
 
After banging ath5k, the wireless card shows up as ath0. Associating works,
 
After banging ath5k, the wireless card shows up as ath0. Associating works,
 
DHCP doesn't time out. :)
 
DHCP doesn't time out. :)
 +
 +
== Intel PRO/Wireless 2200BG  ==
 +
 +
dmesg should mention the ipw2200 card was detected. To get this running, you will need to do
 +
 +
  {{cmdroot|pacman -S ipw2200-fw}}
 +
 +
and add ipw2200 to the MODULES variable in your /etc/rc.conf. Reboot to get the module initialized.
 +
 +
= Power Management =
 +
 +
The two most important factors of a mobile device are battery life and weight. I'm always a bit disgrunted when an advertisement doesn't mention one or either.
 +
 +
Without any powersaving installations the 8cell battery still managed for a nice 4 hours.
 +
 +
== CPU Frequency Scaling ==
 +
 +
CPU Frequency Scaling is a technology primarily for notebooks that enables the OS to scale the CPU speed to system and/or power use.
 +
 +
I simply followed the following instructions: http://wiki.archlinux.org/index.php/Cpufrequtils
 +
 +
== Suspend ==
 +
 +
I tried pm-utils. {{footnote|2}}
 +
 +
  {{cmdroot|pacman -S pm-utils}}
 +
 +
Add {{bootparm|acpi_sleep|s3_bios}} to the file {{path|/boot/grub/menu.lst}} as kernel option.
 +
 +
I added following modules to the {{path|/etc/pm/config.d/config}} file in the order they are dependant of eachother. The last ones depend on the first modules.
 +
 +
  SUSPEND_MODULES="wlan_wep wlan_scan_sta ath_rate_sample ath_pci wlan ath_hal"
 +
 +
But suspending seems to work even without this.
 +
 +
If the backlight is not working when resuming from suspend, the following might fix it [http://bbs.archlinux.org/viewtopic.php?id=61558]:
 +
 +
  #!/bin/bash                                                                   
 +
  case $1 in
 +
    suspend)
 +
        ;;
 +
    resume)
 +
        chvt 1
 +
        vbetool post &
 +
        sleep 1
 +
        kill $!
 +
        chvt 7
 +
    ;;
 +
  esac
 +
 +
Put the script in {{path|/etc/pm/sleep.d/}}. The changing of the virtual terminals with chvt is used to avoid a garbled screen after invoking vbetool in X.
 +
 +
== Hibernate ==
 +
 +
To hibernate, you can simply use pm-utils too. It provides the pm-hibernate program.
 +
Only add the resume drive to the kernel line in {{path|/boot/grub/menu.lst}}:
 +
 +
  {{bootparm|resume|/dev/sda2}}
 +
 +
The drive assigned is the swap partition. The swap partition should be at least big enough to hold your RAM data.
 +
 +
I also needed to add the ''resume'' hook to the file {{path|/etc/mkinitcpio.conf}} [http://bbs.archlinux.org/viewtopic.php?pid=718892]. Then recompile the kernel:
 +
 +
  mkinitcpio -p kernel26
 +
 +
=== Enable suspend/hibernate buttons ===
 +
 +
To get the suspend keycombo (fn+f4 and fn+f12) to work, install xbindkeys:
 +
 +
  {{cmdroot|pacman -S xbindkeys}}
 +
 +
And place the following in ~/.xbindkeysrc
 +
 +
  "sudo pm-suspend"
 +
  c:223
 +
  "sudo pm-hibernate"
 +
  c:165
 +
 
 +
The keycode you can find out by running ''xev'' and looking for the appropriate keycode.
 +
 +
Adding {{path|xbindkeys}} to a startup script of your windowmanager makesthe keys active. As the name suggests, xbindkeys only works in X.
  
 
= Xorg =
 
= Xorg =
Line 26: Line 111:
 
Installed xorg with
 
Installed xorg with
  
     pacman -S xorg
+
     {{cmdroot|pacman -S xorg}}
  
 
Then generated the xorg.cong file with
 
Then generated the xorg.cong file with
  
     hwd -xa
+
     {{cmdroot|hwd -xa}}
  
 
(I know, risky ;))
 
(I know, risky ;))
Line 36: Line 121:
 
Looked good, but X didn't start with this (couldn't find display).
 
Looked good, but X didn't start with this (couldn't find display).
 
I installed the xf86-video-intel and changed the display driver from i810 to
 
I installed the xf86-video-intel and changed the display driver from i810 to
intel:
+
intel in {{path|/etc/X11/xorg.conf}}:
  
 
     Section "Device"
 
     Section "Device"
Line 47: Line 132:
  
 
== Getting the back/forward special keys to work ==
 
== Getting the back/forward special keys to work ==
http://www.thinkwiki.org/wiki/Installing_Ubuntu_7.04_(Feisty_Fawn)_on_a_ThinkPad_X40
 
  
Add the following to your .Xmodmap
+
 
 +
Add the following to your {{path|~/.Xmodmap}} {{footnote|1}}
 
     keycode 77 = Num_Lock
 
     keycode 77 = Num_Lock
 
     keycode 234 = XF86Back
 
     keycode 234 = XF86Back
Line 55: Line 140:
  
 
== Enabling scrolling with middle mouse button ==
 
== Enabling scrolling with middle mouse button ==
http://www.thinkwiki.org/wiki/Installing_Ubuntu_7.04_(Feisty_Fawn)_on_a_ThinkPad_X40
 
  
Add the following to your /etc/X11/xorg.conf, to the PS/2 mouse section
+
Add the following to your {{path|/etc/X11/xorg.conf}}, to the PS/2 mouse section {{footnote|1}}
 
     Option "EmulateWheel" "true"
 
     Option "EmulateWheel" "true"
 
     Option "EmulateWheelButton" "2"
 
     Option "EmulateWheelButton" "2"
 +
 +
= Postface =
 +
 +
Don't forget to run [http://wiki.archlinux.org/index.php/ALSA]
 +
  {{cmdroot|alsaconf}}
 +
 +
to get the sound to work properly.
 +
 +
{{footnotes|
 +
#[[Installing_Ubuntu_7.04_(Feisty_Fawn)_on_a_ThinkPad_X40]]
 +
#[http://wiki.archlinux.org/index.php/Pm-utils pm-utils]
 +
}}

Latest revision as of 22:04, 3 July 2010

Some notes to get Arch Linux running on a Thinkpad X40.

TODO
Not fnished yet. I'm documenting the installation process as it goes

Preface

I downloaded the FTP installation CD on http://www.archlinux.org/

Wireless

Atheros-based

My main concern was getting the WIFI to work. As the downloaded ISO also functions as a livecd, I tried to get it up and running with that. Without success. I found the answer to my question here: http://bbs.archlinux.org/viewtopic.php?pid=482359

I installed madwifi and madwifi-utils. In the modules section of /etc/rc.conf I banged the ath5k module, disabling it. With ath5k not banged the card showed up as wlan0, associated correctly with the AP, but didn't get a DHCP lease. Even with manually setting the IP and adding the default route, I couldn't ping the AP.

After banging ath5k, the wireless card shows up as ath0. Associating works, DHCP doesn't time out. :)

Intel PRO/Wireless 2200BG

dmesg should mention the ipw2200 card was detected. To get this running, you will need to do

 # pacman -S ipw2200-fw

and add ipw2200 to the MODULES variable in your /etc/rc.conf. Reboot to get the module initialized.

Power Management

The two most important factors of a mobile device are battery life and weight. I'm always a bit disgrunted when an advertisement doesn't mention one or either.

Without any powersaving installations the 8cell battery still managed for a nice 4 hours.

CPU Frequency Scaling

CPU Frequency Scaling is a technology primarily for notebooks that enables the OS to scale the CPU speed to system and/or power use.

I simply followed the following instructions: http://wiki.archlinux.org/index.php/Cpufrequtils

Suspend

I tried pm-utils. 2

 # pacman -S pm-utils

Add acpi_sleep=s3_bios to the file /boot/grub/menu.lst as kernel option.

I added following modules to the /etc/pm/config.d/config file in the order they are dependant of eachother. The last ones depend on the first modules.

 SUSPEND_MODULES="wlan_wep wlan_scan_sta ath_rate_sample ath_pci wlan ath_hal"

But suspending seems to work even without this.

If the backlight is not working when resuming from suspend, the following might fix it [1]:

 #!/bin/bash                                                                     
 case $1 in
   suspend)
       ;;
   resume)
       chvt 1
       vbetool post &
       sleep 1
       kill $!
       chvt 7
   ;;
 esac

Put the script in /etc/pm/sleep.d/. The changing of the virtual terminals with chvt is used to avoid a garbled screen after invoking vbetool in X.

Hibernate

To hibernate, you can simply use pm-utils too. It provides the pm-hibernate program. Only add the resume drive to the kernel line in /boot/grub/menu.lst:

 resume=/dev/sda2

The drive assigned is the swap partition. The swap partition should be at least big enough to hold your RAM data.

I also needed to add the resume hook to the file /etc/mkinitcpio.conf [2]. Then recompile the kernel:

 mkinitcpio -p kernel26

Enable suspend/hibernate buttons

To get the suspend keycombo (fn+f4 and fn+f12) to work, install xbindkeys:

 # pacman -S xbindkeys

And place the following in ~/.xbindkeysrc

 "sudo pm-suspend"
 c:223
 "sudo pm-hibernate"
 c:165
 

The keycode you can find out by running xev and looking for the appropriate keycode.

Adding xbindkeys to a startup script of your windowmanager makesthe keys active. As the name suggests, xbindkeys only works in X.

Xorg

Installed xorg with

   # pacman -S xorg

Then generated the xorg.cong file with

   # hwd -xa

(I know, risky ;))

Looked good, but X didn't start with this (couldn't find display). I installed the xf86-video-intel and changed the display driver from i810 to intel in /etc/X11/xorg.conf:

   Section "Device"
           Identifier  "Card0"
           Driver      "intel"
           VendorName  "All"
           BoardName   "All"
   EndSection


Getting the back/forward special keys to work

Add the following to your ~/.Xmodmap 1

   keycode 77 = Num_Lock
   keycode 234 = XF86Back
   keycode 233 = XF86Forward

Enabling scrolling with middle mouse button

Add the following to your /etc/X11/xorg.conf, to the PS/2 mouse section 1

   Option "EmulateWheel" "true"
   Option "EmulateWheelButton" "2"

Postface

Don't forget to run [3]

 # alsaconf

to get the sound to work properly.


FOOTNOTES [Δ]