Installing FreeBSD on a Samsung X05 XTC1400
This writeup is very probably significantly outdated.
The respective laptop was had an unfortunate encounter with a hot
cup of Earl Grey tea in 2007 and was destroyed.
I will keep this text online because it is linked from some prominent pages,
but I recommend to be cautious to the fact that the following text is no
longer being maintained. Sorry.
-- Michael
Hardware
The notebook is a typical Centrino-type notebook, with a 1.4GHz Pentium M, 256 MB Ram, "40" GB HDD, WLan (Intel 2100 MiniPCI), AC97-Audio, i855GM-Graphics, 1024x768 TFT screen, no APM but ACPI... (See my dmesg)
Installation process
The installation went a bit rough. My idea was to keep a small Windows
installation on the notebook running. So first of all I had to resize the
existing Windows partition. (I used presizer
.
fips
didn't work for me). For this I attached a USB-FDD
(which is not bundled with the notebook!) to the notebook and created
a bootable floppy disk with WinXP and put presizer
on it,
too. Booting from that drive worked out of the box and I could shrink
the WinXP partition to about 7G.
Next I tried booting with a 5.0-R Installation CD. The kernel booted and panicked right away. A cross check with OpenBSD (snapshot from Sept. 17th, 2003) worked, but as OpenBSD lacks (or lacked at that time?) ACPI-support this was not a real option. After downloading the FreeBSD 5.1-R miniinst-iso and booting from that I succeeded in installing FreeBSD onto the notebook without any further problems. In the meantime I've moved on to -stable (RELENG_5), since there is very active development in the area of mobile computing in the FreeBSD community and the support for the notebooks has greatly improved.
Since the original partition layout of the disk was somehow broken the WinXP (Fat32) partition entry in the mbr got corrupted during the FreeBSD installation. I don't blame FreeBSD here, as I got warnings about the "funny" entry from the OpenBSD fdisk, too. Luckily I had written down the start- and end-sectors of the partition and could recreate the mbr entry with the FreeBSD fdisk utility without any loss of data. As boot menu I installed Booteasy, which works very nicely since.
Status
I recommend running FreeBSD-stable (RELENG_5 branch) on this notebook, as it solved many problems that were present in version 5.1 and 5.2. The status right now is:
- Touchpad works with moused since 5.1R-p8. It behaves strange
the first few seconds, jumping wild across the screen and creating
all different kind of mouse button events. But then moused seems to
settle and work properly for the rest of the uptime. Beware of open
terminals during this settlement period. With
hint.psm.0.flags="0x2000"
in/boot/device.hints
the touchpad works properly after suspend. - X11 is running.
- Audio: Works (supported by the
snd_ich.ko
kernel module). A note on the quality of the audio: The internal speakers suck, they are among the worst laptop speakers I've ever heard. Using headphones is highly recomended. But the soundcard is in general not very good, every interrupt and harddisk access can be heard. - USB: USB1 (uhci) and USB2 (ehci) are working fine.
- WLan: Damien Bergamini wrote a driver, which works fine.
- Modem: nope.
- Firewire: works.
- PCCard/Cardbus: Works since around beginning of April 2004 perfectly.
- Network: fxp(4) does very well.
- DVD/CD-RW: reading and writing disks works.
- ACPI is mostly working.
- Powerbutton: works through acpi and shuts the notebook down.
- Extra-buttons and
<Fn>
-sequences: work, get their X11 key codes withxev
. - Changing backlight intensity (
<Fn>-<Up/Down>
): works. - Battery lifetime: I got 2 to 2.25 hours for the small battery, and about 4 to 4.5 hours for the "long life" battery which has the double capacity. While moving from FreeBSD 5.1 to 5.2 the lifetime seems to have improved by about 10 percent due to better support of the new deeper sleep states of the Pentium M processor.
ACPI
Some changes to /etc/sysctl.conf
were neccessary:
michael@mobi:~> cat /etc/sysctl.conf hw.acpi.power_button_state=S5 hw.acpi.sleep_button_state=S3 hw.acpi.lid_switch_state=S0 hw.acpi.standby_state=S3 hw.acpi.suspend_state=S4 hw.acpi.reset_video=0
To summarize the ACPI status:
- The notebook goes into S3 without any problems. When resuming from
this state, it doesn't enable the display. But changing the virtual
console reenables it. Use
hw.acpi.reset_video=0
or the machine crashes on resume. - The ACPI state S4 is not working at all.
- Switching between "performance"- and "economy"-mode (and thus reducing the CPU frequency with Speedstep™)by (un)plugging the power supply works.
- Reading the battery and power status with
sysutils/xbatt
or similar tools works.
Maybe I'll have luck and somebody submits a working DSDT for this notebook to e.g. ACPI4Linux. Any further input regarding ACPI on this notebook is welcome as well.
Battery
You can use this shellscript to shut
the system down, when your battery is running low.
You have to enable devd
from /etc/rc.conf
and put these lines into your /etc/devd.conf
:
# Warnings and emergency shutdown if battery is running low. notify 10 { match "system" "ACPI"; match "subsystem" "CMBAT"; action "/etc/rc.d/battery"; };
Buttons
To enable the buttons, you have to set a key symbol for the keycode first.
This can be done with xmodmap
:
keycode 124 = XF86Terminal keycode 125 = XF86WWW keycode 128 = XF86Mail keycode 160 = XF86AudioMute keycode 174 = XF86AudioLowerVolume keycode 176 = XF86AudioRaiseVolume
Put that lines into a file .xmodmap
in your home directory and
load it with "xmodmap .xmodmap
" from your
.xinitrc
/.xsession
or your command line.
Then you've got to add some functionality to these key symbols.
This is the window managers job. I'm using
fvwm for many years now
and could add some functionality to those extra buttons with these lines
in my .fvwm2rc
:
Key XF86AudioLowerVolume A N Exec mixer vol -5 Key XF86AudioRaiseVolume A N Exec mixer vol +5 Key XF86AudioMute A N Exec mixer vol 0 Key XF86WWW A N Exec firebird Key XF86Mail A N Exec xterm -e mutt Key XF86Terminal A N Exec xterm
Summary
Nice little thingy, if you don't need high quality audio.
And a mass of two 1.9 kilogram are quite a good point, as well as the
additionally bundled "long life" battery.
One thing that I personally dislike is that you have to turn the system off
to replace the batteries, instead of adding the second set on demand.
See also: [Tuxmobil.org] [FreeBSD Laptop Compatibility List]