Thursday, 29 March 2007

Gerard's experience installing and using OpenSuSE on the Samsung X1 laptop

from our editor Gerard

Linux On Laptops

It started like this, about a year ago

My old Toshiba laptop finally, after almost three years of faithful service, gave up the ghost and became to unreliable for general business use and presentations. It was time to investigate my next purchase in the world of mobile computing.
My criteria for a new laptop were quite simple, but unfortunately also quite expensive:
  • the system should weigh no more than 1.5 kilo grams (not including the cables and power supply)
  • DVD player and CD writer included, but not as a separate device
  • memory expandable to a minimum of 1 GByte
  • hard drive 40 Gbytes minimum
  • compatible with SuSE Linux

After some investigations it looked as one of the Sony VAIOs would be the best option, despite the fact that they are notorious anti-Linux designs. I prefer to see that as a good challenge ;-). Unfortunately, Sony's nasty behaviour in the area of DRM (Digital Rights Management: the famous Sony rootkit story) put me completely off in spending any money with them so I started looking again.

That was when I discovered the gorgeous (I'm still, after more than one year in the honeymoon period, that's much better than my real marriage ...) Samsung X1. It came very close to most of my criteria except for a difference of 200grams, it weighs around 1.7 kg.
But for that I gained widescreen, very easy update with extra memory at little extra costs (£ 90.-- for 1GByte) and DVD +-R writing. Above all, as the hardware is pretty standard, good prospects for a fully functional Linux laptop (including suspend to disk). While in the shop, trying to make up my mind, I remembered I had a Knoppix CD in my bag. Booting with this cd worked straight away, except for it not bringing up the native screen resolution (see further down in this blog). So I decided this was the way to go, the X1 was it for my next road warrior.

The battery life under Linux is comparable with XP and I am getting a comfortable 2 ½ hours out of the standard battery. I am still waiting for the availability of an additional high-power battery pack.

The end result

Samsung X1 functionality using OpenSuSE 10.0 and one software patch:
  • Dual boot with Windows XP PE
  • Widescreen native resolution of 1280x768 at 24bits colour depth (using 915resolution patch)
  • Ethernet - fully operational
  • Wireless - fully operational
  • Bluetooth – operational (picture was taken with my mobile phone and uploaded using KBluetoothD)
  • Suspend to RAM – fully operational (invoking 915resolution patch when resuming)
  • CD writing – fully operational using K3B
  • DVD writing – fully operational using K3B
  • DVD playing under Linux – fully operational on region 2 disks (region 1 still to be tested)
  • Memory stick / SD card slot – not operational
  • USB 2 fully operational on all 3 ports (I use an external 2.5” hard drive and several Sd/Compactflash external card readers without a problem)
  • Firewire – operational (an extr 6 to 4 pin conversion plug is required so no power through firewire)
  • build in Memory stick / SD card reader – not working


Samsung X1 hardware configuration

This laptop is just drop dead gorgeous and it is a real surprise when you lift it as it doesn't look that light. Now lugging an almost 3 kilos monster around airports is a thing of the past ! The silver and black casing looks really good and feels tough. Having a top loader DVD is really nice, but it did mean the keyboard had to move down towards the front and there is no space for a mouse pad. Therefore Samsung has used the old IBM “stick gear” for mouse navigation. You get two black tops spare (it took me a while to figure out what they were ;-). In the beginning while typing I occasionally inserted a space when I wanted to click the left mouse button.

Another aspect I really like about this laptop is it's very quite operation, it issues very little sound. You have to make some effort to hear the hard drive spinning. In normal “dynamic” CPU frequency mode, running at 600Mhz, this is a laptop that can truly be used on one's lap. It doesn't get very warm at all, no danger for the family jewels being sterilised through overheating.

The mouse takes some getting used to and is far from ideal. Consider this if you are looking at purchasing the X1. In the office I will be using a detached wireless keyboard and mouse. So it won't be much of a problem for me. On the road so far I have gotten used to it quite quickly.

The output of an lspci under root shows the following:

00:00.0 Host bridge: Intel Corporation Mobile 915GM/PM/GMS/910GML Express Processor to DRAM Controller (rev 03)
00:02.0 VGA compatible controller: Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller (rev 03)
00:02.1 Display controller: Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller (rev 03)
00:1c.0 PCI bridge: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) PCI Express Port 1 (rev 03)
00:1d.0 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #1 (rev 03)
00:1d.1 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #2 (rev 03)
00:1d.2 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #3 (rev 03)
00:1d.3 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #4 (rev 03)
00:1d.7 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB2 EHCI Controller (rev 03)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev d3)
00:1e.2 Multimedia audio controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 Audio Controller (rev 03)
00:1e.3 Modem: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 Modem Controller (rev 03)
00:1f.0 ISA bridge: Intel Corporation 82801FBM (ICH6M) LPC Interface Bridge (rev 03)
00:1f.1 IDE interface: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) IDE Controller (rev 03)
00:1f.3 SMBus: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) SMBus Controller (rev 03)
06:05.0 Ethernet controller: Broadcom Corporation BCM4401-B0 100Base-TX (rev 02)
06:07.0 Network controller: Intel Corporation PRO/Wireless 2915ABG MiniPCI Adapter (rev 05)
06:09.0 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev b3)
06:09.1 FireWire (IEEE 1394): Ricoh Co Ltd R5C552 IEEE 1394 Controller (rev 08)
06:09.2 Class 0805: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 17)
06:09.3 System peripheral: Ricoh Co Ltd R5C592 Memory Stick Bus Host Adapter (rev 08)

Installation

Using the OpenSuSE 10.0 DVD the installation was very easy and the system came up in less that 45 minutes in a 1024x768 configuration at runlevel 5.
  1. Boot from DVD
  2. Shrink partition
  3. Choose software (KDE)
  4. Choose resolution
  5. Added additional user

After installation

The Xorg server does have a problem at the native resolution of 1280x768 (as reported by M$ Windoze). Apparently the Intel Mobile 915GM/GMS/910GML graphics controller does not report these resolutions (through the BIOS) to Xorg at startup.

Now experimenting with the 915resolution program, to adapt the Bios worked. A normal download, make, sudo make install steps, see: http://www.geocities.com/stomljen/ fixed the problem.

The tar file contains the compiled program so all you need to do is a make install as root.
Added a line to /etc/init.d/boot.local:
/usr/bin/915resolution 30 1280 768 24
Unfortunately after a suspend to disk and RAM the system will not come back ....... SuSE uses the powersafe system to handle all power management controls. The following script is run when coming back from a suspend to disk (you will need to do the same for the script that brings the system back from suspend to RAM):
/usr/lib/powersave/scripts/restore_after_suspend_to_disk
Adjust it to:

#!/bin/bash
# first get helper functions (e.g. DEBUG, load_scheme, ...)
. "${0%/*}/helper_functions"
. "${SCRIPT_DIR}/sleep_helper_functions"
set_variables "suspend2disk"
## EV_ID="$4" # set in helper_functions
echo "========we are back from suspend, cleaning up.========" >> $LSMOD_LOG
# work around a kernel bug: suspend sometimes fails if swappiness < 100
swappiness=`awk -F': ' '/^swappiness:/{print $2}' ${STATE}`
[ -n "$swappiness" ] && echo $swappiness > /proc/sys/vm/swappiness
restore_after_sleep "suspend2disk"
/usr/bin/915resolution 30 1280 768 24
echo "=======================================" >> $LSMOD_LOG
echo "restore_after_suspend_to_disk: finished" >> $LSMOD_LOG
# $SCRIPT_RETURN is called in restore_after_sleep.
EXIT

Xwindows configuration

Attempting to get Xinerama to work in split screen mode failed so far. I'm not sure if it is possible to sent a different signal to the external monitor port.

This configuration accept external wireless USB mice (and keyboard) with the wheel enabled (see “ZAxisMapping” “4 5” settings).

The actual /etc/X11/xorg.conf file:
# /.../
# SaX generated X11 config file
# Created on: 2007-02-08T16:17:51+0100.
#
# Version: 7.1
# Contact: Marcus Schaefer <sax@suse.de>, 2002
#
# Automatically generated by [ISaX] (7.1)
# PLEASE DO NOT EDIT THIS FILE!
#
Section "Files"
FontPath "/usr/X11R6/lib/X11/fonts/misc:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/local"
FontPath "/usr/X11R6/lib/X11/fonts/75dpi:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/Type1"
FontPath "/usr/X11R6/lib/X11/fonts/URW"
FontPath "/usr/X11R6/lib/X11/fonts/cyrillic"
FontPath "/usr/X11R6/lib/X11/fonts/latin2/misc:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/baekmuk:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/japanese:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/truetype"
FontPath "/usr/X11R6/lib/X11/fonts/uni:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/CID"
FontPath "/usr/X11R6/lib/X11/fonts/misc/sgi:unscaled"
FontPath "/opt/kde3/share/fonts"
FontPath "/usr/local/share/fonts"
InputDevices "/dev/ttyS0"
InputDevices "/dev/ttyS1"
InputDevices "/dev/ttyS2"
InputDevices "/dev/ttyS3"
InputDevices "/dev/ttyS4"
InputDevices "/dev/ttyS5"
InputDevices "/dev/ttyS6"
InputDevices "/dev/ttyS7"
InputDevices "/dev/ttyS8"
InputDevices "/dev/psaux"
InputDevices "/dev/logibm"
InputDevices "/dev/sunmouse"
InputDevices "/dev/atibm"
InputDevices "/dev/amigamouse"
InputDevices "/dev/atarimouse"
InputDevices "/dev/inportbm"
InputDevices "/dev/gpmdata"
InputDevices "/dev/mouse"
InputDevices "/dev/usbmouse"
InputDevices "/dev/adbmouse"
InputDevices "/dev/input/mice"
InputDevices "/dev/input/event0"
InputDevices "/dev/pointer0"
InputDevices "/dev/pointer1"
InputDevices "/dev/pointer2"
InputDevices "/dev/pointer3"
EndSection

Section "ServerFlags"
Option "AllowMouseOpenFail"
EndSection

Section "Module"
Load "glx"
Load "type1"
Load "extmod"
Load "dbe"
Load "freetype"
Load "v4l"
EndSection

Section "InputDevice"
Driver "kbd"
Identifier "Keyboard[0]"
Option "Protocol" "Standard"
Option "XkbLayout" "gb"
Option "XkbModel" "pc105"
Option "XkbRules" "xfree86"
EndSection

Section "InputDevice"
Driver "mouse"
Identifier "Mouse[1]"
Option "Device" "/dev/input/mice"
Option "Name" "PS/2 Generic Mouse"
Option "Protocol" "explorerps/2"
Option "Vendor" "Sysp"
Option "ZAxisMapping" "4 5"
EndSection

Section "Monitor"
Option "CalcAlgorithm" "XServerPool"
DisplaySize 300 230
HorizSync 30-50
Identifier "Monitor[0]"
ModelName "1280X768@60HZ"
Option "DPMS"
VendorName "--> LCD"
VertRefresh 50-65
UseModes "Modes[0]"
EndSection

Section "Modes"
Identifier "Modes[0]"
EndSection

Section "Screen"
DefaultDepth 24
SubSection "Display"
Depth 15
Modes "1280x768" "1024x768" "800x600" "768x576" "640x480"
EndSubSection
SubSection "Display"
Depth 16
Modes "1280x768" "1024x768" "800x600" "768x576" "640x480"
EndSubSection
SubSection "Display"
Depth 24
Modes "1280x768" "1024x768" "800x600" "768x576" "640x480"
EndSubSection
SubSection "Display"
Depth 32
Modes "1280x768" "1024x768" "800x600" "768x576" "640x480"
EndSubSection
SubSection "Display"
Depth 8
Modes "1280x768" "1024x768" "800x600" "768x576" "640x480"
EndSubSection
Device "Device[0]"
Identifier "Screen[0]"
Monitor "Monitor[0]"
EndSection

Section "Device"
BoardName "915 GM"
BusID "0:2:0"
Driver "i810"
Identifier "Device[0]"
Screen 0
VendorName "Intel"
EndSection

Section "ServerLayout"
Identifier "Layout[all]"
InputDevice "Keyboard[0]" "CoreKeyboard"
InputDevice "Mouse[1]" "CorePointer"
Option "Clone" "off"
Option "Xinerama" "off"
Screen "Screen[0]"
EndSection

Section "DRI"
Group "video"
Mode 0660
EndSection

Section "Extensions"
EndSection

Ricoh Memory Stick controller

I did try to get the Memory Stick / SD card controller to work. Looks like there are some problems with the default settings in SuSE in such that the SCSI subsystem doesn't pick up “drives” with more than one LUN (Logical Unit Number).

I discovered in February 2007 that this controllor doesn't work with the Linux 2.6 kernel so no luck getting this device to work. External USB memory card readers work beautifully though.


Installing Windoze TrueType fonts

The KDE 3 font installer works now (I had some problems with it in previous versions of SuSE). As I left the Windows partition intact (except for shrinking it) installing in Administrator mode from /windows/C/windows/fonts was real easy and only took 5 minutes. Now all Windoze TrueType fonts are available which is very handy for compatibility with MS-Office files.


Running Yast Online Update

Works without a problem over the wireless home network.


Fixing the SuSE 10.0 USB storage auto-mount loader bug

Early on when using external USB memory cards I realised the transfer speed to and from the cards are extremely slow, certainly not USB 2.0 speeds. This problem was rather difficult to resolve as all obvious trouble spots were performing well. USB controller was detected as 480 Mbps, card reader was properly detected (for example):
linux kernel:usb 5-2.3: new high speed USB device using ehci_hcd and address 27
The slow transfer speeds turned out to be caused by the SuSE auto-mount mounting the USB disks with the sync option. Kind of makes sense, if the disk would be mounted otherwise (async) there is a real danger of loosing data or worse causing corruption, when removing the drive without it being un-mounted first. But t made any transfers extremely slow.

Here is how to fix it:
Locate the following directory (if it is not there create it):
/usr/share/hal/fdi/policy/95userpolicy
Create or edit the file
nosync.fdi
to become:

<?xml version="1.0" encoding="UTF-8"?>
<deviceinfo version="0.2">
<device>
<!-- disable sync for mount -->
<match key="block.is_volume" bool="true">
<match key="volume.fsusage" string="filesystem">
<match key="@info.parent:storage.bus" string="usb">
<merge key="volume.policy.mount_option.sync" type="bool">false</merge>
</match>
</match>
</match>
</device>
</deviceinfo>
When you're done, restart the HAL service with
rchal restart
From now on the auto-mount system will mount external USB storage devices using the sync option (little bit more dangerous but much much faster).


Updating the wireless kernel modules: ieee80211 and ipw2200 (February 2007)

The original version I installed of ipw2200 module occasionally crashed when a wireless network became unreachable or unstable. This happened about once a week / fortnight. About four or five times over the last year this causes the kernel to hang, requiring a power down / up cycle (not good !).

The old version of the modules were:
linux kernel: ieee80211: 802.11 data/management/control stack, 1.0.3
linux kernel: ipw2200: Intel(R) PRO/Wireless 2200/2915 Network Driver, 1.0.6
The new versions now installed reports:
linux kernel: ieee80211: 802.11 data/management/control stack, 1.2.16
linux kernel: ipw2200: Intel(R) PRO/Wireless 2200/2915 Network Driver, 1.2.0dmq
The two files to download are respectively:
ipw2200-1.2.0.tgz and
ieee80211-1.2.16.tgz
First the old ieee80211 module needs to be removed and replaced with the new one (as root):
ifdown eth1
modprobe -r ieee80211
tar xvfz ieee80211-1.2.16.tgz
cd ieee80211-1.2.16/
./remove-old
make
make install
modprobe ieee80211
The procedure for the ipw2200 kernel module are very similar:
modprobe -r ipw2200
tar xvfz ipw2200-1.2.0.tgz
cd ipw2200-1.2.0
./remove-old
make
make install
modprobe ipw2200
ifup eth
For the last month the wireless network has performed flawlessly. It seems to be a bit faster and less sensitive to interference as my office is quite a distance from the base station.

Conclusion


So far the laptop has performed very well indeed. The only problems I have encountered are:
automatic recognition of card insertion using the build in card reader the hardware volume buttons to the right of the keyboard don't work – I presume they need remapping but I haven't figured out yet how to do that under KDE or X11 and I can't be that bothered yet (lazy).


Using it on the road

This is my first laptop where I have managed an uptime of:
10:58pm up 20 days 0:43, 3 users, load average: 0.11, 0.20, 0.18

This is better than using Windows XP personal edition pre-installed ...... I have noticed an inconsistency when waking up from hibernation with a movie DVD present in the drive. System seems to reboot instead of coming back from hibernation when using XP.

I realised after having used the X1 for a few weeks that there are some conditions that need to be met to have “safe” and reliable hibernate (to RAM) and restore:
  • make sure all USB attached devices (I use a 2 ½'' 60GBytes drive and several types of media cards) are disconnected before hibernation
  • do not use Firewire attached devices as the corresponding kernel module cannot be unloaded (it doesn't stop the functioning of the system, going into hibernation just hangs) – a reboot is required to recover
Watching DVD movies with my 10 your old son while on a short skiing trip worked very well, forcing the Powersafe application to go to “Performance” which seems to set the CPU to 1.2 Ghz, gives a slightly smoother full screen playback. But it is not entirely without some distortions especially when the camera pans across a scene. I have adapted SuSE 10 slighly with some DVD ripping and playback RPMs, so this could be the cause.

Anyway in short this is the best laptop Linux road warrior I ever had (it's my fourth portable friend ;-) and despite the CPU technically speaking being slower than my old Toshiba, it feels subjectively faster. For the work I am doing (writing, surfing, emailing, watching DVDs and listening to music) the X1 is excellent.

Powered by ScribeFire.

1 comment:

David said...

Thanks! The part about asynchronous USB mounting really helped.

I have posted the instructions on our department howto page. I included a link to your post here.