In this article i talk about how i have setup an Toshiba Satellite A110-178 laptop with Debian (Etch) GNU/Linux. I show how i have fine tune the differents applications so that the laptop runs optimized
Quick links in this article:
* Know troubles
* This still need to test
* Installing Debian Etch
* Setting up Xorg (video card)
* Setting up sound card
* Setting up the touchpad
* Setting up the wireless network card
* Setting up the Ethernet network card
* Setting up the duo core
* Setting up the multi card reader
* CPU scalling
* Hibernation
* Hardware informations
Know troubles:
Some know troubles that need to be are fixed.
* We need to take an decent version of Debian. Otherwise the hardware is not detected.
* Build-in wifi card not work out of the box. See bellow how to fix it.
* Build-in Ethernet card not work out of the box. See bellow how to fix it.
Things still need to test:
A little list with the things that need to be are tested.
* Audio hardware mixing
* 56k modem
* ieee 1394. Have not yet any hardware that work on that type of interface.
* Power saving. Actually the laptop consum to many on battery. Near 1:30, while the laptop could be are running for 3:30 on Microsoft Windows. The proccessor scalling is already done, see bellow, so that the laptop stay up for 2:30
* Hibernation
Installing Debian Etch:
We need to get the Etch installer (the testing release). The Sarge release does not reconize any stuff in the laptop. We can get it of here: http://www.debian.org/devel/debian-installer/
We need to provide an boot parameter. Otherwise the cd-rom is not detected during the install and we can not continue.
When the cd rom is booted, give the follow boot param:
install libata.atapi_enable=1
The build-in Ethernet network and the wifi card are not reconized during the installation. So if you take the netinst, you probably get some troubles when you need to download the required packages. Like no one of the network cards will work. These little troubles can be are avoid when you take the whole set of install cd's or if you take another external pcmcia network card. If you did the install of the whole cd of cd's then you can download the needed files on another computer and with an USB key put it on the laptop. So that you can install the both network cards.
The rest of the installation goes like normal. Take the debian install instructions if you need these.
After an fresh install i get some message at boot time and the same appair in dmesg:
libata: Unknown parameter `atapi_enable'
ata_piix: Unknown symbol ata_scsi_ioctl
ata_piix: Unknown symbol ata_std_bios_param
ata_piix: Unknown symbol ata_tf_read
ata_piix: Unknown symbol ata_tf_load
ata_piix: Unknown symbol ata_bmdma_start
ata_piix: Unknown symbol ata_std_postreset
ata_piix: Unknown symbol ata_scsi_device_resume
ata_piix: Unknown symbol ata_scsi_device_suspend
ata_piix: Unknown symbol ata_bmdma_setup
ata_piix: Unknown symbol ata_bmdma_stop
ata_piix: Unknown symbol ata_pci_init_one
ata_piix: Unknown symbol pci_test_config_bits
ata_piix: Unknown symbol ata_exec_command
ata_piix: Unknown symbol ata_pci_device_resume
ata_piix: Unknown symbol ata_pci_device_suspend
ata_piix: Unknown symbol ata_qc_issue_prot
ata_piix: Unknown symbol ata_interrupt
ata_piix: Unknown symbol ata_bmdma_irq_clear
ata_piix: Unknown symbol ata_scsi_slave_config
ata_piix: Unknown symbol ata_std_dev_select
ata_piix: Unknown symbol ata_drive_probe_reset
ata_piix: Unknown symbol ata_port_disable
ata_piix: Unknown symbol ata_bmdma_status
ata_piix: Unknown symbol ata_scsi_queuecmd
ata_piix: Unknown symbol ata_eng_timeout
ata_piix: Unknown symbol ata_port_stop
ata_piix: Unknown symbol ata_check_status
ata_piix: Unknown symbol ata_std_probeinit
ata_piix: Unknown symbol ata_qc_prep
ata_piix: Unknown symbol ata_host_stop
ata_piix: Unknown symbol ata_pci_remove_one
ata_piix: Unknown symbol ata_std_softreset
ata_piix: Unknown symbol ata_port_start
I get these messages with the default kernel. I have install an recenter kernel (2.6.17-2-686) but give the same messages. And it's looks like dma is not enabled:
# hdparm -d /dev/hda
/dev/hda:
using_dma = 0 (off)
If i try to enable it, i get the following error:
# hdparm -d 1 /dev/hda
/dev/hda:
setting using_dma to 1 (on)
HDIO_SET_DMA failed: Operation not permitted
using_dma = 0 (off)
Setting up Xorg (video card):
The video card is autodetected by the installer. Xorg will run fine with this as long you not need good 3D. The 3D acceleration is a bit slow. We not especially need to modify the xorg.conf config file to get the display working. The resolution is also set right by default It can only use 1280x800. But we still need to tweak a bit the '/etx/X11/xorg.conf' file. Like in some games (like 'torcs' for example) i only get an low resolution 640x480 and the other are not avalaible. I have discovered that the cause is that there are only one mode difined for each depth mode. Originally you find some lines like this next one in the '/etc/X11/xorg'.conf config file:
Modes "1280x800"
So i have change it to:
Modes "1280x800" "1280x768" "1200x800" "1152x864" "1152x768" "1024x768" "800x600" "640x480"
And then it work right in the games an i can then select these resolutions.
BTW for an better visual view in the console, when working without X and to better see the messages on screen when booting. I have change the resolution. Edit the file '/boot/menu.lst':
title Debian GNU/Linux, kernel 2.6.17-2-686
root (hd0,5)
kernel /boot/vmlinuz-2.6.17-2-686 root=/dev/sda6 ro acpi=on vga=791
initrd /boot/initrd.img-2.6.17-2-686
savedefault
The interested part here is the 'vga=791'.
Setting up the sound card:
The sound work out of the box. It's sounds good. Need to test if there's need for audio mixing or not.
For the wifi card, we need to make use of the ipw3945.
Setting up the touchpad:
The touchpad mouse i to slow to use in X. We need to jump to many with the fingers. And after an half hour of usage, your finger is out of order. We can change this, we need to add some things in the '/etc/X11/xorg.conf'.
...
Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ImPS/2"
Option "Emulate3Buttons" "true"
EndSection
Section "InputDevice"
Identifier "Synaptics Touchpad"
Driver "synaptics"
Option "SendCoreEvents" "true"
Option "Device" "/dev/psaux"
Option "Protocol" "auto-dev"
Option "HorizScrollDelta" "0"
# For gsynaptics
Option "SHMConfig" "true"
# Disabling tapping
Option "MaxTapTime" "0"
Option "AccelFactor" "1.5"
Option "MinSpeed" "1.0"
Option "MaxSpeed" "2.0"
# Getted of the linux.debian.user on the usenet
Identifier "Synaptics Touchpad"
Driver "synaptics"
Option "SendCoreEvents" "true"
Option "Device" "/dev/psaux"
Option "Protocol" "auto-dev"
Option "Emulate3Buttons" "yes"
Option "LeftEdge" "120"
Option "RightEdge" "835"
Option "TopEdge" "120"
Option "BottomEdge" "650"
Option "FingerLow" "14"
Option "FingerHigh" "15"
Option "MaxTapMove" "110"
Option "VertScrollDelta" "20"
Option "HorizScrollDelta" "0"
Option "MinSpeed" "0.3"
Option "MaxSpeed" "2.5"
Option "MaxTapTime" "0"
Option "AccelFactor" "0.025"
Option "SHMconfig" "true"
EndSection
...
Change the above float's like you like it. The touchpad mouse is a bit fast so, but i like that :-p
Setting up the Wireless wifi:
The wifi card not work out of the box. We need to do somethings to get it working. It's not yet complicated to setup. See also the ipw3945 project site.
Important note: Do not install the ieee80211 of the project site. The kernel i have used had already support for it. When i had install the ieee80211 of the website, that have a bit messed up the whole ieee80211 thing.
apt-get install firmware-ipw3945
We need to install the kernel header and source, otherwise when we want to 'make' ipw3945 we get some message that he have not find the ieee80211 stuff.
aptitude install linux-headers-2.6.17-2-686
Load the ieee80211 modules. We can search it with:
modprobe -l | grep ieee
modprobe ieee80211
Then get the ipw3945 and the ipw3945d files of ipw3945 website and then upack the both:
$ unp ipw3945-1.1.2
$ unp ipw3945d-1.7.22
Make the ipw3945:
$ cd ipw3945-1.1.2
If we want to make use of the monitor mode later, we need to edit the Makefile in the ipw3945 and uncomment an line:
CONFIG_IPW3945_MONITOR=y
$ make
$ cd ..
Make the daemon:
$ cd ipw3945d-1.7.22d
# cp x86/ipw3945d /sbin
Load the driver:
# cd ../ipw3945-1.1.2
# ./load debug=0
Then we see in the console if the driver is been loaded or not:
# ./load debug=0
Unloaded: ieee80211 ieee80211_crypt
Loaded: ieee80211 ipw3945
Loading ipw3945d.ipw3945d - regulatory daemon
Copyright (C) 2005-2006 Intel Corporation. All rights reserved.
version: 1.7.22
Intel PRO/Wireless 3945ABG Network Connection found at:
/sys/bus/pci/drivers/ipw3945/0000:04:00.0
Daemon launched as pid 8178. Exiting.
..done.
We can then check with ifconfig -a to see the adapter. Now left to assign an ip address to the eth2 interface and so. The things now left to do is the same way as with every wireless card. We just need to do an last thing, we need to make in sort that it is easy to start the wireless:
cp ~/Downloads/ipw3945d-1.7.22/ipw3945d-{start,stop} /sbin
chmod u+x /sbin/ipw3945d-{start,stop}
Then as root user you can start the driver with:
# /sbin/ipw3945d-start
And stopping :
# /sbin/ipw3945d-stop
Automatically load the module at boot time:
cp /home/david/Downloads/ipw/ipw3945-1.1.2/ipw3945.ko /lib/modules/$(uname -r)
depmod -a
Create the file /etc/modules.d/ipw3945 and add the following to it:
# echo install ipw3945 /sbin/modprobe --ignore-install ipw3945 ; \
sleep 0.5 ; /sbin/ipw3945d --quiet >> /etc/modules.d/ipw3945
# echo remove ipw3945 /sbin/ipw3945d --kill ; \
/sbin/modprobe -r --ignore-remove ipw3945 >> /etc/modules.d/ipw3945
Add the following to the '/etc/modules':
ipw3945
Setting up the Ethernet Network card:
The Ethernet network card not work out of the box. Get the driver on the website of Realtek and download the 'Linux driver for kernel 2.4.x and 2.6.x'.
After try compile the i got some troubles. After discussing about the trouble on the irc Freenode #debian with <amphi> we had need to change three lines in a file of the source. Because we have an newer kernel and there are some changes in the macro name between the kernel 2.6.11 and 2.6.17. Probably is the modification of the source file not needed in the future. Maybe just check it out or take it in consideration.
Extract the tarball:
tar vzxf r1000_vX.YZ.tgz
cd r1000_vX.YZ
Change these three lines in the file 'src/r1000_n.c' from line 51 to 53 included:
from:
MODULE_PARM (speed, "1-" __MODULE_STRING(MAX_UNITS) "i");
MODULE_PARM (duplex, "1-" __MODULE_STRING(MAX_UNITS) "i");
MODULE_PARM (autoneg, "1-" __MODULE_STRING(MAX_UNITS) "i");
to:
MODULE_PARM_DESC (speed, "1-" __MODULE_STRING(MAX_UNITS) "i");
MODULE_PARM_DESC (duplex, "1-" __MODULE_STRING(MAX_UNITS) "i");
MODULE_PARM_DESC (autoneg, "1-" __MODULE_STRING(MAX_UNITS) "i");
Compile the souce:
# make clean modules
# make
# make install
# depmod -a
Loading the module:
modprobe r1000
Then dmesg shows:
eth3: Identified chip type is 'RTL8101E'.
eth3: r10001.04, the Linux device driver for Realtek Ethernet Controllers at 0x4000, 00:16:d4:2a:fd:9c, IRQ 185
Realtek RTL8139/810x Family Fast Ethernet Network Adapter
Driver version:1.04
Released date:2006/07/07
Link Status:Not Linked
I/O Base:0x4000(I/O port)
IRQ:185
We can check it out with:
# ifconfig -a
You should see an ethx added. Now there is an need to configure these network addapter with ifconfig or with an GUI.
Setting up the duo core:
We need to install the smp kernel package. At the time of writing this, the kernel '2.6.17-2' was available.
aptitude install linux-image-2.6.17-2-686 linux-image-2.6-686-smp
Setting up the multi card reader:
I have only SD cards here, so i have only. Default, the card reader module is not loaded and we need to make in sort that these modules are loaded at boot time.
modprobe sdhci
modprobe mmc_block
We can then easy access that memory card with the 'konqueror' file manager in the media section. Or take whatever tool you usually use.
CPU scalling:
Scalling the processor could be are interesting when the laptop goes on battery. Without take some additional precautions, the laptop consum many power. Because it still leave on the 'max' power. You still use the maximum power of the CPU what pump many power. We want to reduice the speed a bit to save the power consumtion when we are on the battery and to avoid to make the thins to hot. Not that this laptop is hot, but how lower the temp, how slower the fan can be turn and lesser power consumtion. The laptop stay up near 3:30 with another os. If we not setup cpu scalling in Debian, the laptop can only stay up for 1:30. If we setup the cpu scaling it stay for 2:30. What are already many better. To stay the laptop up for longer time, we need to setup the computer so that the hdd spin down if the hdd is no more used after an amount of time
modprobe speedstep_centrino
Finding the modules can be done in the following way:
# modprobe -l | grep cpufreq
/lib/modules/2.6.17-2-686/kernel/drivers/cpufreq/freq_table.ko
/lib/modules/2.6.17-2-686/kernel/drivers/cpufreq/cpufreq_userspace.ko
/lib/modules/2.6.17-2-686/kernel/drivers/cpufreq/cpufreq_stats.ko
/lib/modules/2.6.17-2-686/kernel/drivers/cpufreq/cpufreq_powersave.ko
/lib/modules/2.6.17-2-686/kernel/drivers/cpufreq/cpufreq_ondemand.ko
/lib/modules/2.6.17-2-686/kernel/drivers/cpufreq/cpufreq_conservative.ko
/lib/modules/2.6.17-2-686/kernel/arch/i386/kernel/cpu/cpufreq/speedstep-smi.ko
/lib/modules/2.6.17-2-686/kernel/arch/i386/kernel/cpu/cpufreq/speedstep-lib.ko
/lib/modules/2.6.17-2-686/kernel/arch/i386/kernel/cpu/cpufreq/speedstep-ich.ko
/lib/modules/2.6.17-2-686/kernel/arch/i386/kernel/cpu/cpufreq/powernow-k8.ko
/lib/modules/2.6.17-2-686/kernel/arch/i386/kernel/cpu/cpufreq/powernow-k7.ko
/lib/modules/2.6.17-2-686/kernel/arch/i386/kernel/cpu/cpufreq/powernow-k6.ko
/lib/modules/2.6.17-2-686/kernel/arch/i386/kernel/cpu/cpufreq/p4-clockmod.ko
/lib/modules/2.6.17-2-686/kernel/arch/i386/kernel/cpu/cpufreq/longrun.ko
/lib/modules/2.6.17-2-686/kernel/arch/i386/kernel/cpu/cpufreq/gx-suspmod.ko
/lib/modules/2.6.17-2-686/kernel/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.ko
/lib/modules/2.6.17-2-686/kernel/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.ko
/lib/modules/2.6.17-2-686/kernel/arch/i386/kernel/cpu/cpufreq/cpufreq-nforce2.ko
The lines that are interesting are 'cpufreq_* .ko'. Toi take it easy, that's the list of modules we need to load at boot time:
modprobe speedstep_centrino
modprobe cpufreq_ondemand
modprobe cpufreq_userspace
modprobe cpufreq_stats
modprobe cpufreq_powersave
NOTE : It is important to not load all the modules in one line, otherwise modprobe think it are arguments. Add these modules in the '/etc/modules' file so that the modules are loaded at boot time.
We now need to make in sort that these modules are loaded at boot time. Because if you load these modules with modprobe. These are only loaded right now and not reloaded when we reboot. There are differents way to select some modules to load at boot time. I like to show the way with modconf. An little application that need to be are installed. With an little curses bassed text interface you can browse in the modules list and select these you need. If you not know about this little interface, maybe install it and try it out??
aptitude install modconf
Once modconf started as root user. You find there an line with 'kernel/drivers/cpufreq', select it and press enter on it. There you see 6 modules. If there are an '-' just before the description. It mean that the modules is not selected to boot at boot time. Select the module and press enter. And anwer 'yes' to install the module in the kernel. Leave it empty for the argument and press again the enter key. You should get 'Installation succeeded'.
Or you can add these modules names manually to the file '/etc/modules'. If you are not experienced to do it manually; i suggest you to use modconf and then look to the /etc/modules to see the results of it.
We now try to scale a bit the cpu. Just to test if the stuff is been working right.
In the tree '/sys/devices/system/cpu' you can find some subdirectories where we need to take an look.
less /sys/devices/system/cpu/cpu0/cpufreq/
modprobe cpufreq_ondemand && echo ondemand > scaling_governor
See 'performance', 'ondemand', 'conservative', 'powersave' as modes for the scaling_governor
< amphi> itchi: and powersave, which keeps it at the lowest freq all the time regardless of load.
< amphi> itchi: conservative ramps up a bit slower than ondemand, is my understanding
"echo "conservative" > scaling_governor"
See also the tool cpugfreq-info:
$ cpufreq-info
cpufrequtils 002: cpufreq-info (C) Dominik Brodowski 2004-2006
Report errors and bugs to linux@brodo.de, please.
analyzing CPU 0:
driver: centrino
CPUs which need to switch frequency at the same time: 0
hardware limits: 800 MHz - 1.60 GHz
available frequency steps: 1.60 GHz, 1.33 GHz, 1.07 GHz, 800 MHz
available cpufreq governors: conservative, ondemand, powersave, userspace, performance
current policy: frequency should be within 800 MHz and 1.60 GHz.
The governor "performance" may decide which speed to use
within this range.
current CPU frequency is 1.60 GHz.
analyzing CPU 1:
driver: centrino
CPUs which need to switch frequency at the same time: 1
hardware limits: 800 MHz - 1.60 GHz
available frequency steps: 1.60 GHz, 1.33 GHz, 1.07 GHz, 800 MHz
available cpufreq governors: conservative, ondemand, powersave, userspace, performance
current policy: frequency should be within 800 MHz and 1.60 GHz.
The governor "performance" may decide which speed to use
within this range.
current CPU frequency is 1.60 GHz.
See also cpu-selector:
# cpufreq-selector
Seel also cpugreq-set:
cpufreq-set
See also the cpufreqd package:
aptitude install cpufreqd