Dell Latitude D400 with Gentoo Linux
Well, I've got one from my boss and I had some trouble getting the Framebuffer Console, XORG and the video to work after reopening the lid.
Here is my kernel-2.6.22-r6 config and my xorg.conf.
(I guess you want to change some stuff in the kernel config, as I build in IPSec and Bluetooth, and some IPtables / network stuff.)
Install net-wireless/bcm43xx-fwcutter in order to get bcm43xx to work; do "ifconfig eth3 up" before trying anything wireless.
FN+F2 works out of the box, watch you /var/log/messages :)
The bcm43xx-injection-linux-2.6.20.patch works also fine with kernel 2.6.21 (not testet with 2.6.22 yet).
You also need to install the 915resolution tool which fixes the faulty BIOS.
My 915resolution config can be downloaded here.
For CPU governours I recommend using ondemand (which is the default). Be sure to have the acpi USE-flag enabled!
emerge sys-power/cpufreqd
emerge sys-power/cpufrequtils
/etc/init.d/cpufrequtils start
rc-update add cpufrequtils boot
For powersaving with USB also add the line:
"usbcore autosuspend=1"
to your bootloader.
Enable power saving for the AC97 codec:
echo 'echo 1 > /sys/module/snd_ac97_codec/parameters/power_save' >> /etc/conf.d/local.start
More Power-saving methods:
echo 5 > /proc/sys/vm/laptop_mode
echo 1500 > /proc/sys/vm/dirty_writeback_centisecs
For saving most power, you could also do cpufreq-info, see the lowest CPU frequency and then do cpufreq-set -f 600.
To get the multimedia keys to work with your special X-config, follow the instructions I found at the gentoo-wiki HOWTO.
For me (fluxbox user!), this worked:
cat ~/.Xmodmap
keycode 174 = XF86AudioLowerVolume
keycode 176 = XF86AudioRaiseVolume
keycode 160 = XF86AudioMute
echo "/usr/bin/xmodmap $HOME/.Xmodmap" >> ~/.xsession
tail -n3 ~/.fluxbox/keys:
None XF86AudioLowerVolume :ExecCommand amixer -q set PCM 2- unmute
None XF86AudioRaiseVolume :ExecCommand amixer -q set PCM 2+ unmute
None XF86AudioMute :ExecCommand amixer -q set Master toggle
To get the video work properly after opening the lid, you'll need to do this:
Only try with xf86-video-i810-1.7.4 (newer versions up to 2.1.1 are buggy and cannot switch VT!).
First install the unstable vbetool version (currently 0.7):
echo "sys-apps/vbetool ~x86" >> /etc/portage/package.keywords
emerge sys-apps/vbetool
Then create /etc/acpi/events/lid containing this:
event=button[ /]lid
action=/etc/acpi/actions/lid
and /etc/acpi/actions/lid containing this:
#!/bin/bash
lid_state=/proc/acpi/button/lid/LID/state
test -e $lid_state || exit 0
if grep open $lid_state &>/dev/null
then
curcons=`fgconsole`
chvt 2
vbetool post
chvt $[curcons%6+1]
chvt $curcons
fi
# leave this out, if you do not want your laptop to go to sleep when closing the lid
if grep closed $lid_state &>/dev/null
then
acpitool -s
fi
Finally, do this:
chmod +x /etc/acpi/actions/lid
emerge sys-power/acpid
rc-update add acpid default
/etc/init.d/acpid start
I also STRONLY recommand to give powertop a try!
In short words, it will find the programs that prevent your Laptop from sleeping ;)
Generic info:
- lspci output
- /proc/cpuinfo
- BIOS Revision A08. You may Download an upgrade from Dell here.
Written by Stefan Behte
Contact me, if you have any new ideas, bugs/bugfixes, recommondations or questions!
Please also contact me, if you just like the tool. :)
Stefan dot Behte at gmx dot net
Released under the GPL-v2