Linux on Dell Latitude X300

Here are some notes I took when I installed Gentoo Linux in my laptop, in the hope that it will be useful for someone else. Some things explained here are specific for Dell Latitude X300 (or Samsung Q20, which has the same hardware), but it may be applicable to other laptop if it uses the same devices. Some tips here are specific for Gentoo as this is the distro I installed, maybe you want to install something else, then you’ll have to figure
out how to do it for your distro.



Kernel Choice

I did some tests with vanilla stock kernels, and with the -ac tree for 2.4 and -mm tree for 2.6. I don’t usually use bleeding edge kernels in production system, but my tests showed that the kernel which gave me support for almost all hardware and features I have in my x300 is the latest -mm patch for the 2.6 kernel series; so that’s what I recommend for this laptop.

The -mm tree is a collection of patches/fixes that maintains Andrew Morton (2.6 maintainer). Most of his patches are there for testing before they wind up in the next 2.6.x release.

RELATED FILES:

  • You can get the latest -mm patch to the 2.6 kernel here.
  • My kernel config file.


Linux support for Pentium M processor

I use these variables in my make.conf file:

CHOST=\"i686-pc-linux-gnu\"
CFLAGS=\"-O3 -march=pentium3 -fprefetch-loop-arrays -funroll-loops -pipe\"
CXXFLAGS=\"${CFLAGS}\"

If you are using gcc 3.4.x you can change CFLAGS to use -march=pentium-m, as it has support for it.

To control CPU clock scaling and frequency control I use cpufreqd and cpudyn:

Clock scaling allows you to change the clock speed of the CPUs on the fly. This is a nice method to save battery power, because the lower the clock speed is, the less power the CPU consumes.

CPU Dynamic Frequency Control

Cpudyn is a user space program, that works on every processor supported by the kernel’s cpufreq driver.
By using cpudyn you should not not notice any performance impact, nevertheless you should save battery consumption and reduce the temperature of your laptop.

# emerge cpufreq
# emerge cpudyn

RELATED FILES:



ACPI

Unfortunately the laptop’s BIOS has a buggy DSDT (Differentiated System Description Table) which prevents ACPI from functioning correctly. The DSDT contains the Differentiated Definition Block, which supplies the information and configuration information about the base system. It is always inserted into the ACPI Namespace by the OS at boot time.

In order to get ACPI working in X300 the DSDT should be replaced with a fixed version, patching the kernel with acpi-custom-DSDT patch and supplying a custom DSDT.

This is the process to follow:

1) Check your BIOS version and get
the apropiate DSDT
from acpi.sourceforge.net. (Get a newer BIOS version from Dell if needed).

2) Get the latest sources of the -mm kernel branch:

# emerge mm-sources

3) Apply the acpi-custom-DSDT patch:

# cd /usr/src/linux
# patch -p1 < ../acpi-custom-DSDT.patch

NOTE: The newest -mm kernels have an option for using a custom dsdt, so you do not need to patch your kernel :)

4) Get the Intel
ACPI Source Language Compiler
and compile the DSDT you have downloaded in
step 1:

# gzip -d Dell-Latitude_X300-AXX-custom.asl.gz
# tar zxvfp iasl-linux-xxxxxx.tar.gz
# cd iasl-linux
# ./iasl -tc ../Dell-Latitude_X300-AXX-custom.asl

NOTE: Sometimes a given DSDT is only working for a fixed amount of memory. You might have to fix this in the downloaded DSDT for the RAM in your specific machine. Lookout for a keyword like “SystemMemory” and adjust the value accordingly.

5) Copy the compiled file inside the kernel tree:

# cp Dell-Latitude_X300-AXX-custom.hex /usr/src/linux/drivers/acpi/my-dsdt.hex

Your kernel is now ready to compile :)

Once you’ve booted with the new patched kernel you should be able to use acpid daemon, display the thermal info, battery/power status, use the Fn Keys to adjust brightness, LCD/CRT, etc…)

pau@cool[53%]~$ acpi -V
     Battery 1: discharging, 53%, 01:09:41 remaining
     Thermal 1: ok, 42.0 degrees C
  AC Adapter 1: off-line
pau@cool[53%]~$

RELATED PAGES:

http://acpi.sourceforge.net/dsdt/index.php
http://www.cpqlinux.com/acpi-howto.html
http://www.behnel.de/acpi/samsung-acpi.html

RELATED FILES:



SUSPEND/RESUME

Kernel 2.6:

Power Management Options:
[*] Software Suspend (CONFIG_SOFTWARE_SUSPEND)
[*] Suspend-to-Disk Support (CONFIG_PM_DISK)

Pass these parameters to the kernel in your boot loader:

resume=/dev/SWAP pmdisk=/dev/SWAP (replace SWAP with your swap partition)

If you want to boot without resuming, then use:

noresume pmdisk=off

- For Swap suspend to Disk using Patrick’s implementation (newer code, but untested):

# echo disk > /sys/power/state

- For swap suspend to disk using Pavel’s implementation (ugly but more reliable):

# echo 4 > /proc/acpi/sleep

- For suspend to ram:

# echo 3 > /proc/acpi/sleep

RELATED PAGES:

file://usr/src/linux/Documentation/power/swsusp.txt
http://swsusp.sourceforge.net/compare.html



IO APIC

When booting the kernel reports this message:

Dell Latitude with broken BIOS detected. Refusing to enable the local APIC.

If you want to enable the local APIC you can use this patch: latitude-apic-enabled.diff (NOT MUCH TESTED, CAN BE DANGEROUS!!)

RELATED PAGES:

http://www.ussg.iu.edu/hypermail/linux/kernel/0301.2/0820.html



Volume Fn Keys

To make use of volume buttons install hotkeys package:

# USE=\"X gtk xosd\" emerge hotkeys

To start hotkeys put this command in your .xinitrc:

hotkeys -t x300 -Z &

and get my x300.def file from here.

RELATED FILES:



Synaptics Touchpad

Kernel 2.6:

* Enable PS/2 mouse support (CONFIG_MOUSE_PS2)
* Enable synaptics touchpad support (CONFIG_MOUSE_PS2_SYNAPTICS) ????
* Enable \"Event device driver\" (CONFIG_INPUT_EVDEV)

XFree86:

# emerge synaptics
# zless /usr/share/doc/synaptics-VERSION/README.gz
# zless /usr/share/doc/synaptics-VERSION/INSTALL.gz

Load the driver by canging the XFree configuration file through adding the line ‘Load "synaptics"‘ in the module section.

Section \"InputDevice\"
    Identifier     \"Touchpad0\"
    Driver     \"mouse\"
    Option     \"Protocol\" \"auto-dev\" # auto-dev/psaux/event
    Option     \"Device\"   \"Synaptics device\"
EndSection

RELATED PAGES:

http://www.tuxmobil.org/touchpad_driver.html

RELATED FILES:

My XF86Config.



Intel 855GM Graphics Card

Intel Corp. 82852/855GM Integrated Graphics device (rev 02)

To use GLX and DRI you should select these options in the device drivers section of the kernel 2.6 configuration:

Under \"Character devices\" section:
	
   	<*>   /dev/agpgart (AGP Support) (CONFIG_AGP)
   	<*>   Intel I8xx chipset support (CONFIG_AGP_INTEL)
   	[*] Direct Rendering Manager (CONFIG_DRM)
   	<*>   Intel 830M, 845G, 852GM, 855GM, 865G, 915G (CONFIG_DRM_I915)

If you want framebuffer support:

Under \"Graphics support\" section:
	
   	[*] Support for frame buffer devices (CONFIG_FB)
   	[*] VESA VGA graphics support (CONFIG_FB_VESA)

There isn’t BIOS support for sending video to both the built-in LCD screen and external VGA at the same time, so I installed i810switch to get both CRT and LCD working at the same time, very useful when doing presentations.

# emerge i810switch
usage: i810switch [crt on/off] [lcd on/off]

RELATED PAGES:

http://www.xfree86.org/~dawes/845driver.html
http://www.xfree86.org/~dawes/intelfb.html
Intel 82852/82855 Graphics Controller Family – AGP GART and DRM kernel modules for Linux

RELATED FILES:

My XF86Config.



Conexant Windmodem

Intel Corp. 82801DB AC’97 Modem Controller (rev 01)

I have not tested it yet, it may work using drivers from smlink:

# emerge slmodem

or maybe drivers from linuxant:

# emerge hcfpcimodem
# hcfpciconfig

RELATED PAGES:

ftp://ftp.smlink.com/linux/unsupported/
http://www.linuxant.com/drivers/



IRDA

# modprobe irtty_sir
# /etc/init.d/irda start (or irattach /dev/ttyS1 -s)

then cat /proc/net/irda/discovery should show irda devices found:

nickname: SIEMENS S45

or irdadump:

SIEMENS S45 hint=b124 [ PnP Modem Fax IrCOMM IrOBEX ]

to use it as a modem:

# modprobe ircomm-tty
# ln -s /dev/ircomm0 /dev/modem


SoundCard

Load snd_intel8x0m module, included in 2.6 kernel.



Integrated NIC

Load tg3 module, included in 2.6 kernel.



SD Reader

I have not been able to configure it, this is what lspci -v reports:

02:03.1 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev ac)
		Subsystem: Dell Computer Corporation: Unknown device 014f
		Flags: bus master, medium devsel, latency 168, IRQ 10
		Memory at 28002000 (32-bit, non-prefetchable) [size=4K]
		Bus: primary=02, secondary=07, subordinate=0a, sec-latency=176
		Memory window 0: 28c00000-28fff000 (prefetchable)
		Memory window 1: 29000000-293ff000
		I/O window 0: 00004800-000048ff
		I/O window 1: 00004c00-00004cff
		16-bit legacy interface ports at 0001

If you know how to get it working, please let me know!



Gkrellm Plugins

gkx86info is a plugin that prints the current clock speed for Gkrellm, you can get my gentoo ebuild here.



Battery tips

Tip #1

To blank screen when you don’t use your laptop add this to your ~/.xinitrc file:

# set dpms values if we are running on battery
STATE=`cat /proc/acpi/ac_adapter/ADP1/state |awk {'print $2'}`
if [ $STATE == \"off-line\" ]; then
               xset dpms 120 180 240
else
               xset -dpms
fi

Tip #2

To display the battery level in your prompt add this to your .bashrc file:

export PS1='u@h[`acpi |cut -f 2 -d \",\"|sed -e \"s/ //g\"`]w$ '

it will produce a promt like this:

user@hostname[53%]~$

Tip #3

Laptop mode is a kernel “mode” that allows you to extend the battery life of your laptop. It does this by intelligently grouping write activity on your disks, so that only reads of uncached data result in a disk spinup. It has been reported to cause a significant improvement in battery life (for usage patterns that allow it). Read more about it here.



Other useful resources

http://www.guilds.net/machines/600m/
http://people.ecsc.co.uk/~matt/linux.html
http://www.geocities.com/q20linux/
http://jrv.oddones.org/x300.html

This entry was posted in gadgets, linux. Bookmark the permalink.

50 Responses to Linux on Dell Latitude X300

  1. pof says:

    This was initially a static page, I made it a blog post so every question I get by email can be asked here as a comment and we all can benefit from the answers :)

  2. Cisco says:

    Did you ever get the SD Card to work – I’m struggling with it..

    –cp

  3. pof says:

    No, I haven’t been able to use it with linux :(
    If you have any luck with it please tell me which driver to use, thanks :)

  4. Cisco says:

    Did you have to add configuration settings in /etc/acpi/* for varios keyboard functions to work? My recompile worked and I now see the battery, but no volume or screen brightness?

  5. pof says:

    No, I didn’t have to add anything special to be able to use the screen brightness keys. Make sure that the custom DSDT you’re using matches your BIOS version, I recommend using the latest (A07 at the moment of writing this).

    For the up/down/mute volume keys I use hotkeys on X. See above.

  6. Pedro says:

    For some reason, echo someprocessorsate > /proc/acpi/processor/CPU0/performance only works
    for me when I do it twice. Have this happened to you?. I’m using BIOS A07

    BTW, I’ve also a page about linux on the X300: http://www.cavecanen.org/linux/x300.shtml

  7. pof says:

    Pedro: I don’t have /proc/acpi/processor/CPU0/performance, this is 2.4 specific I think. I use a 2.6 kernel and control processor states through /sys interface which works for me echoing the processor state values only once.

  8. Alexandre Aractingi says:

    Hi all, just a word to let you know that ACPI also works for me (Mandrake 10.1) without recompiling the kernel: Mandrake (and I heard that Suse as well) comes with the ‘initrd’ kernel patch, that allows you to append a DSDT file at the end of the initrd file (wth the mkinitrd utlity for example). More info on http://gaugusch.at/kernel.shtml.

    And by the way, Dell seems to have released an A08 version of the X300 BIOS, but the DSDT files on Sourceforge aren’t updated (yet).

  9. Alexandre Aractingi says:

    And Pedro, I had a quick glance at your page, I also have a mediabase, and nothing special has to be done to remove your laptop, I undock it / redock it without issue (the mouse is re-detected, the network and so on). I’m not sure if it’s very safe, but it works anyhow :-)

  10. pof says:

    Yes, the mediabase also works fine for me, it can be docked and undocked without doing anything special.

  11. Pedro says:

    Hey, thanks for the info about the mediabase. I’ll update that section soon

  12. Alexandre Aractingi says:

    Hi, did you guys get the volume keys to control the sound from the headset (or from the speakers)? I mean controlling the PCM audio channel rather than the default Volume?

  13. pof says:

    Alexandre: I’ve found a solution for this using aumix + hotkeys and this script.

    Hope that helps!

  14. rico says:

    How exactly do you add the dsdt in Mandrake 10.1? There is no /etc/sysconfig/kernel by default. Could someone add detailed instructions?
    Thanks. -Rico

  15. Hi, echo 3 > /proc/acpi/sleep works great, except when waking up the backlight stays off.

    I have bios version A08; am running Fedora Core 2; have tried kernels 2.6.9, 2.6.9-mm1, 2.6.10-rc1.

    Log file shows a Warning: CPU frequency is 1400000, cpufreq assumed 600000 kHz, and a Debug: sleeping function called from invalid context at mm/slab.c:2055.

    Do any of you get the same behavior?

    Thanks. Martijn

  16. Anders Logg says:

    Installing the updated dsdt got most of the acpi stuff working, but I can’t use the function keys. Switching to/from CRT (for example for a presentation with a projector) works fine using the nice little program i855crt (http://sourceforge.net/projects/i855crt).

    Running Debian unstable on a Dell X300 with A08 bios.

  17. Alexandre Aractingi says:

    Replying to Rico: in Mandrake 10.1, to install a new DSDT with mkinitrd, you have to:
    – (as root) mkinitrd –dsdt=DSDT.aml /boot/initrd-2.6.8.1-12-x300mdk.img 2.6.8.1-12mdk
    – add a lilo entry to point to this new initrd and reboot your PC

  18. Alexandre Aractingi says:

    Another reply (to pof who suggested aumix and hotkeys): hotkeys has a problem (dies randomly) that doesn’t seem to be getting fixed soon, so I used lineak instead. I thought I’d post my config here, it works very fine:
    – first you have to create a keyboard template. lineakd -c DELL-D600 works (same keycodes than the X300)
    – then you can enter the commands you need in the config file:
    ~/.lineak/lineakd.conf:
    AudioLowerVolume = “amixer sset Headphone,0 10%- unmute; amixer sset IEC958,0 10%- unmute”
    AudioMute = “amixer sset Headphone,0 toggle; amixer sset IEC958,0 toggle”
    AudioRaiseVolume = “amixer sset Headphone,0 10%+ unmute; amixer sset IEC958,0 10%+ unmute”

    This way both headphone volume and speaker volume will be affected by the keystrokes.

  19. Andras Horvath says:

    Hey, thanks for pointing i855crt out. Finally I got LCD+CRT working @ the same time. Suspend to disk works via /proc/acpi’s SW suspend with 2.6.7-mm1 but not anything newer than that. Suspend to memory works with 2.6.9 and newer only :) The rest basically all work (except for the SD reader) with A07 and the appropriate ACPI setup (all keys etc).

    On resume, I also get the cpufreq messages, but I guess they’re harmless.

  20. SlaytanicLemmy says:

    pof,

    In regards to ACPI and the custom DSDT. I have tried A04 and A08 and they only work if I drop down to 128MB from my 1GB+128MB (1GB stick installed). They may work with 512MB as noted on the sourceforge page, but I need the 1GB configuration. Do you have any idea what needs to be changed on the DSDT SystemMemory lines to work with a 1152MB configuration (128+1024)?

    Thanks.

  21. pof says:

    SlaytanicLemmy, I’m sorry but I don’t know it. I have 512+128MB and have been using the sourceforge DSDT with BIOS versions since A03 without problems. You should ask in the SF page.

  22. L Ekman says:

    The non-working Fn keys really seems to be the incorrect SystemMemory values.
    I have described how it can be fixed at;
    http://hem.bredband.net/ekmlar/X300.html

    Best Regards,

  23. Bart says:

    Hi,

    I’ve just made gentoo to run on x300, and there’s one thing that I can’t get to work. In Windows, many (recent) games work, I’ve even managed to get to work the Need For Speed Undeground. In linux, I get around 300 fps in glxgears, but tuxracer/chromium and other OpenGL games work with 1/2 FPS… I have “load glx” in my xorg.conf, but still the performance is weak, is there a way to fix it?

    Thanks,
    Regards

  24. Pedro says:

    I can only get CD Audio off the mediabay CDROM with XINE. Kscd does not play music, nor can I rip audio tracks with K3b or KAudioCreator. Anyone know how to solve this?

  25. ian says:

    I’m installing a fresh gentoo build onto my Dell x300. How do I emerge in Andrew Morton’s -mm kernel tree? Do I need to emerge gentoo-dev-sources, and then patch that with the 2.6.10-mm3 patch file? I see where I can download that patch file, but how to I apply that patch to the gentoo-dev-sources?

  26. pof says:

    To emerge -mm kernel just try 'emerge mm-sources', you don’t need to patch manually. You can also use another kenel if you want, have a look at /usr/portage/sys-kernel to see the possibilities.

  27. Andras Horvath says:

    Bart,

    I run 2.6.10-ac9 with the latest x.org X server from ubuntu linux, and DRI works fine (~1000fps in glxgears). Compile i915 driver support for the kernel.

    Check with ‘glxinfo’ whether you have Direct Rendering (with 300fps, you don’t). Also LoadModule “dri” in the xorg.conf.

    HTH,
    Andras

  28. ian says:

    Can you post your copy of /etc/X11/xorg.conf for the Dell x300?

    Also, if you’re using a newer kernel version than 2.6.9-rc2-mm1, could you put your /usr/src/linux/.config file in the kernel section at the top of this page?

    Thanks.

  29. Andras Horvath says:

    Oh, here they are:

    http://makosteszta.sote.hu/~raas/x300/

    It’s up to pof to post it somewhere upwards if he wishes.

    I’m also trying to get the X.org i810 driver’s dual-pipe support to work, but that needs some more testing&experimentation.
    BTW, does swsusp2 work for anyone? And/or do we have a perfectly working A08 BIOS?

    Andras

  30. Andras Horvath says:

    so, updating myself: if you comment “in” the option “Clone” and “MonitorLayout” lines, both video pipes work just fine (xserver-xorg 6.8.1-1ubuntu16): start X, prepare your slideshow or porn movie, then hook up the second monitor, projector, whatever, and it will get the same picture, mouse cursor etc.

    My only problem now is that suspend to memory usually crashes the box. Will keep trying newer and newer kernels :)

    Andras

  31. Stig says:

    Thanks for helping me out by writing this!
    Now the battery status i correct, but now my x300 makes ticking/beeping/knittering sounds when running. When I use gentoo-dev-sources, this is not the case. Anyone?

  32. ian says:

    Can you post your /etc/modules.conf? You have enabled a lot of modules in your kernel config, and I’d like to see which ones you actually load on bootup. Thanks.

    -ian

  33. Andras Horvath says:

    It’s fairly simple (sorry for the delay):

    sr_mod
    ide-cd
    ide-detect
    psmouse

    (and I’m using hotplug on top of this. Also, don’t ask me on the ‘why’ for the above :)

    If I may blog here: upgrading to 2.6.11.3, acpi.sf.net’s DSDT table, and X configuration as per above resulted in:

    a) perfectly working X on both VGA displays
    b) perfectly working suspend-to-ram
    c) perfectly working suspend-to-disk PROVIDED that nothing is touching /proc/acpi and the like (eg, no wmacpi and friends are running)!!!

    The latter took about two hours to debug, but now I’m happy (I kill the offender from the script which suspends my box). All suspends are handled via the normal swsusp “new” method (echo -n “whatnot” > /sys/power/state).

    I’m happy :)

    Andras

    ps. now… how do I get the Composite X extension on my display? probably not supported by the driver (?) I’d like to show off to some non-linux users ;)

  34. pof says:

    Andras, to enable composite extension add this to your Xorg config file:

    Section “Extensions”
    Option “Composite” “Enable”
    Option “RENDER” “Enable”
    EndSection

    And launch xcompmgr -c & from your ~/.xinitrc file.

  35. Andras Horvath says:

    Thanks, that works. Ohmygod how horribly slow it is ;-)

    Andras

  36. Jonty says:

    Hey – I too am having the problem with the screen not turning back on after suspend to memory – does anyone know how to fix this???

    As an aside, thanks for this page Pof, it’s been invaluble!

  37. Andras Horvath says:

    Jonty,

    try switching to text mode and back (ctrl-alt-f1, alt-f7).

    Andras

  38. Jonty says:

    Andras :- I would, but switching to other consoles has never worked for me, when I use ctrl-alt-fX in Xwindows I get ASCII characters outputted, F1 is P, F2 is Q etc.

    If you could help me fix that problem too, it’d be appreciated – not sure why it’s doing it!

  39. Franz says:

    Hello, i have downloaded the appropriate DSDT file for my Dell X300 BIOS A08, but my laptop has 1 Mb RAM, and i don’t know how to adjust the “SystemMemory” value for that amount of RAM… if you can help me in explaining what i should do, this would be nice. Here below my DSDT file. Thanks a lot in advance for your help
    Franz

  40. Andras Horvath says:

    I’m sorry, I can only reiterate the ‘works for me’ description above (#33). Which BIOS version do you have? Mine is A07.

    Andras

  41. qi says:

    very good!

  42. YoMuS says:

    Hi, I’ve tried the battery tip #2 without results, I put that text line in the .bashrc and doesn’t
    works when i log in. In addition, if i type the command bash after logged in, the prompt changes to
    “u@h[99%]w$” . What i am doing wrong?? Thanks!!

  43. Andras Horvath says:

    YoMuS,

    a) your .bashrc is not sourced from your .bash_profile. Either do that or put the same line there as well.
    (‘man bash’ for details)
    b) pof, you’ve lost the backslashes from that example line… so there should be a backslash (\) before the u, h and w -> they would translate to username, hostname and working directory, respectively. Again, man bash and check out what it says about prompts.

    HTH
    Andras

  44. Irby Thompson says:

    Ok, I have finally figured out how to resume from suspend-to-RAM for the x300 (and possibly other dell laptops).

    It involves a few steps, so follow this HOWTO:

    (WARNING! These steps are potentially dangerous and could cause data loss if you cannot shutdown your machine properly after unsuccessful restores – proceed with caution!):

    1. First, make sure that ACPI is installed correctly. You can do this by typing ‘acpi -V‘ You should get back something like this:

    Battery 1: charged, 100%
    Thermal 1: ok, 48.0 degrees C
    AC Adapter 1: on-line

    2. Next, ‘emerge vbetool‘ or download it from here. You will probably have to type ‘ACCEPT_KEYWORDS="~x86" emerge vbetool‘ since it is a masked package.

    3. Copy and paste the following into a new shell script:

    sleep.sh – puts our computer to sleep and wakes it back up properly
    NOTE: you may want to do a few rmmod before going to sleep (remove usb
    modules). You will also want to restore those modules when waking back up
    by using modprobe

    #put to sleep
    chvt 1 #change to virtual terminal 1
    vbetool vbestate save > /tmp/savedscreen
    sync
    echo 3 > /proc/acpi/sleep

    #wake up
    vbetool post
    vbetool vbestate restore < /tmp/savedscreen
    chvt 7 # change back to X session
    rm /tmp/savedscreen

    4. Make the shell script executable by typing ‘chmod +x scriptname .sh

    5. Test the script (AS ROOT!) (this one is written to be run from an X session – you can remove the chvt commands otherwise). It should put your machine to sleep, and you should be able to wake it back up by pressing the power button.

    6. If that worked, then you might want to setup an automatic script to put your computer to sleep when the lid closes and wake back up when it is opened again:

    Start by making sure you have acpid installed (it should be already).

    Copy the following into /etc/acpi/lid.sh:

    lid.sh – puts our computer to sleep and wakes it back up properly

    STATEFILE=$(echo /proc/acpi/button/lid/*/state | head -1)
    [ -f $STATEFILE ] || die “Unable to determine state of lid.”
    STATE=$(awk ‘{ print $2 }’ < $STATEFILE)

    case "$STATE" in
    "open")
    #wake up
    vbetool post
    vbetool vbestate restore /tmp/savedscreen
    sync
    echo 3 > /proc/acpi/sleep
    ;;
    esac

    Make sure this script is set to be executable with ‘chmod +x lid.sh

    Also copy the following script into /etc/acpi/events/lid:

    #setup an event handler
    event=button[ /]lid
    action=/etc/acpi/lid.sh

    Now, you should be able to close your laptop and have it go to sleep properly. Upon reopening the lid, the laptop should spring back to life and the display should restore as normal.

    Final notes:
    Make sure NOT to enable the ACPI events in KDE Control Center->Power Control->Laptop Battery->ACPI Config

    This was successfully implemented on a Dell Latitude x300 running Gentoo linux 2.6.11-gentoo-r8

    You can contact me with questions, but I doubt that I will be able to answer them.

  45. Irby Thompson says:

    Hmm, some of the formatting from the previous post was lost…contact me at x300@sliphead.com if you cannot figure it out, and I will send you the scripts

  46. Your solution works for me (A08, 2.6.11.9). Thanks a lot Irby.

  47. Strange about the media bay. As for me, it is problematic. At first, adding it after the laptop started without it is a bad idea: anything but the ethernet port, maybe the USB ports too, won’t work. Booting with it makes it functionnal but removing it “breaks” the Fn key, the battery status, and maybe other things.

    I restarted hotplug, discover, etc. but no chance, and I can’t find the difference in kernel modules loaded in either case.

    I use Bios A08 with the convenient DSDT table from acpi.sf.net. A regression or bug in it, since I read it worked at the A07 time?

  48. Alexandre Aractingi says:

    Hi all, I noticed a strange thing with audio in my X300 media bay: I had a chance to boot under Windows (never did it before) and the sound is very good even from the sound output included in the media bay. Under Linux sound is ok from the output in the X300’s left side, but cracks from the media bay. Anyone noticed it too?
    Thanks!!

  49. schuetze says:

    very great and helpfull install-description! Thanks.

  50. Moonspeller says:

    For SDCard reader try sdricoh.sf.net

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>