First impressions: SUSE Linux 9.0 on the HP XE4500 laptop

This is all very old stuff now. My preference now would be for FreeBSD 6.x, or Ubuntu / Kubuntu, or the latest version of SUSE/Novell Linux. So what follows here is just for historical reference. Really, if you use an old XE4500 laptop on a recent Linux or BSD distribution, everything should just work
right out of the box anyway :-)
Date: 11 November 2003
Generally SUSE 9.0 is good news for owners of HP XE4500 machines. Just about everything is recognised and supported straight out of the box - no need to select devices by hand during installation.
These comments are based on SUSE 9.0 Professional. This is the bundle with one double-sided DVD, 5 CDs, and two printed manuals in the box. There is also a "Personal" edition for slightly less money, with slightly less in it.
What works and what doesn't?
| Device | Working? | Comments |
|---|---|---|
| Screen | Yes :-) | No more flickering! Nice and fast in 2D. Slightly-improved XF86Config file here. Differences from YAST auto version: enables DRI for speed, and enables SW Cursor and 800x600 option for TV Out compatibility. |
| Ethernet | Yes | No problems. |
| Infrared | Yes | Sees my Nokia 8210 |
| DVD movies | Yes | You'll need Libdvdcss - discussed in more detail below. This makes a nice multi-region DVD player, and of course you can skip through all the copyright notices and just play the movie you paid for! |
| TV Out | Yes | Use "atitvout" is on the SUSE DVD. See important hints here. |
| PCMCIA slots | Yes | Tested OK with SMC WLAN card |
| Modem | Yes | *** Bug in YAST, for fix please see below *** |
| USB | Yes?? | Detected, but not yet tested here. |
| Firewire | Yes?? | Detected, but not yet tested here. |
| CD Burning | Yes?? | "k3b" comes with SUSE, and it works well. |
| Trackpad | Yes | Even the trackpad on/off switch/LED! (HINT: switch out of X before hotplugging mice!) |
| Sound | Yes | *** Uses ARTSD in X, so make sure your apps are set for ARTSD, or they will be silent! |
| NTFS, SMB, NFS | Yes | They all work by default. No need for special kernel build like RedHat. |
| ACPI Battery Gauge | Yes | Tested OK over 2.5 hours at 1200 MHz. Gradual reduction in battery charge, then pop-up messages warning of very low battery state. |
| ACPI Processor Speed | Yes | The 'limit' and 'performance' options permit speed reduction from 1.6 to 1.2 GHz, as discussed in more detail below |
| ACPI Fan control | No?? | Perhaps the fan is always controlled by the BIOS. Once the fan turns on, it almost never turns off. Was it the same in Windows?? |
The installation is nice and easy, as it all runs from Side A of the DVD. There are multiple CDs for machines without DVD drives. I installed on top of my old WinXP/RedHat dual-boot installation. The XP dual-boot option was left intact, with the RedHat partition being completely overwritten - so back up your user files first! As you'd expect, SUSE 9.0 comes with recent versions of Mozilla, OpenOffice, Gimp, Evolution, AbiWord, Acrobat Reader, and other good stuff. A DTP package called Scribus is included. There's a lot of good stuff here.
You can install SUSE on as many PCs as you like - they *do* permit copying. They just prefer not to have ISO images on the net as it hits sales of their boxed package (perhaps that's where Red Hat went wrong). The SUSE 9.0 package is good value and deserves our support.
Some more random notes from my installation experience ;-)
*** Don't log in as root!
It's worth doing it properly and not logging in as root. SUSE have taken pains to ensure that things still work easily without being root. Make yourself a proper user account! The control centre and YAST will prompt you for the Root password when necessary, so you don't need to keep logging out and in again - sweet! One or two Control Centre or YAST dialogs don't always seem to work in this mode though. It might be worth trying "xhost +" if this happens, provided that your box is behind a firewall.
*** Library not found?
When running as root, the "wxWindows" library for "pgadmin3" would not build from the source tarball, because "./configure" could not find "gtk-config". But if you log in as a normal non-root user, then the default path is different, so the build works!! So again, don't be root!
I think you need to install "gtk-devel" for wxWindows-pgAdmin3 to build, so you might need to use the SUSE Control Centre to add gtk-devel if you didn't select it at installation time.
*** Hot-plugging Mice
You can switch between the trackpad and the PS/2 mouse connector, but you need to switch out of X first to avoid problems. CTRL/ALT/F1 (Hotplug) CTRL/ALT/F7
Modem (Conexant "hsflinmodem")
The SUSE 9.0 installer detected this and installed the driver, but there was no /dev/modem, and running "minicom" against /dev/ttyS0, S1, S2 didn't work! A quick grep revealed the problem:
# grep --with-filename hsf /var/log/YaST2/* ... 2log:2003-11-09 16:24:27 speedy(4947) [YCP] clients/inst_suseconfig.ycp(runStep):83 Executing 'HOME=/tmp/Ya ST2-04947-1aRs1T /sbin/SuSEconfig --verbose --module hsflinmodem >>/var/log/YaST2/y2log.SuSEconfig 2>&1' y2logRPM:km_hsflinmodem-5.03.03.L3mbsibeta02090500-134.i586.rpm installed ok y2logRPM:hsflinmodem-5.03.27mbsibeta02122600-92.i586.rpm installed ok y2log.SuSEconfig:Running module hsflinmodem only y2log.SuSEconfig:Executing /sbin/conf.d/SuSEconfig.hsflinmodem... y2log.SuSEconfig:/sbin/conf.d/SuSEconfig.hsflinmodem: line 15: /sbin/hsfconfig: No such file or directorySo the installer didn't finish because /sbin/hsfconfig didn't exist. Well it turns out to be in /usr/sbin/hsfconfig, so with a little root action we can quickly fix it...
# whereis hsfconfig
hsfconfig: /usr/sbin/hsfconfig
# ln -s /usr/sbin/hsfconfig /sbin/hsfconfig
# hsfconfig
Linux HSF softmodem drivers, version 5.03.27mbsibeta02122600
WARNING: this is an EXPERIMENTAL BETA VERSION of the HSF drivers for Linux.
USE AT YOUR OWN RISK! See the file /usr/lib/hsf/LICENSE for details.
Conexant Systems neither distributes nor maintains this package.
PLEASE DO NOT CONTACT CONEXANT REGARDING THIS SOFTWARE!!!
If you require assistance or need more information, go to:
http://www.mbsi.ca/cnxtlindrv
Should we attempt to automatically configure your hardware? [yes]
Selected PCI VendorID=10B9 DeviceID=5457
and INF file /etc/hsf/inf/linux_ali_smartmc.inf
Automatically guessed country (using timezone): "UK"
Configuring modem for country: "UK"
You can change this setting later with the command "hsfconfig --country"
Your HSF modem should now be accessible as /dev/ttySHSF0
# ln -s /dev/ttySHSF0 /dev/modem
You can use "minicom" to confirm that it's working: type "AT" and it should say "OK". Now, use the KDE Control Centre/YAST tool to set up your ISP details. Make sure KInternet is running in your KDE taskbar (the icon shows a little plug). Right-click on the plug and pick "Dial-In" to connect. It's all very easy: you even get an animated icon when data transfer is in progress, and you can see the log of dialling and PPP negotiation messages. You can then use email and web applications just as you'd expect. Finally, just right-click the icon and "Hang Up" to disconnect.
Power Management, CPU speed settings, fan, hard disk idle timeouts...
The ACPI begins to work reasonably well straight out of the box. You get an accurate battery charge display. But it sounds as if Suspend is unlikely to work until Linux 2.6, so I haven't tried it.
The CPU speed can be slowed down from 1600 MHz to 1200 MHz. This should reduce power consumption by 10 watts. Maybe we can make the system run cooler, to turn off the fan? Let's try interrogating the ACPI data in the kernel RAM /proc structure:-
# (First find out how fast we're running now) # procspeed 1599.372792 MHz processor. # cat /proc/acpi/processor/CPU0/performance state count: 2 active state: P0 states: *P0: 1600 MHz, 20000 mW, 250 uS P1: 1200 MHz, 10000 mW, 250 uS # echo -n 1 >/proc/acpi/processor/CPU0/performance # cat /proc/acpi/processor/CPU0/performance state count: 2 active state: P1 states: P0: 1600 MHz, 20000 mW, 250 uS *P1: 1200 MHz, 10000 mW, 250 uS # procspeed 1199.355428 MHz processor.But, a few seconds after you set speed to 1200, it reverts to state 0 (1600 MHz)! So to set a fixed performance limit, use the following:
# cat /proc/acpi/processor/CPU0/performance state count: 2 active state: P0 states: *P0: 1600 MHz, 20000 mW, 250 uS P1: 1200 MHz, 10000 mW, 250 uS # cat /proc/acpi/processor/CPU0/limit active limit: P0:T0 platform limit: P0:T0 user limit: P0:T0 thermal limit: P0:T0 # echo "1:0" > /proc/acpi/processor/CPU0/limit # cat /proc/acpi/processor/CPU0/limit active limit: P1:T0 platform limit: P0:T0 user limit: P1:T0 thermal limit: P0:T0 # cat /proc/acpi/processor/CPU0/performance state count: 2 active state: P1 states: P0: 1600 MHz, 20000 mW, 250 uS *P1: 1200 MHz, 10000 mW, 250 uSThe /proc area is a kernel structure, not a real file system, so to select 1200 MHz every time you boot, you'll need to create a little script, say "/etc/init.d/cpuslow":
#!/bin/sh echo "1:0" >/proc/acpi/processor/CPU0/limitUse the "Sys-V Init Editor" under "System/Service Configuration" to run this script at boot time. Remember to "chmod +x" the script file. Also set the screen-saver to "blank screen", otherwise power savings will be lost if a CPU-hungry screen saver kicks in.
On my system, things are definitely cooler at 1200 MHz, but once the fan comes on, it doesn't seem to switch off again. This might be a BIOS or ACPI problem. There are also some "thermal zone" parameters to look at:
# cd /proc/acpi/thermal_zone/THRM # ls . .. cooling_mode polling_frequency state temperature trip_points # cat cooling_mode cooling mode: active # cat polling_frequency <polling disabled> # cat state state: ok # cat temperature temperature: 50 C # cat trip_points critical (S5): 91 C passive: 70 C: tc1=4 tc2=3 tsp=40 devices=0xc1c0f880If you echo "0" or "1" to /proc/acpi/thermal_zone/THRM/cooling_mode, you can switch between "active" and "passive". But "passive" doesn't turn the fan off! It's all a bit annoying. If I leave the laptop switched off overnight, then with the CPU speed reduced to 1200 MHz, it takes 20 minutes before the fan comes on at about 50 C. But when the laptop is left idle, and the temperature falls to 46 C, the fan does not switch off. Maybe "trip_points" is writable? Anyone???
Update: This web page shows how it's supposed to work (thanks to Christopher Knoerle for sending me this URL). But nothing seems to happen when you write to "trip_points" on the XE4500, and /proc/acpi/fan/FAN0/state doesn't exist on the XE4500.
Footnote: At the risk of damaging the laptop, I left it running and stuck it in the freezer for a couple of minutes to see whether the fan went off! The answer is that the fan *did* switch off, and when retrieved, the CPU temperature was reading 42 C. This suggests to me that if we could change the trip points only slightly (say, fan on at 53 C, and off at 48 C) then the fan could safely stay off most of the time in normal use. If anyone finds a way to change the trip points, please get in touch! Of course, the greater mystery is why this thing runs so hot, when the CPU is 98% idle.
To make things run even cooler, you can set a spin-down timeout on the hard disk with
# hdparm -S 12 /dev/hda /dev/hda: setting standby to 12 (1 minutes)You could add this command as a script in /etc/init.d , and enable it in the SysV Run Level Editor GUI.
There may be some silly little processes somewhere that will keep doing small things that make the disk spinning up and down all day (too early to be sure yet). But maybe we can switch off some unwanted processes so that the disk rest when the system is idle. The first things to switch off are "acpid" and "cpufreqd" - switch these off in the RunLevel Editor GUI, as they don't really do very much on this hardware as far as I can see. In particular, "acpid" is harmful because it receives Battery Status events a couple of times per minute, and logs them to /var/log/acpid, thus preventing the hard disk from spinning down.
CORRECTION! "acpid" does serve a purpose: it loads the kernel modules needed for ACPI functions. These are: "ac", "battery", "button", "fan", "processor", "thermal". Without "battery" the KDE battery life applet won't run, and without "processor" the CPU slow-down tweak discussed earlier won't work either. To fix this you may as well add these commands to your /etc/init.d script:
insmod ac insmod battery insmod fan insmod processor insmod thermalbefore it tries to set the processor speed.
Infra-red support
The infra-red interface is auto-detected, but it's switched off by default to save power. It can be switched on with:
# rcirda startThen use /dev/ircomm0 as the IRDA device.
For accessing GSM phones over IRDA, SUSE has included "Kandy" and "xgnokii". I didn't have any luck using those with my Nokia 8210 phone. But "gammu --backup phone.backup" worked very nicely, after creating ~/.gammurc as follows:
# cat >~/.gammurc [gammu] port = /dev/ircomm0 connection = irdaThanks to Scott Hazlehurst for pointing out gammu. You might need to run YAST to make sure it's installed, as it didn't seem to get installed by default on my system.
Efficient use of slow internet links
For those of us with slow internet links (I have 64K ISDN), there is a suggestion on the SUSE Portal website to reduce the TCP WindowSize on the default-gw route. The default is ~32Kbytes, and the suggestion is to use 8000 or 4000 on dialup links so that you get snappier web response when you have an FTP download in progress, for example. But the syntax has changed since SUSE 8.0: /etc/route.conf doesn't exist any more.
So, how to change TCP WindowSize in SUSE 9.0?
Manual way:
# route delete default gw # route add default-gw 192.168.0.1 window 4000Automatic way: Create a file called /etc/sysconfig/network/ifroute-eth0 containing one line:
# cat >/etc/sysconfig/network/ifroute-eth0 default 192.168.0.1 0.0.0.0 eth0 - window 4000To test this, take the interface down with "ifdown eth0", then bring it up again with "ifup eth0". DO NOT use "ifconfig eth0 [down][up]" as this won't run the scripts! Use "route -en" to print the routing table including Window size.
# ifdown eth0 # ifup eth0 # route -en Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 192.168.0.0 * 255.255.255.0 U 0 0 0 eth0 default 192.168.0.1 0.0.0.0 UG 0 4000 0 eth0
Wireless Networking support
I plugged an SMC2632W IEEE802.11b WLAN card into the PCMCIA slot, and it was recognised immediately. A little setting of parameters in YAST and it was working perfectly with WEP. There are two alternative places to set this stuff up: under Network Cards in YAST, or under "Profiles". In "Profiles" you can store several different configurations for different sites, but I haven't tried that.
One minor thing is that when switching from wired to wireless, I need to close down the wired interface and change the default route:
# ifdown eth0 # route add default gw 192.168.1.0It would be good to have scripts to install new routes when the WLAN card comes up. The SUSE 9.0 admin manual outlines this in Chapter 12. For my system, the wireless network runs on a different subnet, and again I want internet access to use a TCP receive window of 4000. So I've created another routing script:
# cat >/etc/sysconfig/network/ifroute-wlan-pcmcia 192.168.0.0 192.168.1.1 255.255.255.0 default 192.168.1.1 0.0.0.0 - - window 4000The effect of this is that plugging in the WLAN card takes over all the routes (even if eth0 is still up):
# route -en Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0 192.168.0.0 192.168.1.1 255.255.255.0 UG 0 0 0 wlan0 0.0.0.0 192.168.1.1 0.0.0.0 UG 0 4000 0 wlan0That's quite nice as it makes the changeover to wireless automatically. But to go back to wired Ethernet, you need to unplug the wireless card, and say:
# ifdown eth0 # ifup eth0to bring back the normal routes.
*WARNING*. For some reason, if you use "ifdown eth0", the system starts responding very slowly. Under X, you can easily type too fast! Best is to keep eth0 up, but just route all the traffic away from it. (I wonder why this happens?)
TV-Out HOWTO
The XE4500 has a Radeon M6 LY video chipset, which supports TV Out via the yellow SVHS connector. To get it working:
- Install atitvout from the SUSE 9.0 DVD (use YAST)
- Edit /etc/X11/XF86Config and find:
Section "Device"
Below this line, add this:Option "SWcursor" "true"
otherwise your colours will be badly wrong on TV. -
While you're in XF86Config, you could also try enabling DRI to make things a little faster.
Under
Section "Module"
just add this:Load "dri"
- Shut down the laptop. Power off! I mean it!
- Plug in the TV. Switch the TV on and select the SVHS input.
- Boot up the laptop into X.
- Log in normally, then get to an xterm and type:
- xhost + [not necessary if you run X apps as non-root]
- atitvout pal
- atitvout -f t
- If no output appears on the TV, check your cable! There are 2 kinds of S-Video to SCART cable: one kind for output from S-Video to SCART, and one kind for output from SCART to S-Video.
- If you want to reduce to 800x600 resolution on the TV screen, change your
/etc/X11/XF86Config file so that the start of the Screen section is as shown below.
Then you need to use CTRL/ALT/KEYPAD+ or CTRL/ALT/KEYPAD- to switch between 1024x768 and
800x600. (That's CTRL/fn/ALT/; and CTRL/fn/ALT/P on the UK keyboard.)
Section "Screen" DefaultDepth 24 SubSection "Display" Depth 24 Modes "1024x768" "800x600"So, this lets you reduce the screen resolution for the TV-Out to 800x600 or even 640x480. But, the XFree86 desktop still has the old larger resolution, so you get a window that moves around the screen. Happily there is a simple solution: run the KDE application "krandrtray" (Screen Resize and Rotate)! This sits in the taskbar, making it easy to switch between different desktop sizes.
XINE: DVD movie playback on SUSE 9.0
For legal reasons, SUSE 9.0 has included a version of Xine which will play DVB TS audio/video streams very nicely, but it's crippled so that it won't play DVDs. With legislation in both Europe and the USA now making it more risky for people to mirror libdvdcss, I felt it was worth trying to get DVD playback working while it's still possible.
Solution:
- Go to www.videolan.org and get "libdvdcss". Build from source or try the RPM. (VLC itself is a cool program - I run it on my FreeBSD desktop box - but on SUSE 9.0 it has too many broken dependencies for me. Has anyone built a statically-linked binary of VLC for SUSE 9.0??)
- Go to www.xinehq.de and download xine-lib-1-rc2.tar.gz and xine-ui-0.9.22.tar.gz . Use "./configure ; make ; make install" for the lib, then for the ui. I used the RC2 version library because the stable version failed to build due to an assembler error.
Troubleshooting XINE
- Precaution. Turn on DMA on the DVD drive. (Use the Control Centre/YAST menus.)
-
Problem: Xine Splash screen appears, then disappears, then nothing
- You did "make install" as sudo root, and you are still running sudo root, when X is running as a normal user.
- Go back to normal user (not sudo). Then all will be well.
- Alteratively, you could say "xhost +" but that also allows REMOTE apps to write to your screen.
-
Problem: Xine plays DVD beautifully, but there's no sound ("pcm in use?")
- "xine --help" reveals that there's a choice of which audio system to use.
- "xine -A arts" works just fine under KDE!
Getting "Popfile" going on SUSE 9.0
This is an excellent learning mail filter, good for both spam filtering and mail sorting. Being a POP3 proxy it is independent of the mail client you use. The latest PopFile is always at http://popfile.sourceforge.net.
I created a non-priviledged user to run it, and tested the following at the command line with a view to calling it from an rc.d file:
su nonpriv
/usr/bin/perl popfile.pl
POPFile Engine loading
Loading...
{core: mq config logger}
Can't locate BerkeleyDB.pm in @INC
The PopFile release notes reveal that the new release of Popfile needs the Perl module BerkeleyDB.pm from www.cpan.org. I found BerkeleyDB-0.25.tar.gz on Cpan, so I unzipped BerkeleyDB-0.25.tar.gz and followed build instructions:
perl Makefile.PL
make
make test
su
make install
The 'make' failed with "#error db.h is not for Berkeley DB at all."
Solution: run YAST and install "db-devel-4.1.25" from the SUSE 9.0 DVD,
then try again. OK... now BerkeleyDB-0.25.tar.gz installs OK.
So back to POPFile:
perl popfile.pl output... Couldn't start the pop3 proxy because POPFile could not bind to the listen port 110. This could be because there is another service using that port or because you do not have the right privileges on your system (On Unix systems this can happen if you are not root and the port you specified is less than 1024).Solution: start as "perl popfile.pl -port 1110" to set the POP port number to listen on. Then set the same port number in Evolution.
Now, to make it start at boot as a non-priviledged user, create a user called popfile. User doesn't need to be able to log in. Save this script file to /etc/init.d/popfile and make it executable:
#!/bin/bash
# Sample init.d/script to show how to start popfile
# automatically during regular Redhat Linux 7.3 boot
# Should also work for other versions of Linux
# Change the line below to reflect the location of popfile.pl
popfilelocation=/home/popfile/popfile.pl
# You may want to do a "ls -l /bin/basename" and
# a "ls -l /usr/bin/dirname" to confirm that you
# have the two utilities on your linux system
prog=`/bin/basename $popfilelocation`
dir=`/usr/bin/dirname $popfilelocation`
case "$1" in
start)
cd $dir
/bin/su - popfile -c "perl ./$prog -port 1110 >> /dev/null 2>&1 &"
pid=`ps -ef | grep "perl \./popfile\.pl" | gawk '{print $2}'`
if [ ! -z $pid ];then
echo "Starting POPFile Service - OK"
else
echo "Starting POPFile Service - ERROR?"
fi
;;
stop)
pid=`ps -ef | grep "perl \./popfile\.pl" | gawk '{print $2}'`
kill $pid
pid=`ps -ef | grep "perl \./popfile\.pl" | gawk '{print $2}'`
if [ -z $pid ];then
echo "Stopping POPFile Service - OK"
else
echo "Stopping POPFile Service - ERROR?"
fi
;;
status)
pid=`ps -ef | grep "perl \./popfile\.pl" | gawk '{print $2}'`
if [ -z $pid ]; then
echo "POPFile is not running"
else
echo "POPFile is running. PID ($pid)"
fi
;;
*)
echo $"Usage: $0 {start|stop|status}"
exit 1
;;
esac
exit 0
To get this script to run automatically at boot time, either create the required symlinks manually, or use the KDE SysV runlevel editor to create "S" and "K" symlinks for runlevels 3 and 5. (Could probably get away with just level 5, but may as well run in 3 too.)
There's a section on Runlevels and Init Scripts in the SUSE 9.0 Admin Guide, which suggests starting from /etc/init.d/skeleton as the basis of such a script. That's cleaner I suppose.
11 November 2003