I purchased this notebook in late 2005 and intended from the begining to use it solely with GNU/Linux. After having tried out about a dozen distributions, I ended up with Arch Linux as the distribution of choice for my laptop. In short it does exactly what I want:
However good Arch Linux might be, still this guide will try to be as generic as possible. That is, if you install the same packages in your favourite distribution, it should be fairly straightforward to follow what is written here. Still, one thing this guide will not do is teach you how to actually install GNU/Linux on the laptop: I assume you - the reader - have already some Linux-related experience and know how to get a distribution running. If not, then the place to search for information is your distribution's installation guide. The present guide is only meant as a complement, to help you get the most out of this notebook.
Notice that every section may have a small list tagged "Prerequisites" or "Related Software" on top. This is the list of packages that need to be installed on your system, in order for what the guide suggests to work. Please keep in mind that the package names are the ones as they appear under Arch Linux, so if you're using that particular distribution you can just "pacman -S" the respective package. If you're using some other distribution, still the chances are that the packages will have the same name, so you can look them up and install them using your distribution's package manager (if any).
In order to get the most out of the S7020, you should choose a Linux distribution that has a kernel version of at least 2.6.16, otherwise Suspend-To-Ram won't work and the soundcard will not function properly. Also, you have to make sure that the distribution's installation CD can detect and use SATA drives at installation time (Debian Woody couldn't for example, at least when I tried last time). Let DistroWatch be your guide :-)
Prerequisites:
The laptop's TFT panel features a resolution of 1400x1050. This mode however is not present on the i915 chipset's BIOS and one has to use a utility called 855resolution to reprogram the graphics card's BIOS image (not the actual BIOS itself). I chose to override the 3c mode, which is not used anyway:
Note that this command should run at boot time, every time. If you install the 855resolution package under Arch Linux, then you can just add 855resolution to the DAEMONS list in /etc/rc.conf and tweak /etc/conf.d/855resolution accordingly.
Prerequisites:
The X.Org server provides the i915 driver for the graphics chipset, which works just fine. To use it just tweak the corresponding DeviceSection under /etc/X11/xorg.conf or /etc/xorg.conf (depending on your distribution). One caveat is that you can't use the VGA-out port to drive a second monitor/projector and use the laptop's monitor at the same time, as the VGA output will be garbled. This can be fixed by using X.Org's "clone" mode. The relevant sections of my working xorg.conf are the following:
Section "Monitor"
Identifier "Built-in"
VendorName "Fujitsu-Siemens"
ModelName "S7020"
HorizSync 30-70
VertRefresh 60-70
EndSection
Section "Monitor"
Identifier "ExternalCRT"
VendorName "Sony"
ModelName "CPD-E250"
HorizSync 30-110
VertRefresh 60-170
EndSection
Section "Device"
Identifier "MainHead"
VendorName "Intel"
BoardName "i915"
Driver "i810"
VideoRam 131072
Option "DRI" "true"
# Option "MonitorLayout" "CRT,LFP"
# Option "Clone" "true"
# Option "CloneRefresh" "85"
BusID "PCI:0:2:0"
Option "DevicePresence" "true"
Screen 0
EndSection
#Section "Device"
# Identifier "SecondHead"
# VendorName "Intel"
# BoardName "i915"
# Driver "i810"
# VideoRam 131072
# BusID "PCI:0:2:0"
# Screen 1
#EndSection
Section "Screen"
Identifier "Internal"
Device "MainHead"
Monitor "Built-in"
DefaultColorDepth 24
Subsection "Display"
Depth 24
Modes "1400x1050" "1024x768" "800x600" "640x480"
EndSubsection
#Section "Screen"
# Identifier "External"
# Device "SecondHead"
# Monitor "ExternalCRT"
# DefaultColorDepth 24
# Subsection "Display"
# Depth 8
# Modes "1152x864" "1024x768" "800x600" "640x480"
# EndSubsection
#
# Subsection "Display"
# Depth 15
# Modes "1152x864" "1024x768" "800x600" "640x480"
# EndSubsection
#
# Subsection "Display"
# Depth 16
# Modes "1152x864" "1024x768" "800x600" "640x480"
# EndSubsection
#
# Subsection "Display"
# Depth 24
# Modes "1152x864" "1024x768" "800x600" "640x480"
# EndSubsection
# Subsection "Display"
# Depth 32
# Modes "1152x864" "1024x768" "800x600" "640x480"
# EndSubsection
#EndSection
Section "ServerLayout"
Identifier "layout1"
InputDevice "Keyboard1" "CoreKeyboard"
InputDevice "Touchpad" "CorePointer"
InputDevice "Touchstick" "SendCoreEvents"
InputDevice "External mouse" "SendCoreEvents"
Screen 0 "Internal"
Option "AIGLX" "true"
# Screen 1 "External" RightOf "Internal"
EndSection
Section "DRI"
Mode 0666
EndSection
Uncomment everything that is commented to enable the clone mode between the VGA output and the TFT panel. By tweaking the configuration a bit, you can even enable Xinerama support and extend your desktop on your external monitor as well. Beware though, as this will break 3D acceleration.
The embedded touchpad and touchstick are operated using the synaptics x.org driver. These are the relevant sections of the xorg.conf file:
Section "InputDevice"
Driver "synaptics"
Identifier "Touchpad"
Option "Device" "/dev/input/mice"
Option "Protocol" "auto-dev"
Option "LeftEdge" "1700"
Option "RightEdge" "5700"
Option "TopEdge" "1700"
Option "BottomEdge" "4700"
Option "FingerLow" "30"
Option "GuestMouseOff" "off"
Option "FingerHigh" "50"
Option "MaxTapTime" "180"
Option "MaxTapMove" "220"
Option "VertScrollDelta" "100"
Option "MinSpeed" "0.06"
Option "MaxSpeed" "0.12"
Option "AccelFactor" "0.0010"
Option "SHMConfig" "on"
EndSection
Section "InputDevice"
Identifier "Touchstick"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/input/mouse1"
EndSection
Out of the special keys of the keyboard, only the volume-related ones (volume-up/down and mute) generate valid keycodes, however these keycodes are not assigned to any function. Luckily, X provides some key symbols for exactly this purpose: XF86AudioVolumeRaise/Lower and XF86AudioMute. By binding the keys to the respective key symbols, they are automatically recognized by KDE and function as they should. All you have to do is create a file called .Xmodmap in your home directory, containing:
keycode 174 = XF86AudioLowerVolume keycode 176 = XF86AudioRaiseVolume keycode 160 = XF86AudioMute
The wired LAN Controller (Broadcom NetXtreme Gigabit Ethernet) is supported by the tg3 kernel module. Networking works fine at 10/100 Mbps, however I don't have the equipment to test it under 1Gbps
Prerequisites:
The wireless LAN Controller (Intel 2200BG) is supported by the ipw2200 module in the latest kernel releases (post-2.6.15). For kernel versions before 2.6.15 one would have to download and compile the driver seperately from Intel's site on sourceforge. In any case, you will need Intel's firmware from the page above for the card to work properly, and you have to install it in the directory udev/hotplug looks in for firmware files (usually /lib/firmware). If you use Arch Linux, you can just install the respective package:
Prerequisites:
The laptop's Bluetooth HCI is supported by BlueZ, the Linux Bluetooth Stack. The device is detected automatically and using BlueZ's daemons I even managed to get a TCP/IP-over-Bluetooth (PAN) network going. Also, if you use KDE, be sure to check out kdebluetooth, which is also available as an Arch Linux package.
Prerequisites:
Under Linux the notebook's infrared port is viewed as /dev/ttyS3. Under Arch Linux you just need to install the irda-utils package and configure /etc/conf.d/irda as follows:
# # Parameters to be passed to irattach # DEVICE=/dev/ttyS3 #DONGLE=actisys+ DISCOVERY=yes
All you have to do next is start the IrDA subsystem:
Related software:
This is a portable computer, so it's meant to be moved around. As I transport it every day from home to the university campus and it typically joins 2 or 3 different networks a day, I am using handy little utility called iflugpd to manage my network interfaces. In short, ifplugd monitors the network interfaces for connect/disconnect events and runs predefined actions (usually a dhcp client). Under Arch Linux just:
Apart from that, I also use wpa_supplicant to manage the different wireless networks and support WPA/WPA2/IEEE802.1x etc. wpa_supplicant takes over scanning for wireless networks and associating with them and cooperates very well with ifplugd: you just turn on the wireless LAN switch and it connects on the networks wpa_supplicant knows about and then ifplugd spawns dhcpcd for you and acquires an IP address :-) Here's how:
/etc/ifplugd/ifplugd.conf:
I also use a custom /etc/ifplugd/ifplugd.action file, as I found the default to be too bloated for my taste:
#!/bin/sh
#
# ifplugd.action for ArchLinux
#
ifup()
{
rm -f /etc/dhcpc/dhcpcd-${1}.{pid,cache} >/dev/null 2>&1
/usr/sbin/dhcpcd -t 15 -h laptop $1
return $?
}
ifdown()
{
/bin/kill `cat /etc/dhcpc/dhcpcd-${1}.pid`
/sbin/ifconfig $1 down
return $?
}
case "$2" in
up)
ifup $1
;;
down)
ifdown $1
;;
*)
echo "Wrong arguments" > /dev/stderr
exit 1
;;
esac
The notebook has an on-board Intel High-Definition Audio chipset, which is supported by the snd-hda-intel module. The first time I tried using the card the sound output was really horrible and the mixer didn't function properly. Luckily both symptoms are fixed by adding the following lines to /etc/modprobe.conf:
alias snd-card-0 snd-hda-intel alias sound-slot-0 snd-hda-intel options snd-card-0 index=0 position_fix=1 options snd-hda-intel index=0 position_fix=1
It should be noted that ALSA (the kernel's sound infrastructure) provides some switches to toggle the headphone jack between a "Headphone out" and a "Line out" mode (with the latter having a smaller gain), as well as the line-in jack between "Line in" and "Mic in".
Prerequisites:
The notebook features a softmodem detected by Windows as an "Agere systems modem". Luckily, the modem is supported by the sound card module. The only thing needed to make it work is slmodemd, a daemon designed for use with SmartLink modems. This daemon, when compiled accordingly, supports the ALSA modem drivers. If your slmodemd is ALSA-capable, then you only need to run:
and then point your favourite dialer program (e.g. kppp) to /dev/ttySL0. You can also create a symlink from /dev/ttySL0 to /dev/modem, something which most dialers use out-of-the-box. Under Arch Linux you can just do the following:
Then edit /etc/conf.d/slmodem-alsa:
# # Parameters to be passed to slmodemd # SLMODEM_ARGS="--country=GR --alsa modem:0"
You can then start and stop the slmodemd daemon using /etc/rc.d/slmodem-alsa.
Prerequisites:
Fortunatelly this notebook's ACPI implementation seems to be a good one, making Suspend-To-Ram usable under Linux (with a few caveats though). Firstly, to use the STR functionality you will a kernel version of at least 2.6.16, otherwise the notebook's SATA HDD will never come out of suspend. Now, in order to suspend and resume successfully, suspending must be done from console and not from X (you can still have X running though), otherwise there is a high chance that the monitor will not come back after resuming. In a quasi-algorithmic view, what I do to suspend is:
This is managed using the following script:
# Check to see if the lid was closed or opened and only proceed on a "closed" event
echo "$1" | grep "button/lid" && grep -q open /proc/acpi/button/lid/LID/state && exit 0
# Exit if there is another suspend in progress. If not, then proceed and touch the suspend lock.
if [ -e /var/run/sleep.lock ]; then
exit 1;
/usr/bin/logger -t "sleep.sh" "Found lockfile, aborting suspend!"
else
touch /var/run/sleep.lock
fi
# Stop ifplugd in case we switch networks while suspended
/etc/rc.d/ifplugd stop
# Sync disks, just in case we never wake up properly ;-)
/bin/sync
# Change to VT-1 and save the VBE state, so we can restore it upon resume
# i810 doesn't always come back cleanly under X
/usr/bin/chvt 1
# Save the VBE state. This shouldn't be needed normally, but you can try uncommenting it
# together with the respective line restoring the VBE state, if your monitor doesn't come back
# upon resume. Beware though, that VBE state saving/restoration might cause X to lock up upon
# resume.
# /usr/sbin/vbetool vbestate save > /var/run/vga.state
# Get the current brightness to restore it after resume
BRIGHTNESS=`cat /proc/acpi/fuj02b1/brightness | grep 'brightness:' | awk '{ print $2 }'`
# Go down
echo "mem" > /sys/power/state
# Re-initialize the graphics card. This seems to be required for the display to come back
/usr/sbin/vbetool post
# Restore the VBE state.
# /usr/sbin/vbetool vbestate restore < /var/run/vga.state
# Change back to X
/usr/bin/chvt 7
# Work around the lamp not coming back on
echo "brightness: $BRIGHTNESS" > /proc/acpi/fuj02b1/brightness
# We're almost done, only background tasks from now on
rm -f /var/run/sleep.lock
# Restart ifplugd
/etc/rc.d/ifplugd start
To use this script, just create a file named /etc/acpi/events/lid, containing:
event=button/lid action=/etc/acpi/actions/sleep.sh %e
and make sure acpid is running (if not, install it and start it). All you have to do then is close the notebook's lid and it will go to sleep.
If you read through the script, you might be wondering what this fuj02b1 thing is. Unfortunately the S7020 has a special ACPI device to control the TFT panel's brightness, which is not a generic-ACPI device and not supported by the mainstream linux kernel. Thus, when the notebook normally wakes up everything is fine, but the monitor's lamp is off. Don't panic, it turns on again by using Fn+F6 and then Fn+F7 manually, but it's 2 keypresses for nothing, isn't it? Fortunately, a kind guy named Shane Spencer, wrote once a patch to support this extra device, FUJ02B1, under Linux and allow us to change the TFT panel's brightness level in software. This patch never made it to the mainline kernel source, but here is a version of it modified by myself, that can compile against (hopefully) any 2.6 kernel, as long as you have its source installed and configured. Grab the module's source from here, untar it using `tar xvjf fujitsu-acpi-2.6.tar.bz2', cd into the newly-created directory and type `make && make install'. If everything goes well, it should compile the module against your running kernel, so you can just `modprobe fuj02b1_acpi' and enjoy :-)
Note:If you are using slmodemd (see modem), then you need restart it after resuming, as it seems not to function properly. Alternatively you can add a couple of lines to the script above, stopping slmodem-alsa before suspend and starting it again after resume.
Note: You can further customize the script above to do things for you. For example, as a KDE fan, I have also integrated DCOP calls to pause playing music and disconnect my instant messaging accounts (via Kopete) before suspend and resume them afterwards.
The Linux kernel supports CPU frequency scaling for Intel Centrino processors. Using this feature, you can control the CPU's frequency vs. load behaviour. The kernel comes with 4 so-called governors: ondemand, conservative, powersave and performance:
Personally I find the "conservative" governor to be the most suitable for everyday wall-powered use, minimizing the heat radiation and still making frequency switches hardly noticeable
To use the frequency scaling feature, you should load the speedstep-centrino module and the modules of the governors you intend to use (cpufreq_ondemand, cpufreq_powersave, cpufreq_performance and cpufreq_conservative respectively). You can switch governors by echo'ing to /sys, for example:
Prerequisites:
By glueing all of the above together with acpid, you can increase greatly the run-time when the computer runs on battery. Apart from turning down the TFT panel's brightness automatically and clocking down the CPU, you can also take advantage of another feature of the Linux kernel: laptop mode. In short, when in laptop mode, the kernel only accesses the disc to read but not to write. It stores the changes you make to memory, and commits them to disc when there's something to be read. This allows for the hard disc to be spun down, minimizing power consumption. Beware though that this means you could lose your work if something goes wrong before the kernel writes it to disk.
To use the laptop mode you need some userspace utilities, called laptop mode tools. Under arch linux they automatically install handlers for laptop mode to be activated upon switching to battery power, so you only need to tweak the /etc/laptop-mode/laptop-mode.conf configuration file.
Apart from laptop-mode, I have /etc/acpi/handler.sh turn the TFT panel's brightness down to 3 and switch the CPU to "powersave" upon switching to battery power. This gives me a run-time of about 3 hours with regular browsing using the wireless LAN.