Samsung P35
From Gentoo Linux Wiki
This article is still a Stub. You can help Gentoo-Wiki by expanding it.
Contents |
[edit] Abstract
This could be a start to write a "Howto Gentoo on Samsung P35 1600". Since I do for the most part sucessfully run Gentoo Linux on this machine I will contribute as much as I can. Please be patient. Additions and Corrections are always appreciated.
[edit] Samsung P35 XVM II (and III) Hardware Layout
CPU speed is indicated by the exact name of the model. Thus a "P35 XVM III 1720" has a Pentium-M with 1720 MHz.
[edit] Specifications
| CPU | Intel Pentium-M (Banias for I and Dothan for II, III and IV) |
| Memory | 512 or 1024 MB DDR-RAM (usually Samsung PC2700S-25331-Ax DDR) |
| Graphics | ATI Radeon 9700 Mobility with VGA-Out / S-Video-Out |
| Display | 1400x1050 SVGA+ |
| Harddrive | Samsung 60 GB (XVM II) / 80 GB (XVM III) |
| Optical-Drive | Teac DVD-RW/CD-RW-Combo |
| Soundcard | Intel AC'97 Sound-on-Board |
| Network | Realtek 100Base-TX |
| Wireless-LAN | Intel Corporation PRO/Wireless 2200BG |
| Internal Modem | Intel AC97 Modem-on-Board |
| Ports | 2x USB 2.0, Firewire, Mic, Phones, S-Video, VGA, Ethernet, Modem, parallel and serial |
| Code: lspci output |
0000:00:00.0 Host bridge: Intel Corp. 82855PM Processor to I/O Controller (rev 21) 0000:00:01.0 PCI bridge: Intel Corp. 82855PM Processor to AGP Controller (rev 21) 0000:00:1d.0 USB Controller: Intel Corp. 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #1 (rev 03) 0000:00:1d.1 USB Controller: Intel Corp. 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #2 (rev 03) 0000:00:1d.2 USB Controller: Intel Corp. 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #3 (rev 03) 0000:00:1d.7 USB Controller: Intel Corp. 82801DB/DBM (ICH4/ICH4-M) USB2 EHCI Controller (rev 03) 0000:00:1e.0 PCI bridge: Intel Corp. 82801 Mobile PCI Bridge (rev 83) 0000:00:1f.0 ISA bridge: Intel Corp. 82801DBM (ICH4-M) LPC Interface Bridge (rev 03) 0000:00:1f.1 IDE interface: Intel Corp. 82801DBM (ICH4-M) IDE Controller (rev 03) 0000:00:1f.3 SMBus: Intel Corp. 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) SMBus Controller (rev 03) 0000:00:1f.5 Multimedia audio controller: Intel Corp. 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller (rev 03) 0000:00:1f.6 Modem: Intel Corp. 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Modem Controller (rev 03) 0000:01:00.0 VGA compatible controller: ATI Technologies Inc RV350 [Mobility Radeon 9600 M10] 0000:02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10) 0000:02:01.0 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev ac) 0000:02:01.1 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev ac) 0000:02:01.2 FireWire (IEEE 1394): Ricoh Co Ltd R5C552 IEEE 1394 Controller (rev 04) 0000:02:02.0 Network controller: Intel Corp. PRO/Wireless 2200BG (rev 05) |
[edit] State of Hardware Support under GNU/Linux
All your P35 hardware should be detected correctly. For the SD Cardreader exists a experimental driver, see [1]. There is also an ebuild in portage emerge app-misc/sdricoh_cs
Since Kernel 2.6.20-r7 suspend to ram works out of the box. Just execute echo mem > /sys/power/state.
[edit] Installation
[edit] Boot Media
Get it from here.
[edit] Partitions and Filesystem
Do partition your /dev/hda as you like. But remember, if you are going to use suspend to disk by the suspend2-sources as you kernel sources you will need a swap partition at least the size of your RAM.
hdparm settings are:
# hdparm -d1 -X69 -u1 -m16 -c3 /dev/hda
[edit] make.conf
| File: make.conf |
# You can edit these.
USE="-apm -fortran -mips -sparc -alpha \
-gnome -kde -dlloader glitz cairo svg dri \
nptl nptlonly symlink unicode udev \
sse sse2 mmx ssl userlocales apache2 sasl i8x0 kdexdeltas mozdevelop \
cdr dvd dvdr acpi opengl pcmcia usb alsa samba xinerama \
win32codecs video4linux jpeg2k aac h264 \
bzip2 crypt mysql mysqli sqlite xmlrpc bash-completion"
LINGUAS="de en"
# consult app-portage/mirrorselect
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
GENTOO_MIRRORS="\
http://ftp.snt.utwente.nl/pub/os/linux/gentoo \
http://ftp.join.uni-muenster.de/pub/linux/distributions/gentoo \
http://ftp.uni-erlangen.de/pub/mirrors/gentoo \
http://mirror.uni-c.dk/gentoo/ \
http://gentoo.math.bme.hu \
ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror"
# think twice beforde editing these
CFLAGS="-O2 -mtune=pentium-m -pipe -fomit-frame-pointer -fforce-addr -frename-registers -falign-functions=64"
CXXFLAGS="${CFLAGS}"
# These are for modular X and need not be changed.
INPUT_DEVICES="keyboard mouse evdev synaptics"
# For official ATI driver
VIDEO_CARDS="fglrx"
# For Opensource driver uncomment this
#VIDEO_CARDS="radeon"
# never change this
CHOST="i686-pc-linux-gnu"
|
[edit] Configuration
[edit] Graphics
The radeon 9700 in this notebook is supported by the official ati drivers and the opensource driver from Xorg, both with 3D acceleration. If you decide to use the opensource driver, you can safely choose the radeon framebuffer support in the kernel. (Hint: AIGLX is working with the opensource drivers and with the fglrx driver since ati-drivers-7.11!)
[edit] Official Ati driver
First you need to adjust your kernel Options:
Get into menuconfig (cd /usr/src/your-kernel && make menuconfig) and check the following:
| Linux Kernel Configuration: menuconfig |
Loadable Module Support --->
[*] Enable loadable module support
[*] Module unloading
[*] Automatic Kernel module loading
Processor type and features --->
[*] MTRR (Memory Type Range Register) support
Device Drivers --->
Character Devices --->
<*> /dev/agpgart (AGP Support) # only if you not intend to use FGLRX
<*> Intel 440LX/BXGX, I8xx and E7x85 chipset support
[ ] Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)
Graphics support --->
[*] Support for framebuffer devices
[*] VESA VGA graphics Support
VESA Driver type (vesafb-tng) --->
(1400x1050@60) VESA default mode
Console Display Driver suport --->
[*] Framebuffer console support
File Systems --->
Pseudo Filesystems --->
[*] Virtual memory file system support (former shm fs)
|
Do not select any ATI Radeon graphics support in
Device Drivers ---> Graphics support --->
as it will prevent your driver from working.
Although everything will work fine, do not select the AGPGART support in kernel as ATI's closed-source driver (aka fglrx) ship already with their own modules. They support things as "agp-locking", what prevents black screens on changing between OpenGL and other graphics modes.
You will need VESA framebuffer and Console Display Driver support to increase your console resolution to 1400x1050. Try to leave VESA Framebuffer support out if the Ati-driver gives you problems.
Recompile and install the kernel then reboot.
Now emerge the ati-drivers.
# emerge ati-drivers ati-drivers-extra
Now you have to run the following command to change from mesa-drivers to ati-drivers:
eselect opengl set ati
Do a
# modprobe fglrx
to verify the creation of the driver. If modprobe goes smoothly all you have to do is edit your xorg.conf to use the new driver.
| File: xorg.conf |
Section "Device"
Identifier "ATI Radeon 9700"
Driver "fglrx"
Option "backingstore" "true"
Option "no_accel" "no"
Option "no_dri" "no"
Option "mtrr" "off"
Option "DesktopSetup" "Single"
Option "NoTV" "no"
Option "TVStandard" "PAL-B"
Option "FSAAEnable" "no"
Option "FSAAScale" "2"
Option "UseFastTLS" "0"
Option "BlockSignalsOnLock" "on"
Option "UseInternalAGPGART" "no"
Option "ForceGenericCPU" "no"
EndSection
|
When you are in your graphical Enviroment you can test your driver using
- glxinfo | grep rendering
For some preformance testing use
# glxgears
It gave me ~2200 fps on II for the build-in display.
Don't forget to add fglrx to /etc/modules.autoload.d/kernel-2.6
[edit] OpenSource Ati driver
For AIGLX to work you need the opensource ATI driver.
Configure your Kernel first (addapted for Kernel 2.23.x).
| Linux Kernel Configuration: menuconfig |
Processor type and features --->
[*] MTRR (Memory Type Range Register) support
Device Drivers --->
Character Devices --->
<*> /dev/agpgart (AGP Support) # only if you not intend to use FGLRX
<*> Intel 440LX/BXGX, I8xx and E7x85 chipset support
[ ] Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)
Graphics support --->
[*] Support for framebuffer devices
[ ] VESA VGA graphics Support
<*> ATI Radeon
[*] DDC/I2C ATI Radeon support
[*] Support for Backlight control
Console Display Driver suport --->
[*] Framebuffer console support
File Systems --->
Pseudo Filesystems --->
[*] Virtual memory file system support (former shm fs)
|
DRM will be provided by the latest x11-drm.
emerge x11-drm
Edit your /etc/modules.autoload.d/kernel-2.6 to load your modules.
| File: /etc/modules.autoload.d/kernel-2.6 |
|
intel-agp agpgart radeon |
Now you need to switch to your opengl to xorg-x11
# eselect opengl set xorg-x11
Modify your /etc/X11/xorg.conf to use the radeon driver:
| File: /etc/X11/xorg.conf |
Section "Device"
Identifier "ATI Radeon 9700"
Driver "radeon"
BusID "PCI:1:0:0"
Option "AGPMode" "4"
Option "AccelMethod" "XAA"
# Option "AGPFastWrite" "1" # Causing my Xorg to HardLock on start
Option "GARTSize" "64"
Option "EnablePageFlip" "1"
Option "ColorTiling" "1"
# Option "ExaNoOffscreenPixmaps"
# Option "DynamicClocks" "on"
EndSection
|
If you have problems with fonts being too small at 75 DPI, lie about your screen size in xorg.conf.
| File: /etc/X11/xorg.conf |
Section "Monitor"
Identifier "TFT"
HorizSync 48
Modeline "1400x1050" 108.00 1400 34208 34320 1688 1050 1052 1055 1063
Modeline "1024x768" 65.00 1024 1047 1183 1343 768 770 776 805
DisplaySize 420 315
# Option "DPMS" "true"
EndSection
|
# xdpyinfo | grep dot
reports :
resolution: 84x84 dots per inch
which is very comfortable.
Get framebuffer console to work with the following setting in grub.conf:
| File: /boot/grub/grub.conf |
kernel (hd0,0)/kernel-2.6.23 video=radeonfb:1400x1050@60 root=/dev/hda3 |
[edit] Changing Clockrate
Changing clockrate is especially usefull as well for gaming as for mobile operation, or if you intend reducing noise running your P35 from AC.
You will need rovclock: emerge media-video/rovclock
| Code: rovclock output |
# rovclock -i Radeon overclock 0.6c by Hasw (hasw@hasw.net) Found ATI card on 01:00, device id: 0x4e50 I/O base address: 0x3000 Video BIOS shadow found @ 0xc0000 Reference clock from BIOS: 27.0 MHz Memory size: 65536 kB Memory channels: 1, CD,CH only: 0 [...] XTAL: 27.0 MHz, RefDiv: 6 Core: 195.75 MHz, Mem: 209.25 MHz |
Changing the frequency can be done by the options c (core) and m (memory).
Safe minimums are 100 MHz for core and memory:
# rovclock -c 100 -m 100
Maximums as set by ATI without overclocking your card are 200 MHz for core and 200 MHz for memory (on Radeon 9700 64 MB)
# rovclock -c 200 -m 200
I am using rovclock -c 40 -m 60 with the fglrx driver without corruption. Overclocking to Memory: 250 Mhz Clock: 230 Mhz seams to work too.
When using then OpenSource Ati Driver rovclock -c 40 -m 60 generates Corruption. Use rovclock -c 100 -m 100 instead.
[edit] Touchpad
In order to use the Synaptics Driver you need to enable Event Interface and PS/2 mouse support in the kernel config.
| Linux Kernel Configuration: menuconfig (e.g. 2.6.15-gentoo-r5) |
Device Drivers --->
Input Device support --->
<*> Event Interface
Device Drivers --->
Input Device support --->
[*] Mouse --->
<*> PS/2 mouse
|
Emerge the synaptics drivers:
# emerge synaptics
Adjust the xorg.conf accordingly.
| File: xorg.conf |
Section "InputDevice"
Identifier "Touchpad"
Driver "synaptics"
Option "Protocol" "auto-dev"
Option "Device" "/dev/input/event1"
Option "FingerLow" "20"
Option "FingerHigh" "30"
Option "LeftEdge" "1300"
Option "RightEdge" "5700"
Option "TopEdge" "1300"
Option "BottomEdge" "4700"
Option "MaxTapTime" "180"
Option "MaxTapMove" "220"
Option "MinSpeed" "0.06"
Option "MaxSpeed" "0.18"
Option "AccelFactor" "0.0003"
Option "SHMConfig" "on"
Option "ZAxisMapping" "4 5"
Option "EdgeMotionSpeed" "40"
Option "VertScrollDelta" "100"
Option "HorizScrollDelta" "100"
Option "UpDownScrolling" "1"
EndSection
|
[edit] WLAN
See this guide.
[edit] ACPI
[edit] Hotkeys
Using "acpid" it is possible to recieve events from all Hotkeys as well as AC Power events. The LCD Brightness and the Backlit (Fn-F5) are hardwired and are working out of the box.
You need ASUS/Medion laptop extras enabled in your kernel, otherwise Hotkey will not generate ACPI events.
| Linux Kernel Configuration: menuconfig |
Power manegement options (ACPI,APM) --->
ACPI (Advanced Configuration and Power Interface) Support --->
[*] ASUS/Medion Laptop extras
|
I am using one central file to manage all events.
| Code: /ect/acpi/default |
event=.* action=/etc/acpi/samsung.sh %e |
Event handler coming soon.
[edit] CPU
[edit] Fixing DSDT
The XVM III comes already with correct DSDT tables.
Your Notebook will automatically shut down if a critical temperature was reached. Additional Note: Some P35 XVM III did not have the fixed DSDT, the fix is still needed.
Fixing the DSDT enables CPU throtteling states on the CPU. In addition to that you can change fan settings to make a more quiet notebook.
More about this Topic http://acpi.sourceforge.net/
- First you need the Intel ASL Compiler. Just emerge it:
# emerge iasl
- Now you have to extract your DSDT to file:
# cat /proc/acpi/dsdt > dsdt.dat
- In order to edit your DSDT you have to disassemble it
# iasl -d dsdt.dat
Edit the dsdt.dsl. Look for this section:
| File: dsdt.dsl |
Processor (CPU0, 0x00, 0x00001010, 0x07)
|
and change it to:
| File: dsdt.dsl |
Processor (CPU0, 0x00, 0x00001010, 0x06)
|
To change fan thresholds look for the following section in your DSDT and edit this values:
| File: dsdt.dsl |
Name (FANI, 0x00)
Name (FAN3, Buffer (0x07)
{
0x00, 0x00, 0x00, 0xB8, 0xE5, 0xF6, 0xFF
})
Name (FANT, Buffer (0x07)
{
0xFF, 0xFF, 0xFF, 0x25, 0x14, 0x09, 0x09
})
Name (CMP0, Package (0x02)
{
Package (0x02)
{
Package (0x0A)
{
0x00,
0x00,
0x2D,
0x48,
0x55,
0x63,
0x69,
0x00,
0x09,
0x32
},
Package (0x07)
{
0x00,
0x00,
0x00,
0x23,
0x41,
0x4B,
0x5E
}
},
Package (0x02)
{
Package (0x0A)
{
0x00,
0x00,
0x2D, <- Fan on Low Speed ( 45 Decimal )
0x41, <- Fan on High Speed ( 65 Decimal )
0x55,
0x63, <- Passive Mode ( 99 Decimal )
0x69, <- Overheat Shutdown ( 105 Decimal )
0x00,
0x09,
0x32
},
Package (0x07)
{
0x00,
0x00,
0x00,
0x23, <- Fan off Low Speed (35 Decimal
0x37, <- Fan off High Speed ( 55 Decimal )
0x4B,
0x5E
}
}
})
|
- Recompile the DSDT:
# iasl -tc dsdt.dsl
You get a dsdt.hex and a DSDT.aml file.
# cp dsdt.hex /usr/src/linux/dsdt.h
Edit your kernel settings to enable Custom DSDT.
| Linux Kernel Configuration: menuconfig |
Device Drivers --->
Generic Driver Options --->
[ ] Select only drivers that don't need compile-time external firmware
Power manegement options (ACPI,APM) --->
ACPI (Advanced Configuration and Power Interface) Support --->
[*] Include Custom DSDT
(/usr/src/linux/dsdt.h)
|
[edit] Centrino Speedstep
To undervolt your Centrino LinuxPHC is the weapon of choice.
[edit] Patch the Kernel
To patch your kernel:
- Download the latest version of the Linux PHC patch
- Extract the files of the tarball
- Look in linux-phc-x.y.z/kernel-patch for your kernel version
- Copy the linux-phc-x.y.z-kernel-vanilla-2.6.w.patch to /usr/src/linux
- Patch the kernel
| Code: Patch the kernel |
patch -p1 < linux-phc-0.2.9-kernel-vanilla-2.6.19.patch |
[edit] Configure the Kernel
| Linux Kernel Configuration: Set CPUFREQ |
-> Power management options (ACPI, APM)
-> CPU Frequency scaling
-> CPU Frequency scaling (CPU_FREQ [y])
|
| Linux Kernel Configuration: Set CPU |
[*] CPU Frequency scaling
[*] Enable CPUfreq debugging
<*> CPU frequency translation statistics
[*] CPU frequency translation statistics details
Default CPUFreq governor (performance) --->
--- 'performance' governor
<*> 'powersave' governor
<*> 'userspace' governor for userspace frequency scaling
<*> 'ondemand' cpufreq policy governor
<*> 'conservative' cpufreq governor
--- CPUFreq processor drivers
<*> ACPI Processor P-States driver
|
[edit] Init scripts
to load the voltage change on startup
Coming soon
[edit] Userspace utilities
Please see Gentoo Power Management Guide for details on userspace utilities.
These should be a wise choice for most users: sys-power/cpufreqd sys-power/cpufrequtils
A more simple approach is sys-power/powernowd which supports Centrino processors very well out of the box.
[edit] IRDA
IRDA proved to be quite difficult to set up. After consulting various sources,some try and error and a little luck I came to the following solution:
First you need FIR to be enabled in BIOS.
Then edit your Kernel settings
[*] IRComm [M] nsc-ircc
Now emerge the nessesary software:
# emerge -a irda-utils setserial
You need to set options for modprobe. Create
| File: /etc/modprobe.d/irda |
#IRDA alias irda0 nsc-ircc options nsc-ircc dongle_id=0x08 install nsc-ircc /bin/setserial /dev/ttyS1 uart none port 0 irq 0; /sbin/modprobe --ignore-install nsc-ircc |
Run update-modules to enable this modifications in /etc/modprobe.conf.
Test your settings with modprobe nsc-ircc. This sould give you no errors.
# rc-update add irda default # irdadump
[edit] Harddrive
Harddrive Spindown is set to 5 minutes by default resulting in spinups and spindowns in worst situations. This can be very anonying while watching movies. It causes the playback to stutter a moment.
You can redefine the spindown timeout utilizing hdparm:
# hdparm -S 254 /dev/hda
Or have hdparm executed during boot:
| File: /etc/conf.d/local.start |
# set hdd standby times (21 and 10 minutes) if /usr/bin/on_ac_power; then hdparm -S 252 /dev/hda else hdparm -S 60 /dev/hda fi |
(on_ac_power can be found in sys-power/powermgmt-base)
[edit] Card Reader
For the internal card reader, there's a very early driver. It supports SD cards and svn has preliminary MMC support:
http://sdricohcs.sourceforge.net/
Check out the ebuild emerge app-misc/sdricoh_cs
[edit] Runtime Environments
[edit] External Display
If you occassionally plug in an external display as your primary one, you will soon discover that the ATI utility lets you change the primary display and is even able to shut down your build-in LCD.
In order to have the display switched automatically you can extend this file by:
| File: /etc/conf.d/local.start |
# determine whether an external display is attached
cp /etc/X11/xorg.conf /etc/X11/xorg.conf.pre-local
if /usr/sbin/ddcprobe | grep -q "analog signal"; then
echo "External Display attached."
# set external display as exclusive primary
cat /etc/X11/xorg.conf.pre-local | sed 's#"Single"#"Single,Reverse"#g' > /etc/X11/xorg.conf
else
echo "Using build-in LCD."
# set build-in LCD as exclusive primary display
cat /etc/X11/xorg.conf.pre-local | sed 's#"Single,Reverse"#"Single"#g' > /etc/X11/xorg.conf
fi
|
(ddcprobe belongs to sys-apps/ddcxinfo-knoppix)
You have to set up mirroring in the BIOS for having the console on your external display. Configuration of X11 is not affected by this.
[edit] See also
- http://www.gentoo.org/doc/en/power-management-guide.xml
- app-laptop/radeontool
- HOWTO ATI Radeon overclocking
- http://www.thinkwiki.org/wiki/How_to_make_use_of_Graphics_Chips_Power_Management_features
- http://www.p35-forum.de a german forum for samsung notebooks, but initially created for the P35
