Gentoo Linux on ACER TM 630
Installing Gentoo
I switched to Gentoo mostly because the SuSE system became unmaintainable when I wanted to upgrade some packages to newer versions. SuSE only supports their online update (which is mostly security patches). Updates to individual packages are not provided by SuSE. You have to buy their update CDs and then update your whole system at once from 8.0 to 8.1 for instance.
System management is a lot more easier with Gentoo. You can simply update individual packages and dependencies are handled very well! Also you have the great benefit of a system compiled and optimized for your CPU. There is a noticable performance gain by that. My KDE startup time has dropped drastically and also Mozilla runs faster. However you should note that compiling a Gentoo system with KDE takes about four days.
Gentoo has a very good installation documentation on their website. No need to copy it here.
- Kernel
- ACPI
- udev
- Console
- X
- OpenGL
- Sound
- CD Burning
- Hotkeys
- Mail LED
- Mail filtering
- WiFi
- xconsole
- iPod
- Cellphone
- Scanning
- Sensors
Kernel 2.6
Kernel | Recommended? |
---|---|
2.6.5 | yes |
2.6.6 | yes |
2.6.7 | no: nVidia driver problems |
2.6.8.1 | no: clock bug, reiserfs bug |
2.6.9 | no: clock bug, reiserfs hang, reboot bug |
2.6.10 | yes |
2.6.11.12 | yes |
2.6.12 | yes |
2.6.13 | yes |
2.6.14 | yes |
2.6.15 | yes, use acerhk-0.5.31 |
2.6.16-rc4 | yes, use acerhk-0.5.31 |
2.6.17.1 | no: prism54 problems |
2.6.18 | no: prism54 problems |
I installed a vanilla kernel 2.6 from source. Note that I did not use an ebuild for this. You can use my .config for 2.6.15 as a template. It's quite optimized for the Notebook's hardware.
ACPI
ACPI works flawlessly with 2.6 kernels. You get a silent fan, battery status, temperature, CPU throttling. As sleepmodes are still experimental I have not compiled in support into my kernel. I gave them a shot but they do not work.
2.6.2 through 2.6.3 have regressions with battery fill status and power off. The battery fill status bug can cause your KDE to shut down unexpectedly (bug 75946) when running KDE 3.2 with klaptop enabled. 2.6.4 fixes the battery regression again. Use the patch attached to bug 2109 to fix the power off problem.
Special devices
My/etc/udev/rules.d/10-local.rules
dynamically registers the following semantic symlinks for my special devices:
- /dev/ircomm0 for the infrared port
- /dev/input/touchpad for the built-in Touchpad
- /dev/cam for my Sony DSC camera
- /dev/ipod for my iPod
- /dev/coolscan for a Nikon scanner
- start Bluetooth daemons when a Bluetooth device (HCI) is attached
# IR port NAME=="ircomm0", GROUP="dialout", MODE="660" # Internal Touchpad BUS=="serio", SYSFS{description}=="i8042 Aux Port", \ SYMLINK+="input/touchpad" # usb mouse BUS=="usb", DRIVER=="usbhid", NAME="input/%k", \ SYMLINK+="input/usbmouse%e" # DigiCam BUS=="usb", SYSFS{product}=="Sony DSC", KERNEL=="sd?1", \ NAME="%k", SYMLINK+="cam%e" # iPOD BUS=="scsi", SYSFS{vendor}=="Apple ", SYSFS{model}=="iPod ",\ KERNEL="sd?", NAME="%k", SYMLINK+="ipod%e" # Nikon Coolscan 4000 ED BUS=="scsi", SYSFS{vendor}=="Nikon ", SYSFS{model}=="LS-4000 ED ",\ KERNEL="sg?", NAME="%k", SYMLINK+="coolscan%e" # Bluetooth stick ACTION=="add", SUBSYSTEM=="bluetooth", PROGRAM="/etc/init.d/bluetooth start" ACTION=="remove", SUBSYSTEM="bluetooth", PROGRAM="/etc/init.d/bluetooth stop"
Console
To get an optimum framebuffer mode on the text console use the nvididafb driver. From 2.6.14 on include
video=nvidiafb:1400x1050MR@75
into your kernel boot line (grub.conf
). I did not
manage to get a bug-free text console with other fb drivers or settings. You can however disable
the framebuffer console completely and use the standard VGA one.
Xorg-X11, nVidia drivers, Synaptics Touchpad
Before you install Xorg-X11 you must set
INPUT_DEVICES="evdev keyboard mouse synaptics" VIDEO_CARDS="nv nvidia vesa fbdev"
in /etc/make.conf
.
You can run the modular Xorg-X11 with the nv
drivers that ship with Xorg. If you need more features
(like TV-Out, fast OpenGL) you must use
the original nVidia drivers. Use the ebuilds called nvidia-kernel
and nvidia-glx
of at least version 1.0.8762.
Make sure to load the nvidia driver from your /etc/modules.autoload.d/kernel-2.6
file. From
kernel 2.6.13 on you need to run /sbin/NVmakedevices.sh
from your /etc/conf.d/local.start
.
See Gentoo Bug #104369.
Unfortunately the nVidia framebuffer driver (rivafb in kernels prior to 2.6.11, nvidiafb from 2.6.14 on) is not compatible with
the original nVidia drivers for Xorg so you should not compile it into the kernel. The original nVidia drivers will
either refuse to work or crash when switching back to X from a vt. It works okay with the nv Xorg driver, however.
Newer kernels load the nvidiafb module automatically,
so make really sure to disable it in the kernel config!
2.6.1 has a built-in driver for the Synaptics touchpad. It supports also the scrollpad, which I never got to work with 2.4
kernels. You need to install the Synaptics driver for XFree as well, to configure the touchpad correctly. My
/etc/X11/xorg.conf has the necessary sections. It also configures the nvidia driver correctly.
Make sure you load the evdev
module in your /etc/modules.autoload.d/kernel-2.6
file.
OpenGL, GLX
The GLX stuff works out of the box with the above versions. No tweaking necessary.
You should emerge chromium
and kill
some time once or look at the keuphoria screen saver :-). Make sure the user is in the games
group. Even
Neverwinter Nights works.
Sound
Use ALSA. Put the line ALSA_CARDS="ali5451"
into your /etc/make.conf
. Also edit
/etc/modules.d/alsa
to include alias snd-card-0 snd-ali5451
, Configure KDE / Arts to
use ALSA. Works with no problems.
CD Burning
The laptop has a built-in IDE CD-RW burner. emerge cdrools
and call cdrecord dev=ATA -scanbus
.
You may also use K3B which I find the most intuitive cd recording GUI.
Hotkeys
The acerhk
driver by Olaf Tauber can be installed with emerge acerhk hotkeys
. Here is the
definition file for the hotkeys program you need to map key codes to events. You should load the acerhk
driver from your /etc/modules.autoload.d/kernel-2.6
file. The wifi LED does not work (yet).
Mail LED
The mail LED is a nifty feature. To make the most use of it I installed Postfix as a local mail delivery agent.
/etc/procmailrc
was setup to deliver local mail to ~/.maildir: DEFAULT=$HOME/.maildir/
. I use
Courier-IMAP as a local IMAP server and
Mozilla Thunderbird as a mail client.
Unfortunately you can not use mail
to easily check for new mail. So I had to hack up maildir-new
:
#!/bin/sh if [ -z "$UHOME" ]; then UHOME=$HOME fi MAILDIR=$UHOME/.maildir find $MAILDIR -name new -type d | \ while read NEWDIR ; do if [ "$NEWDIR" = "$MAILDIR/.Trash/new" -o \ "$NEWDIR" = "$MAILDIR/.Junk/new" ]; then continue fi MAIL=`ls -A "$NEWDIR"` if [ ! -z "$MAIL" ]; then exit 1 fi doneIt checks for new mail in your maildir hierarchy and returns 1 if there is new mail.
I further wrote
mailled
:
#!/bin/sh DEV=/proc/driver/acerhk/led [ -f $DEV ] || exit 0 USER="$(who | awk '/./ { if ( $2 == ":0" ) print $1 }')" if [ ! -z "$USER" ]; then LED="off" UHOME="/home/$USER" /usr/local/bin/maildir-new if [ "$?" == "1" ]; then LED="on" fi echo $LED > $DEV fi
Run it as a cron
(vixie-cron) job every minute as root. It will light your
LED whenever the locally logged in user has new mail. It will turn off the LED when all new mail has been read. I then installed
fetchmail
as a cron job to periodically retrieve email from my external account. I use Thunderbird to read my email,
so I needed a local IMAP server as well. I installed courier
because it is one of the best IMAP servers out there.
Junkmail filtering and virus scanning
My email address is widely known on the net because of postings in newsgroups and mailing lists. No wonder spammers have long got hold of it and I get huge amounts of SPAM and virii. To address this issue I use Spamassassin and ClamAV to process all incoming mail.
You can emerge Mail-Spamassassin
and emerge clamav
to install the two packages. You should add the
/etc/init.d/clamd
to your default runlevel. As I use my laptop mainly as a single-user system,
I do not use the deamon variant of those two programs but just pipe mail through them using procmail
. Here is
my ~/.procmailrc. Email infected by virii and spam with high
scores is deleted automatically. Lower score spam is tagged with [SPAM] and moved to the Junk folder.
Spamassassin has been configured with /etc/mail/spamassassin/local.cf. So SPAM will be tagged with [SPAM] in front of the Subject line.
Netgear WG511 WiFi card
The prism54 driver is included from 2.6.5 kernel onwards, for earlier kernels you need to include the module yourself (emerge prism54
). You need the firmware in any case: emerge prism54-firmware
.
You just need to put the configuration in your /etc/conf.d/net and
/etc/conf.d/wireless.
xconsole
You will have to create the /var/log/xconsole
pipe manually. The pipe should not be put in
/dev
because that is a virtual file system and is managed by udev
completely.
Configure /etc/syslog.conf
to write the interesting stuff to xconsole
and maybe vt10:
kern.warn;*.err;authpriv.none /dev/tty10 kern.warn;*.err;authpriv.none |/var/log/xconsole
Then run xconsole -file /var/log/xconsole
.
iPod
I have an Apple iPod. It connects through Firewire nicely. Make sure you compile HFSplus drivers into the kernel
(or as a module) and include Apple partition tables. Then you can mount the iPod as a SCSI hard drive. As the hfsplus driver
does not support journaled HFS+ volumes you may need to reformat the partition with a non-journaled HFS+:
mkfs.hfsplus -v iPod /dev/ipod
. 2.6.15 and later kernels will refuse to mount a journaled volume read-write; which
is correct. Dont' force it! I use GtkPod and Amarok to manage MP3 files and transfer them to the iPOD.
There is a catch disconnecting the iPOD however. Firewire SBP-2 devices require to log out after umounting and before disconnecting. Newer kernels can do that when told. To tell the kernel to log out, use the shell script below (run as root with sudo):
#!/bin/sh #freeipod: logs the SBP-2 driver out of the iPOD, #such that it can safely be disconnected CTL="/sys/bus/ieee1394/devices/fw-host0/000a2700027111d4/000a2700027111d4-0/ignore_driver" echo 1 > $CTL echo "Disconnect the iPOD now, and press enter" read echo 0 > $CTL echo "Re-connect the iPOD at anytime"
If you connect the iPOD and it is not mapped as a SCSI device, try rebooting the iPOD: press menu and play button for 5 seconds.
Be careful with the iPOD battery. The TM630 only has a small IEEE1394 connector that can not recharge the iPOD. If you happen to run out of batteries while the iPOD is mounted, the file system of the iPOD will get corrupted and you need to fix it with the Apple's fsck. Check out the ebuilds attached to bug 46342 for a Gentoo port of those. It's also a good idea to connect your iPOD to a Mac once to get the firmware updated or check out how to do it on Linux only - also very handy if (like me) you overwrote the firmware partition by accident.
Cellphone
To hook up my mobile phone Nokia 6610 up to my laptop I use IRDA. If you have defined the uDev rule for the infrared port
to use ircomm0
as a device name, all drivers should load automatically. The kernel modules loaded are: crc_ccitt, irda,
sir_dev, irtty_sir, ali_ircc
. ipconfig irda0
should then return something like:
irda0 Link encap:IrLAP HWaddr 00:00:00:00 UP RUNNING NOARP MTU:2048 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:12327 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:8 RX bytes:0 (0.0 b) TX bytes:382137 (373.1 Kb)
I prefer to use wammu as a front end: emerge wammu
. Using the device /dev/ircomm0
with connection type
irdaphonet
and model auto
it will connect to your phone with no problem.
My new Nokia 6230i has Bluetooth and supports the OBEX protocol. I bought the D-Link DBT-120 Bluetooth USB adapter.
Bluetooth (HCI) must be enabled in the kernel and emerge bluez-utils kdebluetooth
. If you don't use Bluetooth
everyday you may not want the HCI daemon (/etc/init.d/bluetooth
) running all the time. You can start it automatically
on demand by including a udev rule. This only loads the daemon when you plug in the Bluetooth adapter. It is
unloaded when you unplug.
Scanning
I have a Canon CanoScan 1240U LiDE30 flatbed scanner. It is connected on a USB port. It is supported by
SANE with the plustek
backend. Add usb
to your USE flags and emerge libusb xsane
. In /etc/sane.d/plustek.conf
set
option altCalibration 1 option disableSpeedup 1
Otherwise scanning does not work after calibration and you only get a screeshing noise out of your scanner!
Remember: Users that want to use the scanner must be in the scanner
group!
Works all very nicely with xsane or directly from GIMP or KDE's Kooka.
Hardware sensors
All of the notebook's hardware sensors can be accessed through the ACPI interface at /proc/acpi
.
There you will find: AC adapter status, battery status, power button, lid button, sleep button, chassi and CPU temperature,
processor throttling. The fan speed can not be monitored. Please note that processor frequency scaling should be accessed through
/sys/devices/system/cpu/cpu0/cpufreq/
. Sleep modes should be controlled through /sys/power/
.
There are no real sensors available through the I2C bus (ALI 1535). Only read access to the memory SPD EEPROMs is possible to I2C. Even if that
is pretty boring you can still emerge lm_sensors
and access this information.