Computer
Overview
Samsung
Sony

 


HowTO - Installation and use of grml/Debian Linux on Samsung X20 XVM 1600 V Laptop ( Latest change: Sat Sep 30 15:23:21 CEST 2006 [mika] )

*

Quick-Index

Technical Spezification

X20 Specification (50kb, PDF) by Samsung.

Overview

Preface

I was using my Sony Laptop for more than 3 years. I needed a new devel machine for grml. Therefore I decided to buy a Samsung X20 XVM 1600 V on 26th of august 2005. This HowTo provides information about using Linux on it. Feel free to contact me if you have feedback, wishes or questions.

Installation

grml?

I'm projectleader and coredeveloper of grml, a Linux Live-CD for sysadmins and texttool-users. grml is not only a Live-CD but you can install grml to harddisk as well. grml is based on Debian, so if you decide to install grml on your computer you will get a Debian unstable system with some addons like better hardware recognition and out-of-the-box configuration. The Samsung X20 laptop is supported by grml perfectly. You will notice some more 'out-of-the-box' statements in the following text - basically because the laptop really rocks using grml. :-) Just download the grml-ISO and give it a try.

grml-samsung-x20

I created a package named grml-samsung-x20 which provides configuration files and scripts as described below. Just run:

apt-get update
apt-get install grml-samsung-x20

on your Samsung X20 grml-installation to get it from the grml-repository!

BIOS

The BIOS version on my Samsung X20 laptop is 08Z. If you don't have BIOS version 08Z or newer you should upgrade because 08Z adds a feature that the X20 can remember the WLAN on/off state. For newer updates refer to the X20 BIOS Webpage at Samsung.

Partitions / Main installation

I wanted to keep the windows partition for at least a few weeks, as it seems that some hardware like graphics card and WLAN should be initialized at least once by a Windows system (no, that's not a joke). So I decided to resize the partitions. Windows should reside on a 10GB partition:

ntfsresize -n -s 10G /dev/hda1 # testcase
ntfsresize -s 10G /dev/hda1    # testing was successfull, now really resize partition
cfdisk /dev/hda1   # delete partition hda1, create new one with 10000MB and fs-type 07 (NTFS)

Now I installed grml to harddisk via running grml2hd:

grml2hd /dev/hda2 -mbr /dev/hda # this is straight forward, just a few simple
                                # to answer questions, installation will take only
                                # a few minutes

After installation has finished reboot. Now it's time to install package grml-samsung-x20 if not done so already. Let's also add some more partitions and include windows into lilo:

cfdisk /dev/hda  # create new partitions for your new system

I created /dev/hda2 for my root-partition, /dev/hda4 for my $HOME, /dev/hda5 for testing and /dev/hda6 for swap:

fdisk -l /dev/hda

Disk /dev/hda: 79.5 GB, 79516916224 bytes
255 heads, 63 sectors/track, 9667 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
   /dev/hda1   *           1        1216     9767488+   7  HPFS/NTFS
   /dev/hda2            1217        1945     5855692+  83  Linux
   /dev/hda3            9121        9667     4393777+   5  Extended
   /dev/hda4            1946        9120    57633187+  83  Linux
   /dev/hda5            9121        9485     2931831   83  Linux
   /dev/hda6            9486        9667     1461883+  82  Linux swap / Solaris

So create the filesystems and adjust lilo.conf if necessary:

mkfs.ext3 /dev/hda4 && tune2fs -c0 -i0 /dev/hda4
mkfs.ext3 /dev/hda5 && tune2fs -c0 -i0 /dev/hda5
mkswap /dev/hda6
vim /etc/lilo.conf              # add entry for windows on /dev/hda1
lilo                            # now run lilo to write MBR

Console

Framebuffer works with 'vga=0x0317' which is default of grml. Using vga=0x031a (1280x1024 with 16 bits) works as well. To disable framebuffer use 'vga=normal'.

X-Server

Notice: grml >=0.5 provides an initscript named /etc/init.d/samsung_x20 which provides configuration for X-Server as described below out-of-the-box(!). If you are running grml from CD just boot with commandline 'grml services=samsung_x20' which will execute the initscript while booting. If you installed grml to harddisk you probably want to install the grml-samsung-x20 package.

Using the laptop with a beamer works without any problems for me.

Resolution

By default a resolution of 1280x1024 will be recognized by the X-server. But using the higher resolution 1400x1050 is possible via running 915resolution (old version: 855resolution). Either run 915resolution (or 855resolution) directly on commandline:

915resolution 4d 1400 1050

Or adjust configuration file and run init-script 915resolution ('/etc/init.d/915resolution start') afterwards:

% cat /etc/default/915resolution
# 915resolution default
# find free modes by  /usr/sbin/915resolution -l
# and set it to MODE
MODE=4d
# and set resolutions for the mode.
XRESO=1400
YRESO=1050

Now just run 'grml-x -nosync fluxbox' to start with windowmanager fluxbox and you will get the 1400x1050 resolution.

SynPS/2 Synaptics TouchPad

The synaptics touchpad works out-of-the-box with grml-x if the kernel module evdev is loaded (done by /etc/init.d/samsung_x20 in package grml-samsung-x20). The evdev module creates the /dev/input/event* devices which are important for synaptics.

mika@grml ~ % synclient -l
Parameter settings:
    LeftEdge             = 1700
    RightEdge            = 5300
    TopEdge              = 1700
    BottomEdge           = 4200
    FingerLow            = 25
    FingerHigh           = 30
    MaxTapTime           = 180
    MaxTapMove           = 220
    MaxDoubleTapTime     = 180
    ClickTime            = 100
    EmulateMidButtonTime = 75
    VertScrollDelta      = 100
    HorizScrollDelta     = 100
    MinSpeed             = 0.06
    MaxSpeed             = 0.12
    AccelFactor          = 0.001
    EdgeMotionMinZ       = 30
    EdgeMotionMaxZ       = 160
    EdgeMotionMinSpeed   = 1
    EdgeMotionMaxSpeed   = 200
    EdgeMotionUseAlways  = 0
    UpDownScrolling      = 1
    TouchpadOff          = 0
    GuestMouseOff        = 0
    LockedDrags          = 0
    RTCornerButton       = 2
    RBCornerButton       = 3
    LTCornerButton       = 0
    LBCornerButton       = 0
    TapButton1           = 1
    TapButton2           = 2
    TapButton3           = 3
    CircularScrolling    = 0
    CircScrollDelta      = 0.1
    CircScrollTrigger    = 0
    CircularPad          = 0

Hotkeys

To use the additional hotkeys on the right side on the top you have to activate them. F13 alone gives a keycode already so we have to bind only F14 and F15 via running setkeycodes on commandline as user root:

setkeycodes 75 94 # F14 / keycode 128
setkeycodes 74 93 # F15 / keycode 208

Check settings via running xev or xmodmap:

% xmodmap -pke | grep 'F1[345]'
keycode 128 = F14
keycode 131 = F13
keycode 208 = F15

If you are binding the XF86-commands to keys (done by default at grml) you can use the audio keys (using Fn-<cursor-left>, Fn-<cursor-right> and Fn-F6):

% xmodmap -pke | grep XF86Audio
keycode 160 = XF86AudioMute
keycode 174 = XF86AudioLowerVolume
keycode 176 = XF86AudioRaiseVolume

Use the XF86-scripts to adjust volume:

% cat /usr/bin/XF86AudioLowerVolume
#!/bin/sh
aumix -v -5
% cat /usr/bin/XF86AudioRaiseVolume
#!/bin/sh
aumix -v +5
% cat /usr/bin/XF86AudioMute
#!/bin/sh
if [ -f ~/.aumixtmp ] ; then
  echo -n "restoring to level "
  cat ~/.aumixtmp
  aumix -v `cat ~/.aumixtmp`
  if ! [ -z $DISPLAY ] ; then
    Xdialog --title "XF86AudioMute" --msgbox "Sound activated and set to level `cat ~/.aumixtmp`" 6 35
  else
    echo "Sound activated and set to level `cat ~/.aumixtmp`"
  fi
  rm ~/.aumixtmp
else
  aumix -q | grep ^vol | cut -d " " -f 2 | sed 's/,//g' > ~/.aumixtmp
  echo muting
  if ! [ -z $DISPLAY ] ; then
    Xdialog --title "XF86AudioMute" --msgbox "Deactivated sound" 6 25
  else
    echo "Deactivated sound"
  fi
  aumix -v 0
fi

And finally bind the keys through your window manager, example for fluxbox:

% cat ~/.fluxbox/keys
[...]
None XF86AudioRaiseVolume :ExecCommand /usr/bin/XF86AudioRaiseVolume
None XF86AudioLowerVolume :ExecCommand /usr/bin/XF86AudioLowerVolume
None XF86AudioMute        :ExecCommand /usr/bin/XF86AudioMute

A listing of the present hotkeys:

Fn+Esc: sleep button, works
Fn+F2: display battery status, works basically but display in X is b0rken
Fn+F4: VGA switch - needed when booting(!), works
Fn+F6: mute sound, works when activated in X
Fn+F7: de-/activate S/PDIF, should work - not yet tested (but display in X is b0rken)
Fn+F8: de-/activate 3D-Sound, works (but display in X is b0rken)
Fn+F9: de-/activate Touchpad, works (but display in X is b0rken)
Fn+F10: silent/etiquette mode, works (but display in X is b0rken)
Fn+cursor <left|right>: sound, works when activated in X
Fn+cursor <up|down>: regulate LCD, works (but display in X is b0rken)
F13 ('av-now' button): works out of the box, action needs to be bound
F14 ('mail' button): works but needs activation through setkeys
F15 ('ok' button): works but needs activation through setkeys
WLAN-button

DRI / 3D-support

DRI (3D-support) works out of the box with grml 0.7:

% glxinfo | head -5
name of display: :0.0
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.2
% glxgears
7678 frames in 5.0 seconds = 1535.600 FPS
7752 frames in 5.0 seconds = 1550.400 FPS
7730 frames in 5.0 seconds = 1546.000 FPS
7736 frames in 5.0 seconds = 1547.200 FPS

Please notice that you need current libgl1-mesa packages if you are running X.org >=7.0 (shipped with grml 0.8):

# apt-get install libgl1-mesa-dri libgl1-mesa-glx

It is not as fast as with X.org 6.9 and libgl1-mesa* but at least works so far:

% glxgears -printfps
4934 frames in 5.0 seconds = 986.796 FPS
4943 frames in 5.0 seconds = 988.506 FPS
[...]

Sound

The '82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 Audio Controller' works out-of-the-box using ALSA-module snd_intel8x0:

# cat /proc/asound/cards
0 [ICH6           ]: ICH4 - Intel ICH6
                     Intel ICH6 with AD1981B at 0xb0040800, irq 10

Network

The ethernet device 'BCM4401-B0 100Base-TX' works using the b44 module. The WLAN 'Intel PRO/Wireless 2200BG' device works using the ipw2200 module. Both works out-of-the-box on grml.

CD/DVD

Basically the only deficit I could find at the Samsung laptop: the CD-/DVD-device seems to be on the same IDE bus as the harddisk: /dev/hda is the harddisk, /dev/hdb is the CD-/DVD-device. See output of hdparm:

# hdparm -tT /dev/hda
[...]
/dev/hda:
 Timing cached reads:   3440 MB in  2.00 seconds = 1719.89 MB/sec
 Timing buffered disk reads:   74 MB in  3.06 seconds =  24.15 MB/sec

Anyway, burning CDs and DVDs works of course:

# wodim -v dev=/dev/cdrw speed=16 driveropts=burnfree grml_0.5.iso
# mkisofs -gui -graft-points -volid Live-CDs  -joliet -hide-joliet-list -udf \
        -full-iso9660-filenames -iso-level 2 -path-list /tmp/foobar ...

PCMCIA

Works with grml. Please notice that you should use kernel commandline 'pci=assign-busses' with kernels >=2.6.14. Boot with 'grml pci=assign-busses' using live-cd or add it to the append-line of lilo.conf on hd-installations. Otherwise you might notice problems with 32bit PCMCIA-cards.

Firewire

Works out-of-the-box with grml.

Cardreader

The 'Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter' works using the SDHCI driver. The sdhci driver is shipped with grml 0.7 and is included in mainline kernel starting with 2.6.17 (so grml >=0.8 of course includes sdhci as well). Run 'modprobe sdhci' to load the shdci driver, if /dev/mmcblk0p1 isn't created also run 'modprobe mmc_block'. Using SD-cards works fine for me, but Sony memory cards for example don't work.

Powermanagement

Notice: No APM module(s) are necessary. I'm using only ACPI features.

ACPI

ACPI works out-of-the-box using kernel 2.6.16-grml:

% dmesg | grep 'supports S'
ACPI: (supports S0 S3 S4 S5)
% acpi -V
     Battery 1: discharging, 100%, 03:05:19 remaining
     Thermal 1: ok, 45.0 degrees C
  AC Adapter 1: off-line

CPU frequency scaling

CPU frequency scaling also works right out-of-the-box (using speedstep_centrino kernelmodule of 2.6.16-grml and powernowd):

# cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 13
model name      : Intel(R) Pentium(R) M processor 1.60GHz
stepping        : 8
cpu MHz         : 1596.023
cache size      : 2048 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 2
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss tm pbe est tm2
bogomips        : 3195.26

% cpufreq-info
cpufrequtils 0.3: cpufreq-info (C) Dominik Brodowski 2004
Report errors and bugs to linux@brodo.de, please.
analyzing CPU 0:
  driver: acpi-cpufreq
  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: userspace, powersave, ondemand, conservative, performance
  current policy: frequency should be within 800 MHz and 1.60 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency is 800 MHz.

Suspend to Disk / RAM

Suspend-to-Disk (STD, ACPI S4) and even Suspend-to-RAM (STR, ACPI S3) work. The package hibernate did not work for me a long time as expected because of problems with restoring X. Therefore I wrote the following shellscripts to activate suspend:

Starting with kernel 2.6.18-grml and hibernate 1.93 I found a configuration which works for me:

root@funkenzutzler ~ # grep -v '^#' /etc/hibernate/common.conf | sort -u
Distribution debian
EnableVbetool yes
LoadModules auto
LockXLock yes
LogFile /var/log/hibernate.log
LogVerbosity 1
RestoreVCSAData yes
Runi915resolution yes
SaveClock yes
SwitchToTextMode no
UnloadBlacklistedModules yes
VbetoolPost yes
Verbosity 0

root@funkenzutzler ~ # grep -v '^#' /etc/hibernate/ram.conf | sort -u
Include common.conf
UseSysfsPowerState mem

root@funkenzutzler ~ # grep -v '^#' /etc/hibernate/disk.conf | sort -u
Include common.conf
UseSysfsPowerState disk
root@funkenzutzler ~ #

Notice: Suspend-to-Disk (STD, ACPI S4) needs the resume=...-bootoption. Provide the swappartition as argument. Make sure swappartition is bigger (about RAM/2*3) than the size of RAM. I'm using a 1.5GB swappartition via 'resume=/dev/hda6' in the append-line of /etc/lilo.conf.

Now we can bind suspend to keys and actions through acpid. To use S3 when closing display use a setup like this:

mika@grml /tmp % cat /etc/acpi/events/lidbtn
event=button[ /]lid
action=/etc/acpi/actions/lidbtn.sh

mika@grml ~ % cat /etc/acpi/actions/lidbtn.sh
#!/bin/sh
/usr/sbin/samsung_s3
# /usr/sbin/hibernate

To activate S3 when pressing Fn-Esc key use a setup like:

mika@grml ~ % cat /etc/acpi/events/sleepbtn
event=button[ /]sleep
action=/etc/acpi/actions/sleepbtn.sh

mika@grml ~ % cat /etc/acpi/actions/sleepbtn.sh
#!/bin/sh
/usr/sbin/samsung_s3
# /usr/sbin/hibernate

Press the powerbutton to resume.

Configuration files

Output of ...

Links / Ressources

TODO

Conclusion

For me the Samsung X20 laptop has a perfect cost/performance ratio. 1GB of RAM and all hardware is supported out-of-the-box using grml. A S-ATA harddisk would be a nice-to-have, the Intel graphics card is perfect for people who don't need that much power but like DRI-support out-of-the-box and longer battery operation. Both the harddisk and the CD-ROM seem to be attached to the same cable which sucks a little bit when accessing both at the same time. Overall I can recommend the Samsung X20 laptop, more details can be found on this page. :)

Revisions

Feedback

Any kind of feedback is welcome. Feel free to drop me a mail.

 

* Nach oben