分类: LINUX
2005-08-10 08:50:56
I am a proud owner of a Samsung X10 series notebook. It's the slimmest 14" notebook of the world and weighs only 1.8 kilograms.
Even if it's designed
for Windows XP and comes bundled with the home version, I decided to try out linux as an alternative
operating system. Google gives a couple of information
about installing recent versions of linux but since I don't like SuSE Linux or
Mandrake I gave Fedora Core a try and made this documentation.
I installed and used Fedora Core 3 for a while and now I wanted to upgrade to Fedora Core 4 during a complete re-installation.
Since I don't want to quit playing games on my notebook at
university (like GTA San Andreas, it roxx!) I installed Windoze XP Pro
in
a 15 GiG partition
of the 40 GiG harddrive. The remaining 25 GiG will host my new linux partitions.
Entirely seen the Samsung X10 is perfectly designed for using linux. The only problems are the ACPI functions because Samsung did
not use a standard
implementation. So you have to use a fixed DSDT table to make ACPI (like monitor battery status etc.) work.
It isn't as complicated as it sounds - you'll see later..
To get the best out of your linux installation I suggest you to use
Software Suspend2. It provides an excellent hibernate function also
called
suspend-to-disk to quickly put the notebook into sleep state and wake it up again very fast. This installation guide provides
instructions for the setup
of Software Suspend2 as well.
|
Step 1: Out-of-the-box installation
Perform a standard out-of-the-box installation of Fedora Core 4. I prefer installing Gnome as your favourite window manager.
Step 2: Setting up hardware
Most of the hardware is detected automatically and configured correctly.
works out-of-the-box |
after user interaction |
||
CPU | |||
Pentium-M 1400 Mhz CELERON | |||
UDMA | |||
ACPI | |||
Graphic Chip | |||
nVidia Corporation NV17 [GeForce4 420 Go 32/64M] | possible* |
||
DVD-ROM/CD-RW | |||
SAMSUNG CDRW/DVD SU-324B | |||
Sound | |||
Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller | |||
LAN | |||
3Com Corporation 3c905C-TX/TX-M [Tornado] | |||
Wireless LAN | |||
Intel Corporation PRO/Wireless LAN 2100 3B Mini PCI Adapter | |||
PCMCIA | |||
Ricoh Co Ltd RL5c476 II | |||
USB 1.1 and 2.0 | |||
Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller | |||
Intel Corporation 82801DB/DBM (ICH4/ICH4-M) USB2 EHCI Host Controller | |||
Firewire IEEE 1394 | |||
Rico Co Ltd R5C552 IEEE 1394 Controller | |||
Touchpad | |||
SynPS/2 Synaptics TouchPad | |||
MemoryStick | |||
external VGA port |
* It is possible to install the original NVIDIA driver instead of the opensource driver for openGL support. But then Software Suspend2 won't work anymore.
Step 2.1: Using Intel Pro Wireless 2100 Mini PCI for WLAN
The usage of the Intel Pro Wireless 2100 Mini PCI for WLAN is quite easy. All new kernels include the ipw2100 module to
call the device.
The only thing you have to do is to download the firmware for the card.
It can be found at [].
Step 2.2: Optimizing Synaptics Touchpad
After the out-of-the-box installation the touchpad should work pretty well but there are some hidden tweaks you can apply
to optimize the usage.
I prefer to disable the tapping feature and the scrolling in the edges, because the blue scrollwheel at the bottom works perfectly.
Just edit the /etc/X11/xorg.conf file as root to apply these settings. Find the paragraph where the identifier "Synaptics" is
configured and add
the bold printed lines.
Section "InputDevice"
Identifier "Synaptics"
Driver "synaptics"
Option "Device" "/dev/input/mice"
Option "Protocol" "auto-dev"
Option "Emulate3Buttons" "yes"
Option "RightEdge" "6000"
Option "BottomEdge" "5000"
Option "MaxTapTime" "0"
EndSection
Step 2.3: The special keys
The only special keys I use are the ones for toggling the sound volume up and down. The combinations Fn+<- and Fn+->
are usually reserved for this function.
You can easily set up these shortcuts using Desktop -> Preferences -> Keyboard Shortcuts in the gnome menu.
Step 2.4: BIOS settings
For optimal LCD brightness I suggest you to disable the Smart Inverter Control setting in BIOS because otherwise the
LCD brightness will change while switching windows.
If the
active window has more dark color in it, the LCD will lower its
brightness and if it has more brightly color in it, it will raise
its brightness. This feature really sucks so disabling the Smart Inverter Control is a very good idea!
Step 3: Fixing the DSDT table for ACPI
The DSDT table provided by the BIOS is not recognized as a valid DSDT table and that's the matter that ACPI functions
like the battery status monitor do not work.
The only possible workaround is to override the DSDT table with a fixed version during boot-up.
First you have to download the Intel IASL compiler at the following location
[].
There's already a newer version out but in my case it didn't work so I suggest you to download exactly this version.
Extract the compiler.
[hype@tigga ~]# tar xzf acpica-unix-VERSION.tar.gz
Compile it.
[hype@tigga ~]# cd acpica-unix-VERSION/compiler
[hype@tigga ~]# make
Then download a fixed DSDT table for your memory size from the following location:
256 MB Ram []
512 MB Ram
[]
768 MB Ram []
Compile the new DSDT table with the Intel IASL compiler.
[hype@tigga ~]# ./iasl –tc dsdt.dsl
A file named dsdt.hex is generated. This file is important when you go on compiling your custom kernel.
Step 4: Compiling and installing your own custom kernel
The out-of-the-box kernel version is
2.6.11-1.1369_FC4 - a 2.6.11 kernel with the patches of 2.6.12-rc5. It works ok but
for the working ACPI
and the very useful
suspend-to-disk function you have to build a custom kernel.
After a long period of researching and testing kernels with Software Suspend2, I discovered pre-patched
kernels from
Matthias Hensler which are based on the newest
official Fedora Core 4 kernels and already include Software Suspend2
and fbsplash patches. So such a kernel can be easily set up to use the hibernation function
including a sweet graphical
boot-up sequence ().
Matthias Hensler provides pre-built kernels as a compiled .RPM-package and the corresponding Source-RPM-packages.
Since we still need to compile the kernel
with custom settings and because I prefer building my own kernel, the best choice
is to download a Source-RPM-package of the kernel.
Step 5: Modifying the initrd for Software Suspend2 usage
To start using Software Suspend2 you have to make some changes to your initrd.
Login as root!
Prepare a temporary directory for expanding the initrd.
[root@tigga ~]# cd /boot
[root@tigga ~]# mkdir myinitrd
[root@tigga ~]# cd myinitrd
Now extract the image to the new directory.
[root@tigga ~]# gzip -dc /boot/initrd-2.6.12-prep.img|cpio -i
Edit the init-file
[root@tigga ~]# joe init
Between lvm vgchange -ay --ignorelockingfailure VolGroup00 and echo Creating root device add
the following bold printed lines:
...
lvm vgchange -ay --ignorelockingfailure VolGroup00
echo "Activating software suspend2.."
echo /bin/suspend2ui_fbsplash > /proc/software_suspend/userui_program
echo > /proc/software_suspend/do_resume
echo Creating root device
...
After this you have to copy some files into your new initrd.
[root@tigga ~]# cp -R /etc/splash/ etc/
[root@tigga ~]# cp /dev/fb* dev/
[root@tigga ~]# cp /sbin/suspend2ui_fbsplash bin/
Finally re-compress your initrd.
[root@tigga ~]# find . | cpio -o -c | gzip -9 > /boot/initrd-2.6.12-prep.img
All done! But Software Suspend2 isn't usable yet, first you have got to read Step 6.
Step 6: Setting up hibernate.conf and again the bootloader
The hibernation or suspend-to-disk process can be easily initiated
by the hibernate-script which was already installed in Step 4.
You only have to configure the script by modifying the /etc/hibernate/hibernate.conf file.
As root perform the following:
[root@tigga ~]# joe /etc/hibernate/hibernate.conf
For instance I provide my hibernate.conf . It should work for you too.
During some experiments I found out that using the FileWriter function of Software Suspend2 is much more reliable than
the SwapWriter.
My is optimized for FileWriter usage.
After making the changes to your hibernate.conf file, try to start a hibernation cycle as root:
[root@tigga ~]# /usr/sbin/hibernate
It will fail with the following important information:
ABORTING: resume2 is not setup correctly. Unless you have setup your bootloader correctly, resuming will most likely fail.
To correct this, add "resume2=file:/dev/dm-0:0x3e04b2" to your kernel command line in your LILO or GRUB configuration and reboot.
The bold information will differ if you set up another FileWriter location at your /etc/hibernate/hibernate.conf file.
To ensure that Software Suspend2 finds your image file and is able
to resume at boot-up you have to modify again the bootloader config
at /etc/grub.conf.
As root open the config file with an editor:
[root@tigga ~]# joe /etc/grub.conf
Now first enable the framebuffer device. To do that you have to add vga=0x317 to your kernel command line - best choice is to
append it at the end.
Next insert the resume2 parameter, which was given by the aborted hibernation cycle (for example resume2=file:/dev/dm-0:0x3e04b2)
directly after
the root parameter.
The boot entry should now look like this:
title Fedora Core (2.6.12-prep)
root (hd0,5)
kernel /vmlinuz-2.6.12 ro root=/dev/VolGroup00/LogVol00 resume2=file:/dev/dm-0:0x3e04b2 rhgb quiet vga=0x317
initrd /initrd-2.6.12-prep.img
Now reboot!
After rebooting, open a terminal and login as root.
Now try to initiate a hibernation cycle by typing the following command:
[root@tigga ~]# /usr/sbin/hibernate
If everything goes fine you should see "Snowboard Tux" and a progress bar. When 100% are reached your system should power off.
Now at next boot-up the system should automatically start the resume process and after a few seconds your old desktop should
re-appear.
Congratulations! You finally made it..
Note:
At very very few times the resume process will fail. The "Copying kernel back.."-procedure hangs. That's no big problem - just power off
and on and at the BIG FAT WARNING press "c" to start another resume attempt. Sometimes you have to do this twice or more times
before it will actually succeed to resume. It's annoying but not a real
problem since it does not happen often and no data or work is ever
lost.
Step 7: Configuring ACPI events for easy hibernation
For the daily usage of the hibernate function I like to set up an
ACPI event. Because the power button isn't recognized as an event,
I use the closing of the lid to initiate a suspend-to-disk cycle.
The first step is to ensure that your user account is able to start
the hibernation process because you do not always want to log in as root
before running /usr/sbin/hibernate. And because ACPI events call a script running under the current logged-in user, this step is neccessary.
You can either allow the current user only the /usr/sbin/hibernate program or complete root access. I chose the complete root access
without any password because I need root access really often and don't worry about the security weakness.
It may be a risk but
it is very comfortable to type just sudo
To follow my way to complete insecurity of the user account management, just edit /etc/sudoers as root and add the following line:
username ALL=(ALL) NOPASSWD: ALL
Of course username has to be changed to your username. But I warned you! :)
Now when you set up /etc/sudoers you are ready to configure a script which determines the state of the lid and when it's closed
initiates the hibernate cycle.
As root create a file named /etc/acpi/actions/lid.sh.
[root@tigga ~]# joe /etc/acpi/actions/lid.sh
Type the following into the file:
#!/bin/sh
# lid.sh
die() {
echo "Unable to determine state of lid."
exit 1
}
STATE_FILE=/proc/acpi/button/lid/LID0/state
[ -f $STATE_FILE ] || die;
STATE=$(awk '{ print $2 }' < $STATE_FILE)
case "$STATE" in
"closed")
echo "Lid is closed."
sudo /usr/sbin/hibernate
;;
"open")
echo "Lid is open."
;;
*)
die
;;
esac
Exit the editor and add execute rights to this file.
[root@tigga ~]# chmod +x /etc/acpi/actions/lid.sh
After the script is ready you have to set it up by editing /etc/acpi/events/sample.conf as root.
[root@tigga ~]# joe /etc/acpi/events/sample.conf
Add the following at the end of the file:
event=button/lid
action=sudo /etc/acpi/actions/lid.sh
Now the lid event is attached with the /etc/acpi/actions/lid.sh script. Restart the acpid service
to enable the function:
[root@tigga ~]# /sbin/service acpid restart
You are now ready to test the easy hibernation by just closing the lid of your notebook for a second.
If everything went fine the computer will suspend and then power down!
Sources and helpful links
Here you'll find some interesting and helpful links on Fedora Core 4 or Samsung X10 notebooks.
The Unofficial Fedora FAQ
[]
Fedora Core 4 Installation Notes by Stanton Finley
[]
Fedora Core 4 Tips & Tricks
[]
Matthias Hensler: Software Suspend with Linux and Fedora Core
[]
TuxMobil: Linux With Laptops, Notebooks, PDAs and Mobile Cell Phones
[]
FC4 T42 Setup
[]
Linux auf Samsung X10 - Andreas Grau
[]
Linux mit dem Samsung X10 XTC1500 II
[]
- Computer - Linux auf dem Samsung X10 XTC 1500 III
[]
SuSE 9.3 on a SAMSUNG X10 XTC1400 notebook
[]
Feel free to submit questions, comments, bugs and improvements to hype
This guide was written by Daniel Haehn alias hype - hype