Search:  
Gentoo Wiki

Samsung_X20

Contents

SAMSUNG X20 XVM 1600 V Hardware

Specifications

Note that there is a docking station available (Samsung X-Dock) which provides more ports, for example a parallel port. See an image here: [1]

BIOS

If you do not have BIOS version 08Z, you should Upgrade [2]

08Z adds a feature that the X20 can remember the WLAN on/off state.

Attention: After upgrading to BIOS version 10Z the x server did not start. So if you are not prepared to solve the problem do not upgrade to that version! I flashed 08Z back.

SAMSUNG X20 XVM 1730 III Hardware

Since there are different versions of the X20-Series, here is another subsection for this model (only differences mentioned):

Microsoft Windows

If you want to have a dual boot system, you may want to follow this article on how to make space on your hard drive to install.

VAR 2005-08-26: To save the existing Windows XP installation start the Gentoo LiveCD and use ntfsresize and alter your partition table. I left 10GB for XP. On my X20 that caused an errormessage that windows canĀ“t be booted ("No system" or so). To fix or avoid that follow this guide. It basically tells you to apply "sfdisk -d /dev/hda | sfdisk --no-reread -H255 /dev/hda". That solved my problem and XP seems healthy now.

Note that a Windows Recovery CD (plus two Samsung CDs with drivers and software) and some additional software were included in my package, so it is no problem to reinstall Windows from scratch (I messed up my windows when resizing), so you may want to format your whole hard drive, partition it and then install first windows, then Gentoo.

In the BIOS you can switch off the protection for a backup partition so you get more disk space.

Kernel

Use this .config as a starting point: Samsung X20/kernel config

CPU

See this guide.

Framebuffer splash

I seem to recall that there were some problems with the vesafb-tng framebuffer driver, so you should stick to the old one.

Note that you cannot use 1400x1050 resolution with framebuffer because of the faulty video bios that doesn't list this resolution as available, and the program 915resolution mentioned in the Xorg section cannot help here (would have to be executed before the kernel is loaded I think)

So I use:

File: /boot/grub/grub.conf
kernel /boot/vmlinuz-2.6.12-gentoo-r6
  root=/dev/hdaX
  video=vesafb:mtrr vga=0x317 quiet splash=silent,theme:YourTheme
  CONSOLE=/dev/tty1

initrd (hd0,2)/boot/fbsplash-yourtheme-1024x768

Hotkeys

Hard-wired hotkeys that just work

These hotkeys work out of the box:

Volume hotkeys

Use the following ~/.Xmodmap to get mute and volume controls to work. Load it at every X startup with xmodmap ~/.Xmodmap.

File: ~/.Xmodmap
keycode 174 = XF86AudioLowerVolume
keycode 176 = XF86AudioRaiseVolume
keycode 160 = XF86AudioMute

If you use KDE, emerge kmilo (yes, it says it's for thinkpad and vaio laptop, but has a generic plugin too) to get nice passive popups when adjusting the volume or muting/unmuting.

Go to Control Center -> KDE Components -> KDE Services and Start KMilo. Make sure to set the "Use" tick.

ACPI hotkeys

Use acpid to handle ACPI events such as closing the lid or pressing the Fn+Esc sleep button.

emerge sys-power/acpid
rc-update add acpid default

I handle all events in this file:

File: /etc/acpi/default.sh
#!/bin/sh

set $*

group=${1/\/*/}
action=${1/*\//}

case "$group" in
  button)
    case "$action" in
      power) /etc/acpi/powerbtn.sh
      ;;
      lid)   /etc/acpi/lidbtn.sh
      ;;
      sleep) /etc/acpi/sleepbtn.sh
      ;;
   esac
esac

Now create the shell scripts referenced in the above file. My lidbtn.sh (mostly copied from here: [3]) is posted below. I didn't need the console switching described there though.

Note: You have to compile uhci_hcd and ehci_hcd as modules and remove those modules with rmmod before going into suspend, otherwise if you use a USB device you laptop won't wakeup... Same goes for firewire devices.

File: /etc/acpi/lidbtn.sh
#!/bin/sh

if [ -e /tmp/lidclose ]
then
        echo "[" `date` "] Wakeup from standby (lid opened)" >> /var/log/acpi_events
 
        #Why not play a wakeup sound?
        #aplay wakeup.wav
 
        rm /tmp/lidclose
else
        echo "[" `date` "] Go to standby (lid closed)" >> /var/log/acpi_events
 
        #Why not play a shutdown sound
        #aplay shutdown.wav

        touch /tmp/lidclose

        # USB Module
        rmmod uhci_hcd
        rmmod ehci_hcd

        /sbin/hwclock --systohc
        echo mem > /sys/power/state
        /sbin/hwclock --hctosys

        modprobe uhci_hcd
        modprobe ehci_hcd
fi

Remember to give executable permission:

chmod +x /etc/acpi/lidbtn.sh

Note that it takes approximately 12 seconds for the lid event to be posted.

Extra Hotkeys

This laptop has three extra hotkeys above the main keyboard, suggested for launching a browser, a mail program and something else.

The mail button alone gives a keycode of 128 (use xev to test this) but the other do nothing. These keys produce scancodes which the kernel does not recognize. So you have to combine scancode and Linux keycode (has nothing to do with the X one) manually using setkeycodes:

setkeycodes 74 93
setkeycodes 75 94

You have to be root to do that (does not work under X). Now, xev shows X keycodes for all three buttons, so add

keycode 131 = F13
keycode 128 = F14
keycode 208 = F15

to your ~/.Xmodmap and you can use the three buttons as F13, F14 or F15 with e.g. kde.

The WLAN on/off switch works. See the BIOS section how to make it remember the on/off state.

Ethernet

Samsung X20 XVM 1600 V

The Samsung X20 uses a broadcom BCM4400-100MBit/s-Ethernet chip. There is a kernel-driver marked as "EXPERIMENTAL" which causes various problems. DO NOT use the kernel driver. Fortunately there is an ebuild net-misc/bcm4400 which creates a kernel module from the manufacturer's sources. You should install a recent version:

Code: Installing BCM4400-Driver
 # echo "net-misc/bcm4400 ~x86" >> /etc/portage/package.keywords
 # emerge -av net-misc/bcm4400
 # echo "bcm4400" >> /etc/modules.autoload.d/kernel-2.6

QUESTION: im using the kernel driver for some time now, what problems did you experienced? Actually the adapter did work with the kernel drivers but it caused strange error-messages in dmesg (I do not remember them exactly). However with the manufacturer-driver I experience the problem, that the adapter does not work after s3 resume...

The b44 module on recent Linux 2.4.x and 2.6 kernels works ok but occasionally does not reset correctly (exhibiting a symptom such as failing to receive DHCP). By booting with F12 pressed - boot from network option - this can be enough to prompt a reset.

Samsung X20 XVM 1730 III

See this guide.

WLAN

See this guide.

Card Reader

The card reader seems to work with drivers developed at [4].

The driver works for MMC and SD cards but not for Sony memory stick! The driver is included in the linux kernel since 2.6.17.

To use it you need to enable the following Options in the kernel config.

Linux Kernel Configuration:
 Device Drivers  --->
   MMC/SD Card support support  --->
     <M> MMC support
     [ ]   MMC debugging
     <M>   MMC block device driver
     <M>   Secure Digital Host Controller Interface support  (EXPERIMENTAL
     < >   Winbond W83L51xD SD/MMC Card Interface support

To use it, put the card in first, then run the following commands:

modprobe mmc_core
modprobe mmc_block
modprobe sdhci
modprobe vfat #if you have compiled vfat as module
mount -t vfat /dev/mmcblk0p1 /mnt/mmcdisk

Xorg

ATI Mobility Radeon X600

If you have this one, you may not use radeonfb, or X will not work; and you may not use vesafb, or suspend-to-ram won't work.

UPDATE: suspend-to-ram, suspend-to-disk and xgl run pretty fine with the following configuration files: (if they are missing: they should be up in no time ;) )

xorg.conf

with this configuration you should be able to run Xgl with ati-drivers (mobility x600) without any hardlocks , /etc/X11/xorg.conf:

File: /etc/X11/xorg.conf
Section "ServerLayout"
	Identifier     "Simple Layout"
	Screen      0  "aticonfig Screen 0" 0 0
	InputDevice    "Mouse1" "CorePointer"
	InputDevice    "Keyboard1" "CoreKeyboard"
	

	Option "BlankTime"	"10"	# Blank the screen in 10 minutes (Fake)
	Option "StandbyTime" "20"	# Turn off screen in 20 minutes (DPMS)
	Option "SuspendTime" "30"	# Full hibernation in 30 minutes (DPMS)
	Option "OffTime"	"40"	# Turn off DPMS monitor (DPMS)
EndSection

Section "Files"
# The module search path.  The default path is shown here.
#    ModulePath "/usr/lib/modules"
	FontPath     "/usr/share/fonts/misc"
	FontPath     "/usr/share/fonts/75dpi"
	FontPath     "/usr/share/fonts/100dpi"
	FontPath     "/usr/share/fonts/TTF"
	FontPath     "/usr/share/fonts/Type1"
	FontPath     "/usr/lib/X11/fonts/local/"
	FontPath     "/usr/lib/X11/fonts/misc/"
	FontPath     "/usr/lib/X11/fonts/75dpi/:unscaled"
	FontPath     "/usr/lib/X11/fonts/100dpi/:unscaled"
	FontPath     "/usr/lib/X11/fonts/Type1/"
	FontPath     "/usr/lib/X11/fonts/75dpi/"
	FontPath     "/usr/lib/X11/fonts/100dpi/"
EndSection

Section "Module"
# This loads the DBE extension module.
# This loads the miscellaneous extensions module, and disables
# initialisation of the XFree86-DGA extension within that module.
# This loads the font modules
#    Load        "type1"
#    Load        "speedo"
# This loads the GLX module
#    Load       "glx"
# This loads the DRI module
#    Load       "dri"
	Load  "dbe"  	# Double buffer extension
	SubSection "extmod"
		Option	    "omit xfree86-dga"   # don't initialise the DGA extension
	EndSubSection
	Load  "freetype"
#    Load        "xtt"
	Load  "dri"
	Load  "glx"
EndSection

Section "InputDevice"
	Identifier  "Keyboard1"
	Driver      "kbd"
	Option	    "AutoRepeat" "500 30"
# Specify which keyboard LEDs can be user-controlled (eg, with xset(1))
	Option	    "XkbRules" "xorg"
	Option	    "XkbModel" "pc102"
	Option	    "XkbLayout" "de"
EndSection

Section "InputDevice"
	Identifier  "Mouse1"
	Driver      "mouse"
	Option	    "Protocol" "IMPS/2"	# IntelliMouse PS/2
	Option	    "Device" "/dev/psaux"
# When using XQUEUE, comment out the above two lines, and uncomment
	Option	    "ZAxisMapping" "4 5 6 7"
# Emulate3Buttons is an option for 2-button mice
EndSection

Section "Monitor"
	Identifier   "samsung 1400"
	HorizSync    31.5 - 65.2
	VertRefresh  60.0 - 122.6
EndSection

Section "Monitor"
	Identifier   "aticonfig Monitor 0"
	Option "DPMS" "true"
EndSection

Section "Device"
	Identifier  "Standard VGA"
	Driver      "vga"
	VendorName  "Unknown"
	BoardName   "Unknown"
EndSection

Section "Device"
    #VideoRam    131072
    # Insert Clocks lines here if appropriate
	Identifier  "ati mobility x600"
	Driver      "ati"
EndSection

Section "Device"
	Identifier  "ATI Graphics Adapter 0"
	Driver      "fglrx"
	Option	    "no_accel" "no"
	Option	    "no_dri" "no"
#   Option       "DynamicClocks" "on"
	Option	    "mtrr" "on"
	Option	    "DesktopSetup" "Single"
	Option	    "ScreenOverlap" "0"
	Option	    "Capabilities" "0x00000000"
	Option	    "CapabilitiesEx" "0x00000000"
	Option	    "VideoOverlay" "on"
	Option	    "OpenGLOverlay" "off"
	Option	    "CenterMode" "off"
	Option	    "PseudoColorVisuals" "off"
	Option	    "Stereo" "off"
	Option	    "StereoSyncEnable" "1"
	Option	    "FSAAEnable" "no"
	Option	    "FSAAScale" "1"
	Option	    "FSAADisableGamma" "no"
	Option	    "FSAACustomizeMSPos" "no"
	Option	    "FSAAMSPosX0" "0.000000"
	Option	    "FSAAMSPosY0" "0.000000"
	Option	    "FSAAMSPosX1" "0.000000"
	Option	    "FSAAMSPosY1" "0.000000"
	Option	    "FSAAMSPosX2" "0.000000"
	Option	    "FSAAMSPosY2" "0.000000"
	Option	    "FSAAMSPosX3" "0.000000"
	Option	    "FSAAMSPosY3" "0.000000"
	Option	    "FSAAMSPosX4" "0.000000"
	Option	    "FSAAMSPosY4" "0.000000"
	Option	    "FSAAMSPosX5" "0.000000"
	Option	    "FSAAMSPosY5" "0.000000"
	Option	    "UseFastTLS" "0"
	Option	    "BlockSignalsOnLock" "on"
	Option	    "UseInternalAGPGART" "no"
	Option	    "ForceGenericCPU" "no"
	Option	    "KernelModuleParm" "agplock=0"
	Option	    "PowerState" "1"
	BusID       "PCI:1:0:0"
EndSection

Section "Screen"
	Identifier "Screen 1"
	Device     "ati mobility x600"
	Monitor    "samsung 1400"
	DefaultDepth     24
	SubSection "Display"
		Viewport   0 0
		Depth     8
		Modes    "1280x1024" "1024x768" "800x600" "640x480"
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     16
		Modes    "1400x1050"
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     24
		Modes    "1400x1050"
	EndSubSection
EndSection

Section "Screen"
	Identifier "aticonfig Screen 0"
	Device     "ATI Graphics Adapter 0"
	Monitor    "aticonfig Monitor 0"
	DefaultDepth     24
	SubSection "Display"
		Viewport   0 0
		Depth     24
	EndSubSection
EndSection

Section "DRI"
	Mode         0666
EndSection

Intel GMA 915GM

See this HowTo.

hibernate.conf

Here is the hibernate.conf, which works fine in conjunction with the suspend2-sources, ati-drivers & hibernate-script, /etc/hibernate/hibernate.conf:

File: /etc/hibernate/hibernate.conf
# Example hibernate.conf file. Adapt to your own tastes.
# Options are not case sensitive.
#
# Run "hibernate -h" for help on the configuration items.

##############################################################################
### Choose your Suspend method. You currently have 3 choices:
###
###    suspend2            Software Suspend 2 (requires kernel patches from
###                        http://www.suspend2.net/)
###
###    sysfs_power_state   Uses /sys/power/state to suspend (activates pmdisk
###                        on kernels < 2.6.8, or vanilla swsusp otherwise).
###
###    acpi_sleep          Uses /proc/acpi/sleep to activate swsusp, or other
###                        ACPI sleep state supported by your machine.
###
##############################################################################

### suspend2 (for Software Suspend 2)
UseSuspend2 yes
Reboot no
EnableEscape yes
DefaultConsoleLevel 1
Compressor lzf
Encryptor none
# ImageSizeLimit 200
#ImageSizeLimit nocache
## useful for initrd usage:
 SuspendDevice swap:/dev/hda6
## Powerdown method - 3 for suspend-to-RAM, 4 for ACPI S4 sleep, 5 for poweroff
# PowerdownMethod 5
## Any other /proc/software_suspend setting can be set like so:
 ProcSetting expected_compression 50
## Or traditionally like this:
# Suspend2AllSettings 0 0 2056 65535 5
## Or even from the results of hibernate --save-settings with this:
# Suspend2AllSettingsFile /etc/hibernate/suspend-settings.conf
## For filewriter:
# FilewriterLocation /suspend_file 1000
# VerifyFilewriterResume2 yes
 ProcSetting userui_program /sbin/suspend2ui_text
#FilewriterLocation /swap/suspend 1250
#VerifyFileWriterResume2 yes
 ProcSetting extra_pages_allowance 5000

########################################################ProcSetting disable_textmode_support 0
#ProcSetting userui_program /sbin/suspend2ui_fbsplash


### sysfs_power_state
## To use /sys/power/state to suspend your machine (which may offer
## suspend-to-RAM, suspend-to-disk, standby, etc) comment out all the options
## above for Software Suspend 2, below for acpi_sleep, and uncomment this line.
## You may replace mem with any one of the states from "cat /sys/power/state"
# UseSysfsPowerState mem
# PowerdownMethod shutdown

### acpi_sleep
## To use ACPI to suspend your machine (via /proc/acpi/sleep), comment out
## all the options above for Software Suspend 2 and sysfs, and uncomment this
## line. The number refers to the ACPI sleep state - 3 is suspend-to-RAM and
## 4 is suspend-to-disk.
# UseACPISleep 4

##############################################################################
### Some global settings
##############################################################################

Verbosity 0
LogFile /var/log/hibernate.log
LogVerbosity 1
# AlwaysForce yes
# AlwaysKill yes
# HibernateVT 15
Distribution gentoo
# XDisplay :0

##############################################################################
### Scriptlets
###   Scriptlets provide support for doing all sorts of things before and after
###   suspending. The defaults settings here should work for most people, but
###   you may wish to edit these to taste. Consult "hibernate -h" for help on
###   the configuration settings.
##############################################################################

### bootsplash
## If you use bootsplash, also enabling SwitchToTextMode is recommended if
## you use X, otherwise you may end up with a garbled X display.
# Bootsplash on
# BootsplashConfig /etc/bootsplash/default/config/bootsplash-1024x768.cfg

### clock
SaveClock restore-only

### devices
# IncompatibleDevices /dev/dsp /dev/video*

### diskcache
# DisableWriteCacheOn /dev/hda

### fbsplash (enable SwitchToTextMode if you use this)
# FBSplash on
# FBSplashTheme suspend2

### filesystems
# Unmount /nfsshare /windows /mnt/sambaserver
 UnmountFSTypes smbfs nfs vfat ntfs
# UnmountGraceTime 1
# Mount /windows

### grub
# ChangeGrubMenu yes
# GrubMenuFile /boot/grub/menu.lst
# AlternateGrubMenuFile /boot/grub/menu-suspended.lst
# BackupGrubMenuFile /boot/grub/menu.lst.hibernate.bak

### hardware_tweaks
# IbmAcpi yes
# RadeonTool yes

### lilo
# EnsureLILOResumes yes

### lock (generally you only want one of the following options)
# LockConsoleAs root
 LockXScreenSaver yes
# LockKDE yes
# LockXLock yes
# LockXAutoLock yes

### misclaunch
# OnSuspend 20 echo "Good night!"
# OnResume 20 echo "Good morning!"
#OnSuspend 10 sudo /sbin/ifconfig eth0
#OnSuspend 10 sudo /sbin/ifconfig eth1
#OnSuspend 15 umount /media/data01
#OnSuspend 15 umount /media/win

OnSuspend 15 sudo killall dhcpcd
OnSuspend 20 echo "Good night!"

#OnResume 10 /sbin/modprobe ipw2200
OnResume 10 sudo /sbin/dhcpcd eth0
#OnResume 15 mount /media/data01
#OnResume 15 mount /media/win
OnResume 10 sudo /etc/init.d/acpid restart
OnResume 20 echo "Good morning!"


### modules
# UnloadModules snd_via82cxxx usb-ohci
#UnloadModules fglrx
 UnloadAllModules yes
UnloadBlacklistedModules yes
LoadModules auto
# LoadModulesFromFile /etc/modules

### modules-gentoo
 GentooModulesAutoload yes

### network
# DownInterfaces eth0
# UpInterfaces auto

### pcmcia
# EjectCards yes

### programs
 IncompatiblePrograms xmms

### services
# RestartServices postfix
# StopServices alsasound
# StartServices aumix
RestartServices alsasound hotplug

### vbetool
 EnableVbetool yes
# RestoreVbeStateFrom /var/lib/vbetool/vbestate
# VbetoolPost yes
# RestoreVCSAData yes

### xhacks
SwitchToTextMode yes
# UseDummyXServer yes

### xstatus
## This can be set to gnome, kde or x:
 XStatus gnome
 XSuspendText Preparing to suspend...
 XResumeText Resuming from suspend...
## When using XStatus x, and you have xosd installed:
# XosdSettings --font -misc-fixed-medium-r-semicondensed--*-120-*-*-c-*-*-* --colour=Green --shadow 1 --pos bottom --align center --offset 50

ram.conf

Here is the ram.conf, which works fine in conjunction with the suspend2-sources, ati-drivers & hibernate-script, /etc/hibernate/ram.conf:

File: /etc/hibernate/ram.conf
### sysfs_power_state
UseSysfsPowerState mem

##############################################################################
### Some global settings
##############################################################################

Verbosity 0
LogFile /var/log/hibernate.log
LogVerbosity 1
# AlwaysForce yes
# AlwaysKill yes
# HibernateVT 15
Distribution gentoo
# XDisplay :0

### bootsplash
## If you use bootsplash, also enabling SwitchToTextMode is recommended if
## you use X, otherwise you may end up with a garbled X display.
# Bootsplash on
# BootsplashConfig /etc/bootsplash/default/config/bootsplash-1024x768.cfg

### clock
SaveClock restore-only

### devices
# IncompatibleDevices /dev/dsp /dev/video*

### diskcache
# DisableWriteCacheOn /dev/hda

### fbsplash (enable SwitchToTextMode if you use this)
# FBSplash on
# FBSplashTheme suspend2

### filesystems
# Unmount /nfsshare /windows /mnt/sambaserver
 UnmountFSTypes smbfs nfs vfat ntfs
# UnmountGraceTime 1
# Mount /windows

### grub
# ChangeGrubMenu yes
# GrubMenuFile /boot/grub/menu.lst
# AlternateGrubMenuFile /boot/grub/menu-suspended.lst
# BackupGrubMenuFile /boot/grub/menu.lst.hibernate.bak

### hardware_tweaks
# IbmAcpi yes
# RadeonTool yes

### lilo
# EnsureLILOResumes yes

### lock (generally you only want one of the following options)
# LockConsoleAs root
 LockXScreenSaver yes
# LockKDE yes
# LockXLock yes
# LockXAutoLock yes

### misclaunch
# OnSuspend 20 echo "Good night!"
# OnResume 20 echo "Good morning!"
#OnSuspend 10 sudo /sbin/ifconfig eth0
#OnSuspend 10 sudo /sbin/ifconfig eth1
#OnSuspend 15 umount /media/data01
#OnSuspend 15 umount /media/win

OnSuspend 15 sudo killall dhcpcd
OnSuspend 20 echo "Good night!"

#OnResume 10 /sbin/modprobe ipw2200
OnResume 10 sudo /sbin/dhcpcd eth0
#OnResume 15 mount /media/data01
#OnResume 15 mount /media/win
OnResume 10 sudo /etc/init.d/acpid restart
OnResume 20 echo "Good morning!"

### modules
# UnloadModules snd_via82cxxx usb-ohci
 UnloadAllModules yes
UnloadBlacklistedModules yes
LoadModules auto
# LoadModulesFromFile /etc/modules

### modules-gentoo
 GentooModulesAutoload yes

### network
# DownInterfaces eth0
# UpInterfaces auto

### pcmcia
# EjectCards yes

### programs
 IncompatiblePrograms xmms

### services
# RestartServices postfix
# StopServices alsasound
# StartServices aumix

### vbetool
EnableVbetool yes
# RestoreVbeStateFrom /var/lib/vbetool/vbestate
# VbetoolPost yes
# RestoreVCSAData yes

### xhacks
SwitchToTextMode yes
# UseDummyXServer yes

### xstatus
## This can be set to gnome, kde or x:
 XStatus gnome
 XSuspendText Preparing to suspend...
 XResumeText Resuming from suspend...
## When using XStatus x, and you have xosd installed:
# XosdSettings --font -misc-fixed-medium-r-semicondensed--*-120-*-*-c-*-*-* \
# \--colour=Green --shadow 1 --pos bottom --align center --offset 50

See also

Most of the information you can find on this page is from one of the above sources.

Retrieved from "http://www.gentoo-wiki.info/Samsung_X20"

Last modified: Sun, 24 Aug 2008 06:04:00 +0000 Hits: 40,923