HARDWARE Samsung X30 WVC 1700
From Gentoo Linux Wiki
| Laptops • TV Tuner Cards • Wireless • Servers • Storage • Other Hardware • Motherboards • Related |
Contents |
[edit] Announcements & Updates
[edit] Announcements
- Please contribute your experiences with s3 resume to this bug: http://bugme.osdl.org/show_bug.cgi?id=3203 Thanks!
[edit] Updates
- 2005-08-25 Created first version, based on the WVC1500.
[edit] General
In this guide I want to describe howto install Gentoo Linux on a Samsung X30 Laptop with special focus on the WVC 1700 specialities.
I bought my X30 in April 2004 and recently decided to install Linux too, because some things simply work better. I stick to the excellent guide for the Samsung X30 WVC 1500 and mention the differences.
So now let's begin. I'll just write down the problems I was confronted with during the installation and which solutions I found.
[edit] Basic installation
The basic installation of gentoo works without problems. Just follow the installation-guide on www.gentoo.org/doc. I simply left these cflags because I don't think that other cflags enhance the performance:
| File: /etc/make.conf |
CFLAGS="-O2 -march=pentium4"
CHOST="i686-pc-linux-gnu"
CXXFLAGS="${CFLAGS}"
USE="-qt -kde gtk gnome hal howl dvd acpi alsa cdr avi ethereal gif imap jpeg junit mpeg \
oggvorbis opengl pcmcia png pnp quicktime samba ssl tiff truetype usb wmf X x86"
|
I currently use gentoo-dev-sources-2.6.12-r9. Nearly everything works with that release. Even S3 suspend works fine, the only problem is, that the nvidia-video-card doesn't support ACPI, yet, and that the display isn't reinitialized after S3 resume so practically S3 is unusable. This is not a kernel-side but a driver-side bug!
[edit] Graphics card
nvidia provides pretty good drivers, which are also in the portage tree. Unfortunately they still seem to have problems with s3-suspend.
It is important that the module is loaded at startup. Even if you have automatic module loading enabled you should append the following line to your /etc/modules.autoload.d/kernel-2.6:
| File: /etc/modules.autoload.d/kernel-2.6 |
# video-card nvidia |
[edit] Synaptics touchpad
A second thing we should do before configuring the x-server is to emerge x11-misc/synaptics to support our touchpad. Configuration of the touchpad will be done in the next section.
[edit] x.org
Simply follow the desktop-configuration-recources provided by gentoo.org. The tricky part is to set up your {filename|/etc/X11/xorg.conf} to use the 1680x1050-display resolution of the internal display. Simply use the following xorg.conf. Note that I have not yet gotten TV-Out and the VGA-Out to work properly.
| File: /etc/X11/xorg.conf |
Section "Files"
RgbPath "/usr/lib/X11/rgb"
# For XFS, uncomment this and comment the others
# FontPath "unix/:-1"
FontPath "/usr/share/fonts/local/"
FontPath "/usr/share/fonts/misc/"
FontPath "/usr/share/fonts/75dpi/:unscaled"
FontPath "/usr/share/fonts/100dpi/:unscaled"
FontPath "/usr/share/fonts/Type1/"
FontPath "/usr/share/fonts/TTF/"
# FontPath "/usr/share/fonts/CID/"
# FontPath "/usr/share/fonts/Speedo/"
FontPath "/usr/share/fonts/75dpi/"
FontPath "/usr/share/fonts/100dpi/"
ModulePath "/usr/lib/modules"
EndSection
# **********************************************************************
# Module section -- this is an optional section which is used to specify
# which run-time loadable modules to load when the X server starts up.
# **********************************************************************
Section "Module"
Load "dbe" # Double-Buffering Extension
Load "dri" # Direct Rendering Interface
Load "glx" # nvidia GLX
Load "extmod"
# This loads the Type1 and FreeType font modules
Load "type1"
Load "freetype"
# Synaptics Touchpad
Load "synaptics"
EndSection
# **********************************************************************
# Server flags section. This contains various server-wide Options.
# **********************************************************************
Section "ServerFlags"
Option "blank time" "10" # 10 minutes
Option "standby time" "20"
Option "suspend time" "30"
Option "off time" "60"
EndSection
# **********************************************************************
# Input devices
# **********************************************************************
# **********************************************************************
# Core keyboard's InputDevice section
# **********************************************************************
Section "InputDevice"
Identifier "KeyboardLaptop"
Driver "keyboard"
Option "Xleds" "1 2 3"
Option "CoreKeyboard"
Option "XkbModel" "samsungx30"
Option "XkbRules" "xorg"
Option "XkbLayout" "de"
# Option "XkbVariant" "nodeadkeys"
EndSection
# **********************************************************************
# Core Pointer's InputDevice section
# **********************************************************************
Section "InputDevice"
Identifier "MouseUSB"
Driver "mouse"
Option "CorePointer"
Option "Protocol" "IMPS/2"
Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "4 5"
EndSection
Section "InputDevice"
Identifier "MouseSynaptics"
Driver "synaptics"
Option "AlwaysCore"
Option "Device" "/dev/psaux"
Option "Protocol" "auto-dev"
Option "Buttons" "5"
Option "LeftEdge" "1700"
Option "RightEdge" "5300"
Option "TopEdge" "1700"
Option "BottomEdge" "4200"
Option "FingerLow" "25"
Option "FingerHigh" "30"
Option "MaxTapTime" "180"
Option "MaxTapMove" "220"
Option "VertScrollDelta" "100"
Option "MinSpeed" "0.06"
Option "MaxSpeed" "0.12"
Option "AccelFactor" "0.0010"
Option "SHMConfig" "on"
#Option "Repeater" "/dev/ps2mouse"
EndSection
# **********************************************************************
# Monitor section
# **********************************************************************
Section "Monitor"
Identifier "MonitorLaptop"
VendorName "Samsung"
ModelName "Flat Panel 1680x1050"
HorizSync 31.5-90.0
VertRefresh 59.0-85.0
# 1680x1050 @ 60.00 Hz (GTF) hsync: 65.22 kHz; pclk: 147.14 MHz
Modeline "1680x1050" 147.14 1680 1784 1968 2256 1050 1051 1054 1087 -HSync +Vsync
Option "dpms"
EndSection
# **********************************************************************
# Graphics device section
# **********************************************************************
Section "Device"
Identifier "DeviceNvidia"
Driver "nvidia"
Option "NvAGP" "1"
Option "DPMS"
Option "backingstore"
Option "IgnoreEDID" "True"
# Screen 0
Option "TwinView" "on"
Option "HorizSync" "CRT-0: 30-50; DFP-0: 31.5-100"
Option "VertRefresh" "CRT-0: 60; DFP-0: 59-76"
Option "MetaModes" "CRT-0: 1680x1050, DFP-0: 1680x1050"
#Option "ConnectedMonitor" "CRT-0, DFP-0"
#Option "SecondMonitorHorizSync" "31.5-100"
#Option "SecondMonitorVertRefresh" "59-76"
#Option "TVStandard" "PAL-B"
#Option "UseEdidFreqs" "on"
Option "TwinViewOrientation" "Clone"
EndSection
# **********************************************************************
# Screen sections.
# **********************************************************************
Section "Screen"
Identifier "ScreenLaptop"
Device "DeviceNvidia"
Monitor "MonitorLaptop"
DefaultColorDepth 24
Subsection "Display"
Depth 24
Modes "1680x1050"
Viewport 0 0
EndSubsection
EndSection
# **********************************************************************
# ServerLayout sections.
# **********************************************************************
Section "ServerLayout"
Identifier "LayoutDefault"
InputDevice "MouseUSB" "CorePointer"
InputDevice "MouseSynaptics" "AlwaysCore"
InputDevice "KeyboardLaptop" "CoreKeyboard"
Screen "ScreenLaptop"
EndSection
|
Now type startx to test whether your x-server is working. If you see a nice nvidia-logo you're done! You can now add a graphical login-manager to the default runlevel:
rc-update add xdm default
[edit] Ethernet
The Broadcom Corporation BCM4401 100Base-T ethernet controller is supported by the kernel
| Linux Kernel Configuration: Ethernet |
Device Drivers --->
Networking support --->
[*] Networking support
[*] Network device support
Ethernet (10 or 100Mbit) --->
[*] EISA, VLB, PCI and on board controllers
<*> Broadcom 4400 ethernet support (EXPERIMENTAL)
|
I saw no need to compile this as a module. You can now configure eth0 in /etc/conf.d/net and add it to the default-runlevel.
[edit] WLAN
Note: In the Kernel 2.6.13-rc-mm1 which I tried (to fix some ACPI troubles), the ipw2100 Support is in the kernel, although in that version the code seems broken. When it is in the Kernel you won't need to emerge the drivers, only the firmware. Install the ipw2100-drivers:
| Code: Install ipw2100-drivers |
emerge ipw2100 ipw2100-firmware wireless-tools |
Now configure your WLAN-adapter as eth1 in /etc/conf.d/net and add net.eth1 to the default-runlevel if you want.
[edit] Sound
The Soundcard is a AC97-Compliant "Cirrus Logic CS4202" which is supported by the kernel thanks to the ALSA-Project. Simply enable the appropriate module in your kernel-config:
| Linux Kernel Configuration: Sound |
Device Drivers --->
Sound --->
<M> Sound card support
Advanced Linux Sound Architecture --->
<M> Advanced Linux Sound Architecture
<M> Sequencer support
<M> Sequencer dummy client
<M> OSS Mixer API
<M> OSS PCM (digital audio) API
[ ] OSS Sequencer API
[ ] Verbose printk
[ ] Debug
PCI devices --->
<M> Intel/SiS/nVidia/AMD/ALi AC97 Controller
|
To avoid problems you should ensure that the sound-module is loaded at start-up even if you have module-auto-loading enabled. So append the following line to /etc/modules.autoload.d/kernel-2.6:
| File: /etc/modules.autoload.d/kernel-2.6 |
# sound snd-intel8x0 |
You can test the audio-device after having loaded the module:
| Code: Loading sound-module |
modprobe snd-intel8x0 |
[edit] Modem
The modem is a winmodem. Samsung says it is a AC97-compliant "SENS LT56ADW Modem" but actually I do not really care. The important thing is that it is supported by the kernel and the slmodem-package.
To make it work you need additional kernel modules and a userspace program. Enable the Kernel-Module:
| Linux Kernel Configuration: Modem |
Device Drivers --->
Sound --->
<M> Sound card support
Advanced Linux Sound Architecture --->
PCI devices --->
<M> Intel/SiS/nVidia/AMD MC97 Modem (EXPERIMENTAL)
|
And recompile the Kernel.
The package is net-dialup/slmodem.
| Code: Emerge slmodem |
emerge '>=net-dialup/slmodem-2.9.9-r2' |
Lookup your country in the list of supported countries.
| Code: List supported countries |
slmodemd --countrylist |
Configure the modem-daemon. Be sure to substitute the COUNTRY parameter by the one you looked up.
| File: /etc/conf.d/slmodem |
# Config file for /etc/init.d/slmodemd DEV=/dev/ttySL0 COUNTRY=AUSTRIA GROUP=dialout # the group should be kept in sync with: # /etc/devfs.d/slmodem (devfs) # /etc/udev/rules.d/55-slmodem.rules (udev) # The following symlink will be created if uncommented LN_DEV=/dev/modem # Raise priority to reduce modem dropouts NICE=-6 # ALSA Options: # The following sets the ALSA (alsasound) init script to # be a dependency of the slmodem one. It does also provides # ALSA support. # MODULE=alsa # The modem hardware slot # use "modem:0", "modem:1", etc. # usually modem:1 is used # HW_SLOT=modem:1 # Non-ALSA OPTIONS: MODULE=slamr # or # MODULE=slusb |
Now you can start the modem-daemon:
| Code: Startup the modem-daemon |
/etc/init.d/slmodem start |
For dialing up there are some programs available. A list could be found at the Gentoo Packages Dialup-Category. I use wvdial.
| Code: Emerge wvdial |
emerge wvdial |
Adopt the configuration to your needs. Substitute the Phone, Username and Password with the ones your provider gave you.
| File: /etc/wvdial.conf |
# # wvdial.conf by ChristophTavan <chefturner@web.de> # # 2005-04-20 # [Dialer Defaults] Modem = /dev/ttySL0 Stupid Mode = 1 Baud = 460800 Init1 = ATZ Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 ISDN = 0 Modem Type = Analog Modem # account for yourISP [Dialer yourISP] Phone = PHONENUMBER Username = USERNAME Password = PASSWORD Carrier Check = no |
If you want to add other accounts to your /etc/wvdial.conf then always include Carrier Check = no code>. Otherwise wvdial wont work with slmodem.
Now you are ready to connect to the internet (of course substitute yourisp with the appropriate account-name).
| Code: Connect to the internet |
wvdial yourisp |
If you receive "Cannot open /dev/ttySL0: Cannot get information for serial port." code> you must update your libwvstreams to at least 4.0.2.
| Code: Update libwvstreams |
ACCEPT_KEYWORDS="~x86" emerge >=net-libs/wvstreams-4.0.2 |
Congratulations! Have fun surfing the web with amazing 5.3K/s!!!!!!!!!
[edit] Powersaving & ACPI
OK, welcome to the probably most tricky chapter of this howto. Let's start with the configuration of the SpeedStepping-Functions since this is not so complicated. We will configure ACPI later.
[edit] Speedstepping
First you should install the necessary software:
| Code: Install cpufreqd |
emerge sys-power/cpufreqd |
Now you have to enable speedstepping in you kernel:
| Linux Kernel Configuration: Speedstepping |
Power management options (ACPI, APM) --->
[*] Power Management support
CPU Frequency scaling --->
[*] CPU Frequency scaling
Default CPUFreq governor (userspace) --->
<*> 'performance' governor
<*> 'powersave' governor
[*] /proc/sys/cpu/ interface (2.4. / OLD)
<*> CPU frequency table helpers
--- CPUFreq processor drivers
<*> Intel Enhanced SpeedStep
|
Just follow the HOWTO in the gentoo-handbook If it looks like this you're done! Start the speedfreqd with /etc/init.d/speedfreq start. You can now control the speedfreqd using the tool speedfreq -m. You shouldn't forget to rc-update add speedfreq boot to make speedfreqd start up automatically with every system-reboot.
[edit] ACPI
This was the part on which I lost hours and hours... But finally I've got it working! I actually can use nearly every ACPI-Feature except the Standby-Modes. None of them works right now, neither S1 nore S3. I think S4 can be set up with PM_DISK but I didn't try that yet.
First it is a good thing to upgrade to the latest BIOS-Version (I'm running 08UK at the moment). Just get the CD-Image or wahtever from samsungpc.com and follow the instructions described there.
there is no cd-image, please insert update-procedure here
Unfortunately also the new BIOS still comes with a broken DSDT so you have to follow the great howto in the gentoo-forum to fix the DSDT or if you're too lazy just download my fixed one from my website.
The new 2.6.9-kernel brings built-in-support for custom-DSDT-loading! Just check in your kernel config:
| Linux Kernel Configuration: Hotplug |
Device Drivers --->
Generic Driver Options --->
[ ] Select only drivers that don't need compile-time external firmware <- DESELECT THIS!
[*] Prevent firmware from being built
<*> Hotplug firmware loading support
|
Recompile the kernel and now all needed options for ACPI-Support can be activated in the kernel config (I renamed the dsdt.hex-file to acpi_dsdt.h and placed it in /usr/src/ct!!!):
| Linux Kernel Configuration: ACPI |
Power management options (ACPI, APM) --->
[*] Power Management support
[*] ACPI Support
[*] Sleep States (EXPERIMENTAL)
<*> AC Adapter
<*> Battery
<*> Button
<*> Video
<*> Fan
<*> Processor
<*> Thermal Zone
< > ASUS/Medion Laptop Extras
< > IBM ThinkPad Laptop Extras
< > Toshiba Laptop Extras
[*] Include Custom DSDT
(/usr/src/ct/acpi_dsdt.h) Custom DSDT Table file to include
(0) Disable ACPI for systems before Jan 1st this year
[*] Debug Statements
[*] Power Management Timer Support
|
Recompile and install the kernel. Finally, don't forget to install the acpid and to edit /etc/acpi/events/default to your needs:
| Code: Install acpid |
emerge acpid /etc/init.d/acpid start rc-update add acpid boot |
I researched an error which I always got and which prevented me from using the acpi properly. After I found the part, I simply uncommented it and now it works. (This should also work with older/non-mm1-kernels)
| Code: diff for fixing a bug |
--- linux-2.6.13-rc6-mm1/drivers/acpi/ec.c~hm-dsdt-fix 2005-08-21 21:22:07.336703000 +0200
+++ linux-2.6.13-rc6-mm1/drivers/acpi/ec.c 2005-08-21 21:22:18.426703000 +0200
@@ -842,7 +842,7 @@
if (bit_width != 8 && acpi_strict) {
printk(KERN_WARNING PREFIX "acpi_ec_space_handler: bit_width should be 8\n");
- return_VALUE(AE_BAD_PARAMETER);
+// return_VALUE(AE_BAD_PARAMETER);
}
ec = (union acpi_ec *)handler_context;
|
[edit] USB
USB is supported by default by the kernel. You just have to enable it:
| Linux Kernel Configuration: USB |
Device Drivers ---> USB support ---> <*> Support for Host-side USB <M> EHCI HCD (USB 2.0) support [ ] Full speed ISO transactions (EXPERIMENTAL) [ ] Root Hub Transaction Translators (EXPERIMENTAL) <M> OHCI HCD support <M> UHCI HCD (most Intel and VIA) support |
At least these three modules should be enabled. In addition USB device filesystem code> and especially USB Mass Storage support code> could be interesing. Simply enable everything you need in the USB-options and then recompile the kernel.
Now it is a good idea to emerge the hotplug-utilitie so that devices like mice or USB-sticks that you plug in while your laptop is running are initialized automatically:
| Code: emerge hotplug |
emerge hotplug hotplug-base coldplug |
[edit] FireWire
FireWire (IEEE 1394) is also supported by the Kernel:
| Linux Kernel Configuration: FireWire |
Device Drivers ---> IEEE 1394 (FireWire) support ---> <M> IEEE 1394 (FireWire) support <M> OHCI-1394 support --- Protocol Drivers <M> OHCI-1394 Video support <M> SBP-2 support (Harddisks etc.) [ ] Enable Phys DMA support for SBP2 (Debug) <M> Ethernet over 1394 <M> OHCI-DV I/O support <M> Raw IEEE1394 I/O support < > IEC61883-1 Plug support |
Simply enable everything you may need. I suppose FireWire will work fine then but I do not have any firewire-device for testing-purposes...
[edit] Special-Keys (FN-Keys)
- Rest-Button (FN + Esc)
- This button produces the acpi-event button/sleep SLPB and can be configured using acpid.
- Battery Level (FN + F2)
- Button makes raw bios calls and works out of the box.
- LCD/CRT (FN + F4)
- I was not able to get this button work, yet.
- Mute (FN + F6)
LSee volume keys below.
- Numlock (FN + F11) & Scroll Lock (FN + F12)
- Again raw bios calls, they always work.
- Display Brightness (FN + Uparrow / FN + Downarrow)
- Again raw bios calls, they always work.
- Volume Keys (FN + Leftarrow / FN + Rightarrow / FN + F6)
- They send standard keycodes which you can read-out using xev. I mapped the keycodes to symbols using xkb, see next point.
- Info-, E-Mail-,OK- and WLAN-Keys
- The Wlan-Key is working out of the box. To make all the other keys on the left side work, you have to add these two lines to your /etc/conf.d/start.local:
| File: /etc/conf.d/start.local |
# Enable Info- and OK-MM-Keys on Samsung X30 setkeycodes 74 128 setkeycodes 75 127 |
Now all the multimedia-keys produce keycodes you can read out using xev. To make these keys usable we have to map the keycodes to corresponding symbols using xkb. Let me summarize first what keycodes the keys produce and which symbol we want to give each key:
| Key | Keycode | XKB-Alias | Symbol |
| FN + F6 | 160 | <I20> | XF86Mute |
| FN + Leftarrow | 174 | <I2E> | XF86AudioLowerVolume |
| FN + Rightarrow | 176 | <I30> | XF86AudioRaiseVolume |
| Info | 232 | <I68> | XF86WWW |
| 128 | <HYPR> | XF86Mail | |
| OK | 133 | <AE13> | XF86Terminal |
To make this work we have to add the following lines to /etc/X11/xkb/symbols/inet:
| File: /etc/X11/xkb/symbols/inet |
//
// Keycode-to-symbol mappings for Samsung X30
// by Christoph Tavan <chefturner@web.de>
//
partial alphanumeric_keys
xkb_symbols "samsungx30" {
name[Group1]= "Samsung X30";
// Audio-Keys
key <I20> { [ XF86AudioMute ] };
key <I2E> { [ XF86AudioLowerVolume ] };
key <I30> { [ XF86AudioRaiseVolume ] };
// Special-Keys on the left
key <I68> { [ XF86WWW ] };
key <HYPR> { [ XF86Mail ] };
key <AE13> { [ XF86Terminal ] };
};
|
Now we have to tell xkb that there are new keycode-to-symbol mappings called samsungx30 in the "inet"-symbols-table. So we have to edit a line in /etc/X11/xkb/rules/xorg:
| File: /etc/X11/xkb/rules/xorg |
! $inetkbds = airkey acpi scorpius azonaRF2300 \
...
samsungx30 samsung4500 samsung4510 \
...
|
All we have to do is to ensure, that the InputDevice-section for the keyboard in /etc/X11/xorg.conf looks like:
| File: /etc/X11/xorg.conf |
...
Section "InputDevice"
Identifier "KeyboardLaptop"
Driver "keyboard"
Option "CoreKeyboard"
Option "XkbRules" "xorg"
Option "XkbModel" "samsungx30"
Option "XkbLayout" "de"
#Option "XkbVariant" "nodeadkeys"
#Option "XkbOptions" ""
EndSection
...
|
Restart your X-server and if setxkbmap -print outputs the following, congratulations, you're (almost) done!
| Code: setxkbmap output |
xkb_keymap {
xkb_keycodes { include "xfree86+aliases(qwertz)" };
xkb_types { include "complete" };
xkb_compat { include "complete" };
xkb_symbols { include "pc/pc(pc105)+pc/de+inet(samsungx30)" };
xkb_geometry { include "pc(pc104)" };
};
|
Now all your MM-keys produce symbols your windowmanager can understand. You can configure the functionality of the keys with the configuration-utilities of your windowmanager (e.g. KDE-Control Center) or with some other software (e.g. x11-misc/hotkeys).
Note for KDE-users: In KDE the Control Center-settings overwrite the settings from your xorg.conf! So if you have Keyboard Layouts enabled in your KDE-Control Center make sure, that you choose "Samsung X30 Notebook" as keyboard-model there.
