Samsung E152-Aura T5750 Dajuan

- Hints for the installation of Gentoo Linux -


Versions of this document:
2009-02-03:	Patch for the ath5k module, Patch for the special function keys, minor updates
2008-10-14:	changes made for gentoo-sources-2.6.27, the new Nvidia driver and the wlan support
2008-10-03:	after several hours... got wlan working
2008-09-27:     suspend-to-ram and suspend-to-disk work
2008-09-24:	Some additional links to gentoo-wiki.com
2008-09-21:	version 1
URL of this document:http://www.empanyc.net/misc/samsung_e152.html
(a copy is also available in the unofficial Gentoo-Wiki: http://en.gentoo-wiki.com/wiki/Samsung_E152-Aura_T5750_Dajuan )


Hint: See Gentoo_on_laptops, Power_Management for general information.
Notice: the current kernel version used for this guide is: gentoo-sources-2.6.28
gentoo-wiki.com is rebuilding after a harddisk loss, some links might still be broken.

Some things work only with unstable software - use this guide at own risk.


Hardware over PCI (lspci)
00:00.0 Host bridge: Intel Corporation Device 2a40 (rev 07)
00:01.0 PCI bridge: Intel Corporation Device 2a41 (rev 07)
00:1a.0 USB Controller: Intel Corporation USB UHCI Controller #4 (rev 03)
00:1a.1 USB Controller: Intel Corporation USB UHCI Controller #5 (rev 03)
00:1a.2 USB Controller: Intel Corporation USB UHCI Controller #6 (rev 03)
00:1a.7 USB Controller: Intel Corporation USB2 EHCI Controller #2 (rev 03)
00:1b.0 Audio device: Intel Corporation HD Audio Controller (rev 03)
00:1c.0 PCI bridge: Intel Corporation PCI Express Port 1 (rev 03)
00:1c.2 PCI bridge: Intel Corporation PCI Express Port 3 (rev 03)
00:1c.3 PCI bridge: Intel Corporation PCI Express Port 4 (rev 03)
00:1d.0 USB Controller: Intel Corporation USB UHCI Controller #1 (rev 03)
00:1d.1 USB Controller: Intel Corporation USB UHCI Controller #2 (rev 03)
00:1d.2 USB Controller: Intel Corporation USB UHCI Controller #3 (rev 03)
00:1d.7 USB Controller: Intel Corporation USB2 EHCI Controller #1 (rev 03)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 93)
00:1f.0 ISA bridge: Intel Corporation Device 2919 (rev 03)
00:1f.2 SATA controller: Intel Corporation Mobile SATA AHCI Controller (rev 03)
00:1f.3 SMBus: Intel Corporation SMBus Controller (rev 03)
01:00.0 VGA compatible controller: nVidia Corporation Device 06e8 (rev a1)
02:00.0 Ethernet controller: Atheros Communications, Inc. AR5006EG 802.11 b/g Wireless PCI Express Adapter (rev 01)
06:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8055 PCI-E Gigabit Ethernet Controller (rev 13)
Hardware over USB (lsusb)
Bus 006 Device 001: ID 1d6b:0001
Bus 001 Device 003: ID 058f:6366 Alcor Micro Corp.
Bus 001 Device 002: ID 0ac8:c302 Z-Star Microelectronics Corp.
Bus 001 Device 001: ID 1d6b:0002
Bus 005 Device 001: ID 1d6b:0001
Bus 004 Device 001: ID 1d6b:0001
Bus 003 Device 001: ID 1d6b:0001

Components:

TypNameStatus
 
EthernetMarvell 88E8055 (Yukon2)works
ProcessorIntel Core 2 Duoworks :)
WLANAtheros AR5006EG (802.11 b/g)works
Graphic cardNVIDIA GeForce 9200M GSworks
TouchpadSynaptics?works
SoundIntel HD Audioworks
USBIntel USB E/UHCIworks
S/ATAIntel SATA AHCI Controllerworks
ExpressCard?untested
CardreaderAlcor Micro Corp.works
Builtin cameraZ-Star Vega USB 2.0works
 
HDMIuntested
VGA-Outuntested
Suspend-to-ramworks
Suspend-to-diskworks
Fn keysPartially
Xorgworks
Console framebufferworks

Ethernet

The intended module "sky2" is broken for this device in kernels <2.6.27. Also see Sky2.

Currently there is no stable gentoo-sources-2.6.27. therefore we have to use unstable:
### if 2.6.27 isn't stable yet, use the latest version from the 2.6.27 series:
## echo "<sys-kernel/gentoo-sources-2.6.28" >> /etc/portage/package.keywords

emerge gentoo-sources

Processor

Nothing special needs to be done, see Core2Duo.
Part of the /etc/make.conf:
CFLAGS="-O2 -march=nocona -pipe"
CXXFLAGS="${CFLAGS}"
CHOST="x86_64-pc-linux-gnu"
MAKEOPTS="-j3"

WLAN

The ath5k driver doesn't activate the antenna yet. The lscpi output seems to be wrong. Instead of a AR5006EG a AR5007EG is built-in.
At the time of writing (03.10.2008), a special version of madwifi is needed. I've deactivated the mac80211 and ath5k modules and used the driver mentioned in http://madwifi.org/ticket/1192. Simply do the usual "make" and "make install" stuff and reboot (some people say it's necessary because of ath_hal).
After that activate the radio with the following commands:
sysctl -w dev.wifi0.ledpin=0
sysctl -w dev.wifi0.softled=1
I've testet "managed" and "master" mode, both work with the described setup.

With the help of the patch from Bob Copeland (see kernel bug #12298), the ath5k module of the kernel activates the antenna. The modified patch is also available here.
Deactivating the radio is still unknown.

For further configuration see the official guide: http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4.

Graphic card

Supported by the official nvidia driver. See also Gentoo-wiki:Nvidia.

Since version 177.70 our graphic card is supported. The latest official version is 177.80.
### if 177.80 isn't stable yet:
echo "=x11-drivers/nvidia-drivers-177.80" >> /etc/portage/package.keywords
emerge nvidia-drivers
Further informations in section Xorg.

Touchpad

Works with the usual synaptics drivers (See Xorg section or Gentoo-wiki:Synaptics).

Sound

Works with the Intel HD Audio module.

If the internal mic works only for some apps (those who use oss f.e. skype):
"Front mic" is the internal microphone, "mic" the plugable, set "Input Source" to "Front mic".

USB

Standard modules EHCI/UHCI work (needed for at least the camera and the cardreader), see Gentoo-wiki:USB.

S/ATA

Activate AHCI (if it's not per default) in the BIOS and use the AHCI module.
Don't forget to activate the SCSI-Disk and SCSI-CdRom modules. The general guide for Gentoo-wiki:SATA.

ExpressCard

Untested. I have no such device, see Gentoo-wiki:ExpressCard.

Cardreader

Works with USB mass storage module.
No special cardreader/MMC/SD/whatever module has to be activated.

Builtin camera

Works with the v4l uvc kernel module. Just activate the usual V4l stuff and the uvc kernel module.
Tested with Mplayer and Skype. Cheese doesn't work, looks like a gstreamer problem.

HDMI

Untested. I have no such device.

VGA-Out

Untested, yet. Perhaps this guide is useful HOWTO_nVidia_TwinView.

Suspend-to-ram

Works with normal mechanism. See Aktivieren_von_Stromsparfunktionen (german).

Suspend-to-disc

Works with normal mechanism. See Aktivieren_von_Stromsparfunktionen (german).

Fn keys

Sleep and power button create ACPI-Events. Easy job for acpid.
emerge acpid
Then edit
	/etc/acpid/defaults.sh
Other buttons send unknown key codes, Lower/Raise volume f.e., so we add the following lines to /usr/share/hal/fdi/information/10freedesktop/30-keymap-misc.fdi under the prefix "samsung":
<match key="/org/freedesktop/Hal/devices/computer:system.hardware.product" string="R510/P510">
	<append key="input.keymap.data" type="strlist">e003:battery</append> <!-- Fn+F2 battery icon -->
	<!-- Fn+F3 euro; generates these scancodes according to showkeys(1): 0x38 0x52 0xd2 0x4f 0xcf 0x50 0xd0 0x48 0xc8 0xb8 -->
	<append key="input.keymap.data" type="strlist">e002:displaytoggle</append> <!-- Fn+F4 CRT/LCD; -->
	<append key="input.keymap.data" type="strlist">e004:prog1</append> <!-- Fn+F5 backlight on/off -->
	<append key="input.keymap.data" type="strlist">e031:prog2</append> <!-- Fn+F7 run Samsung Magic Doctor (keypress event is generated twice) -->
	<append key="input.keymap.data" type="strlist">e033:prog3</append> <!-- Fn+F8 switch power mode (battery/dynamic/performance) -->
	<append key="input.keymap.data" type="strlist">e006:wlan</append> <!-- Fn+F9 Turn On/Off Wireless -->
	<append key="input.keymap.data" type="strlist">e077:f22</append> <!-- Fn+F10 Touchpad on -->
	<append key="input.keymap.data" type="strlist">e079:f22</append> <!-- Fn+F10 Touchpad off -->
	<append key="input.keymap.data" type="strlist">e008:brightnessup</append> <!-- Fn+Up Brightness up -->
	<append key="input.keymap.data" type="strlist">e009:brightnessdown</append> <!-- Fn+Down Brightness down -->
	<append key="info.capabilities" type="strlist">input.keymap</append>
</match>
and a Xmodmap file is necessary:
# put these lines in ~/.Xmodmap
keycode 174 = XF86AudioLowerVolume
keycode 176 = XF86AudioRaiseVolume
keycode 160 = XF86AudioMute
and execute the following command after login:
xmodmap ~/.Xmodmap
The problem with the other keys like brightness up/down is, that no key up event is generated. Further research need to be done.
Jürgen Graband posted a configuration script for Ubuntu in this thread. This script includes a kernel patch that seems to create the necessary key up event for this laptop. I didn't have the time to test it, yet, but it looks good and I copied it here.

Xorg

Flags in /etc/make.conf for Xorg:
INPUT_DEVICES="keyboard mouse evdev synaptics"
VIDEO_CARDS="nvidia nv vesa"

The whole /etc/X11/xorg.conf with support for compiz:
Section "ServerLayout"
	Identifier     "X.org Configured"
	Screen      0  "Screen0" 0 0
#       InputDevice    "Mouse0" "CorePointer"
	InputDevice    "Touchpad" "CorePointer"
	InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "ServerFlags"
Option  "blank time"  "5"  # Blank the screen after 5 minutes (Fake)
Option  "standby time"  "10"  # Turn off screen after 10 minutes (DPMS)
Option  "suspend time"  "20"  # Full suspend after 20 minutes
Option  "off time"  "30"  # Turn off after half an hour
EndSection

Section "Files"
	RgbPath      "/usr/share/X11/rgb"
	ModulePath   "/usr/lib64/xorg/modules"
	FontPath     "/usr/share/fonts/misc/"
	FontPath     "/usr/share/fonts/TTF/"
	FontPath     "/usr/share/fonts/OTF"
	FontPath     "/usr/share/fonts/Type1/"
	FontPath     "/usr/share/fonts/100dpi/"
	FontPath     "/usr/share/fonts/75dpi/"
EndSection

Section "Module"
#       Load  "dri"
	Load  "glx"
	Load  "record"
#       Load  "GLcore"
	Load  "wfb"
	Load  "dbe"
	Load  "xtrap"
	Load  "extmod"
	Load  "type1"
	Load  "freetype"
EndSection

Section "InputDevice"
	Identifier  "Keyboard0"
	Driver      "kbd"
	Option  "CoreKeyboard"
	Option  "XkbLayout" "de"
EndSection


Section "InputDevice"
	Identifier  "Touchpad"
	Driver      "synaptics"
	Option      "SHMConfig" "true"
EndSection

Section "Monitor"
	Identifier   "Monitor0"
	VendorName   "Monitor Vendor"
	ModelName    "Monitor Model"
	Option  "DPMS"
EndSection

Section "Device"
	Identifier  "Card0"
	Driver      "nvidia"
	VendorName  "nVidia Corporation"
	BoardName   "Unknown Board"
	BusID       "PCI:1:0:0"
	Option  "RenderAccel" "true"
	Option  "NoLogo" "true"
#       Option  "AllowGLXWithComposite" "true"
	Option  "AddARGBGLXVisuals" "true"
#       Option  "TripleBuffer" "true"
	Option  "DPMS" "TRUE"
	Option  "UseEvents" "false"
	Option "TwinView" "true"
	Option "BackingStore" "True"
	Option "PixmapCacheSize" "5000000"
	Option "AllowSHMPixmaps" "0"
EndSection

Section "Screen"
	Identifier "Screen0"
	Device     "Card0"
	Monitor    "Monitor0"
	DefaultDepth 24
	Subsection "Display"
		Depth       24
		ViewPort    0 0
	EndSubsection
EndSection

Section "Extensions"
	Option      "Composite"   "enable"
EndSection
To use the official nvidia driver don't forget to execute:
eselect opengl set nvidia

Console framebuffer

Works with uvesafb. Follow this guide: http://de.gentoo-wiki.com/Fbsplash#uvesafb, but install the latest version of v86d, therefore execute:
echo "sys-apps/v86d" >> /etc/portage/package.keywords
Options in /boot/grub/grub.conf:
title Gentoo Linux 2.6.27-rc6
root (hd0,4)
kernel /boot/2.6.27/bzImage-rc6 root=/dev/sda5 video=uvesafb:ywrap,pmipal,1280x800-32,mtrr:3 splash=silent,fadein,theme:default quiet CONSOLE=/dev/tty1
initrd /boot/fbsplash