Theme SliTaz

Screenshot "Helvetic Theme" for SliTaz

Screenshot "Helvetic Theme" for SliTaz

Un thème pour SliTaz

Publié dans Non classé | Un commentaire

Install SliTaz 3.0 on a Thinkpad X40

Install SliTaz 3.0

display

networking

power management

extensions

special keys

miscellaneous

top

booting SliTaz

boot SliTaz from either an USB key or a CD-Rom.

Add :

slitaz vga=788

to boot parameters to have a 37×100 console.

after a quick init, Slitaz is up and running, make a Hard Drive install and then reboot.

top

xorg setup

for a noticeable improvement in speed and visual appearance, I suggest to switch the display driver from vesa to intel:

1. add evdev support

evdev is an input driver for the xorg server, utilizing the generic input event layer of the Linux kernel.

switch to the root user, and enter:

# tazpkg get-install xorg-xf86-input-evdev

If you want another keyboard layout than ‘us’ then make a copy of 10-keymap.fdi in /etc/hal/fdi:

# mkdir -p /etc/hal/fdi/policy/10osvendor/

# cp -a /usr/share/hal/fdi/policy/10osvendor/10-keymap.fdi /etc/hal/fdi/policy/10osvendor/

now you can just edit 10-xinput-configuration.fdi in /etc and change the ‘us’ keyboard layout to your own, such as Switzerland (ch):

# vi /etc/hal/fdi/policy/10osvendor/10-keymap.fdi

search the following line:

<merge key="input.kbd.layout" type=string>us</merge>

and change the ‘us’ layout or other settings to your liking, then restart hal:

# /etc/init.d/hald restart

2. add intel driver

load the tazx utility

# tazx

select xorg install or reconfigure xorg then the intel driver.

3. load required kernel modules

operating system support for allocating system memory for video use is required in order to use the intel driver. This is achieved with « agpgart » and « intel-agp » modules. When system boot up you need to have the following kernel modules loaded: agpgart, intel-agp, drm and i915.

get the linux-agp package

# tazpkg get-install linux-agp

and load the intel-agp module:

# modprobe intel-agp

we need to make these changes permanent, edit /etc/rcS.conf and search for:

LOAD_MODULES=" ...

and add ‘intel-agp’ to the list:

LOAD_MODULES="intel-agp ...

or add ‘intel-agp’ in the SliTaz Control Box under Initialization in “Load Modules”.

4. fix the dri directory

The file /dev/dri should be a directory and not a file.

# rm /dev/dri

# mkdir /dev/dri/

then exit from your current session to restart X and check your new X setup.

top

trackpoint

works out of the box.

top

external screen

untested.

top

framebuffer

for a higher resolution console screen, edit /boot/grub/menu.lst and add vga=771 (37×100 screen) or vga=773 (48×128) at the end of the boot line:

kernel /boot/vmlinuz-2.6.30.6-slitaz root=/dev/xxxy vga=788

top

wired lan

works out of the box.

top

wifi

the hardware was detected during install and the corresponding module loaded at boot time. Some types of wifi card also need specific firmware. As firmware is not free software, it is not distributed as part of SliTaz, it may be downloaded from the vendor’s website. SliTaz will do it for you:

# tazhw detect-pci --get-firmware

top

bluetooth

install linux-bluetooth + bluez packages:

# tazpkg get-install linux-bluetooth

# tazpkg get-install bluez

load module:

# modprobe btusb

start bluetooth daemon:

# bluetoothd

top

IrDA

untested

top

modem

non-free linux driver for Conexant chipsets from Linuxant should work, but as free software has my preference, I bought a second-hand true modem instead.

top

power management

1. enable laptop_mode

when laptop mode is enabled, the kernel will try to be smart about when to do disk I/O. It gives as much time as possible to be in a low power state. If mode is disabled if value is set to zero (0). To enable mode use non zero value such as 5:

# echo 5 > /proc/sys/vm/laptop_mode

2. enable CPU Frequency control and ondemand-governor

with CPU Frequency Control enabled, the operating system controls the processor speed and can dynamically change the tradeoff between power and performance all the time.

install linux-cpufreq

# tazpkg get-install linux-cpufreq

load module:

# modprobe acpi_cpufreq

the governor that has the best behavior on current PC processors is the « ondemand » governor:

# echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

top

suspend

install pm-utils:

# tazpkg get-install pm-utils

there’s a bug in pm-utils actually: when a laptop with an intel card is suspended to RAM, backlight is not restored upon resume. Here is a workaround:

edit /usr/lib/pm-utils/sleep.d/98smart-kernel-video and add return 1 in have have_smart_intel:

have_smart_intel()
{
return 1
# currently, intel kernel modesetting is not quite smart enough

test suspend to RAM:

# pm-suspend

NOTE: CONFIG_ACPI_BUTTON is not set in the kernel, so closing the lid will not suspend.

top

hibernate

a swap partition with at least 500mB size is required.

add this partition to boot parameters, edit /boot/grub/menu.lst and add resume={name of swap partition}

title   SliTaz GNU/Linux (stable-3.0) (Kernel vmlinuz-2.6.30.6-slitaz)
        root (hd0,2)
        kernel /boot/vmlinuz-2.6.29.3-slitaz root=/dev/hda6 idebus=66 vga=0x314 resume=/dev/hda2

test hibernate

# pm-hibernate

top

USB

mouse or USB key works out of the box.

top

pcmcia

works out of the box.

top

SD card

Install linux-mmc:

# tazpkg get-install linux-mmc

load the sdhci module:

# modprobe sdhci

and mount your SD card.

top

ultrabay

unknown (don’t have an spare ultrabay to make tests).

top

special keys

1. load thinkpad_acpi

thinkpad-acpi is a Linux ACPI driver for the ThinkPad laptops. It aims to support various features of these laptops which are accessible through the ACPI framework but not otherwise supported by the generic Linux ACPI drivers, like Fn key combinations, ThinkLight, UltraBay eject, temperature sensors, LCD brightness control.

# tazpkg get-install linux-acpi
# modprobe thinkpad_acpi

2. key bindings and openbox

add the following sequences in .config/openbox/rc.xml (current user) and /etc/xdg/openbox/rc.xml (future users) at the end of the keyboard section. Edit both files, search for </keyboard> and insert:

Access IBM key:

untested.

Fn+F3 lock:
<keybind key="XF86ScreenSaver">
	<action name="Execute">
		<startupnotify>
			<enabled>true</enabled>
			<name>Lock</name>
		</startupnotify>
		<command>
			xset dpms force suspend
		</command>
	</action>
</keybind>

you’ll need to install the xorg-xset package:

# tazpkg get-install xorg-xset

Fn+F4 suspend:
<keybind key="XF86Sleep">
	<action name="Execute">
		<startupnotify>
			<enabled>true</enabled>
			<name>Suspend</name>
		</startupnotify>
		<command>
			dbus-send --system --print-reply --dest=org.freedesktop.Hal
			/org/freedesktop/Hal/devices/computer
			org.freedesktop.Hal.Device.SystemPowerManagement.Suspend int32:0
		</command>
	</action>
</keybind>
Fn+F5 switch radio:
<keybind key="XF86Phone">
	<action name="Execute">
		<startupnotify>
			<enabled>true</enabled>
			<name>Display</name>
		</startupnotify>
		<command>
			sudo hwradio -ck
		</command>
	</action>
</keybind>

some buttons work in Xorg and others not (e.g. Fn+F5). The reason for this is that Xorg is limited to 255 different key codes, and some keys are mapped to key codes that are out of range for Xorg. The Xorg developers are aware of this issue and plan to fix it in Xorg 1.8. A work around for this is to change the hal config file such that for instance the Fn-F5 key no longer maps to radio but to another one.

edit /etc/hal/fdi/information/10freedesktop/30-keymap-module-thinkpad-acpi.fdi and change radio by phone:

<deviceinfo version="0.2">
  <device>
    <!-- These are buttons synthesized in the thinkpad-acpi kernel module -->
    <match key="input.product" string="ThinkPad Extra Buttons">
      <match key="/org/freedesktop/Hal/devices/computer:system.hardware.vendor" prefix="IBM">
        <append key="input.keymap.data" type="strlist">0x01:battery</append> <!-- Fn+F2 battery -->
        <append key="input.keymap.data" type="strlist">0x02:screenlock</append> <!-- Fn+F3 lock -->
        <append key="input.keymap.data" type="strlist">0x03:sleep</append> <!-- Fn+F4 suspend -->
        <append key="input.keymap.data" type="strlist">0x04:phone</append> <!-- Fn+F5 switch radio -->

then download the hwradio script, uncompress it and copy it in /usr/bin/hwradio,

hwradio must be run as root to access hardware. Install sudo:

# tazpkg get-install sudo

and edit the sudoers file, to give access rights to regular users:

# visudo

#
# This file MUST be edited with the 'visudo' command as root.
#
# See the man page for details on how to write a sudoers file.
#

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root	ALL=(ALL) ALL
ALL	ALL = NOPASSWD: /usr/bin/hwradio
Fn+F7 switch video output device:

untested, but should work.

<keybind key="XF86Display">
	<action name="Execute">
		<startupnotify>
			<enabled>true</enabled>
			<name>Display</name>
		</startupnotify>
		<command>
			hwscreen -t
		</command>
	</action>
</keybind>

then download the hwscreen script, uncompress it and move it in /usr/bin/hwscreen.

you’ll need to install the xorg-xrandr package:

# tazpkg get-install xorg-xrandr

Fn+F9 undock

untested (lack of available hardware).

Fn+F12 hibernate:
<keybind key="XF86Standby">
	<action name="Execute">
		<startupnotify>
			<enabled>true</enabled>
			<name>Hibernate</name>
		</startupnotify>
		<command>
			dbus-send --system --print-reply --dest=org.freedesktop.Hal
			/org/freedesktop/Hal/devices/computer
			org.freedesktop.Hal.Device.SystemPowerManagement.Hibernate
		</command>
	</action>
</keybind>
Fn+Space zoom

untested

top

sound

works out of the box.

According to the thinkpad_acpi documentation, ThinkPads have an additional built-in amplifier and muting circuit that drives the speakers. This circuit is under exclusive control of the firmware.

ThinkPads have three special hotkeys to interact with this audio control: volume up, volume down and mute. These hotkeys works if you have the thinkpad_acpi module loaded, you just have to put volume to the max level, remove the sound applet and then control volume via the special keys.

top

backlight

works out of the box if you have the thinkpad_acpi module loaded.

top

thinklight

works out of the box if you have the thinkpad_acpi module loaded.

top

secure chip

untested

top

hdaps

untested

Files:
10-keymap.fdi
30-keymap-module-thinkpad-acpi.fdi
thinkpad.sh
rc.xml
rcS.conf

Last updated on Sat Aug 28 20:28:56 CEST 2010
Publié dans SliTaz | Laisser un commentaire