This will bounce around a bit, while I keep a few notes on my new Sarge install.
I have been tracking Slackware-current for about a year on this laptop, and wanted something a little easier to maintain. Don’t get me wrong – I love Slack, and use it on several workstations and servers, but my lappy needed lots of custom rolled packages to get CPU frequency scaling, laptop-mode, vpn connectivity to my office, and some other stuff running. With some long-ish periods between use, tracking current became a bit of a job, and when vpnc needed to be rebuilt because of some low-level library change, I decided to go the Debian route. (Besides, the 8G NTFS partition on the drive needed to grow a little to fit a new game 😉
I decided to track Debian Stable, since a Debian Unstable workstation I have in the office has been, well… unstable at times.
I did a netinst.iso image install over http, selected “Desktop”, and just let it roll on whatever was in this meta-group. I have been using XFCE for a while on a couple of boxes, but decided to give Gnome a try for it’s desktop application integration.
Once the install was completed, I looked at ‘dpkg -l’ and thought I would just hose all of KDE right off the bat. This is where ‘aptitude’ comes in SO nicely – drilled down into the KDE section, and removed them all. Then I found that ‘dpkg -l’ reports that they are all in ‘rc’ status – removed with config files remaining. I know there is somewhere in aptitude to purge all of those, but I did not find it quickly, so ran:
COLUMNS=200 dpkg -l | awk '/^rc/ {print $2}' | xargs dpkg --purge
Dpkg recorded a few empty directories that it would not remove, and there was nothing in them, so ‘rm -rf blah’. All better. All clean.
A few additional packages that I added: vim (which got yanked along with KDE, for some reason), acpid, cpufreqd, wireless-tools, mysql-client-4.1, and libc6-i686 (as recommended by the linux-image-2.6-686 deb from backports). I added gdm-themes and gnome-audio for my favorite login theme, and to try out event sounds (which actually failed to allow rhythmbox to function, so events got turned off).
First up was to get CPU scaling down – an install of cpufreqd was fine, but would not work on the stock 2.6.8 kernel, and all attempts to get the modules loaded failed. After much searching and hacking, I tried a current 2.6.14 kernel from backports.org – perfect! It even picked up my ipw2100 wireless card (which I thought was going to be my next thing to work on). OK, so pinning a few packages from backports was not my intention, when I wanted to track ‘Sarge’, but ah well. Here is what I added to my /etc/apt/sources.list:
# backports (see /etc/apt/preferences) - michael
deb http://www.backports.org/debian/ sarge-backports main
and /etc/apt/preferences has:
Package: *
Pin: release a=sarge-backports
Pin-Priority: 200
Package: linux-image-2.6-686
Pin: release a=sarge-backports
Pin-Priority: 999
After installing this kernel, the box would not boot with errors that it could not find the disk… Google is my friend:
1. Added to /etc/yaird/Default.cfg:
MODULE ide-generic
MODULE ide-disk
2. Created new initrd image:
rm /boot/initrd.img-2.6.14-2-686
yaird -v -o /boot/initrd.img-2.6.14-2-686 2.6.14-2-686
3. Reboot.
hda now properly recognized and boot completes.
Looking at the backports.org stats page, it looks like the newer kernel and OpenOffice 2.0 are what most people are using. I will likely add the new version of OpenOffice at some point – it should just be an addition to /etc/apt/preferences and install.
On to getting wireless working – after booting linux-2.6.14, all I needed to add was an eth1 section to /etc/network/interfaces with some arguments:
# wlan interface
auto eth1
iface eth1 inet dhcp
wireless_essid wlan
wireless_key1 A5434B8867A999CC36579F6788
wireless_key2 12345678
wireless_defaultkey 1
wireless_keymode open
A quick ‘ifup eth1’ and I am in business! I set a second bogus key up to see if I can get WEP AP roaming figured out sometime.
—–
20051222
I found a good page that helped with cpufreqd, laptop-mode, and setting up sleep/hibernate:
apt-get install hdparm
add the following to /etc/hdparm.conf:
/dev/hda {
mult_sect_io = 16
interrupt_unmask = on
io32_support = 1
dma = on
spindown_time = 60
}
apt-get install laptop-mode-tools
and edit /etc/laptop-mode/laptop-mode.conf for:
BATT_HD=4
—–
apt-get install radeontool
Then added to /etc/acpi/actions/lm_lid.sh (shut off display when lid is closed):
lidstate="$(cat /proc/acpi/button/lid/LID/state | awk '{print $2}')"
logger "Display is $lidstate"
case "$lidstate" in
open)
/usr/sbin/radeontool light on
;;
closed)
/usr/sbin/radeontool light off
;;
esac
—–
To make a Java jre package:
download jre-1_5_0_*-linux-i586.bin from Sun, then:
apt-get install fakeroot java-package #if not installed...
fakeroot make-jpkg jre-1_5_0_06-linux-i586.bin #as normal user
dpkg -i sun-j2re1.5_1.5.0+update06_i386.deb
—–
one to look through http://www.softlab.ece.ntua.gr/~amanous/Inspiron-Linux/
—–
Aha! Suspend is now working! I am using the Fn-Esc for Suspend to RAM. I found lots of instructions, but the following page got me there:
http://linux-laptop.net/hosted/dell-inspiron-600m-fc4.html#Suspend_sleep
Grab the attachment labeled “video_post tool from Venki” from http://bugzilla.kernel.org/show_bug.cgi?id=3670 and save it as video_post.tar.gz. Build video_post binary as in the README and copy it to /etc/acpi/utils/video_post.
Here is my /etc/acpi/events/sleep:
event=button/sleep *
action=/etc/acpi/actions/sleep.sh
And here is my /etc/acpi/actions/sleep.sh:
#!/bin/sh
# vim:set ai ts=4 tw=0 expandtab:
if [ -f /suspending ] ; then
/bin/echo 'The system is suspending, or stale lockfile "/suspending" exists. If the system does not suspend, remove lock file, and try again.' | /usr/bin/wall
else
/bin/touch /suspending
/usr/bin/chvt 1 # necessary to make DRI work
/etc/init.d/cpufreqd stop
/etc/init.d/cron stop
# USB doesn't suspend without unloading first
/sbin/rmmod ehci_hcd
/sbin/rmmod uhci_hcd
# Save the system time
/sbin/hwclock --adjust
/sbin/rmmod -as
/bin/sync
# Step 2: send sleep command via ACPI
echo mem > /sys/power/state
# Step 3: wake-up and reload
/etc/acpi/utils/emu/video_post
/sbin/hwclock --hctosys
/sbin/modprobe ehci_hcd
/sbin/modprobe uhci_hcd
# initialise X
/usr/bin/X11/xinit /bin/false -- :1
/usr/bin/chvt 7
/etc/init.d/cron start
/etc/init.d/cpufreqd start
rm -f /suspending
fi
Yeah!
—–
I found the above worked well, however I need to fix suspending, then closing the lid. When I open the lid, the lappy does not fully recover, so I will likely set up lid events to suspend to RAM as well.
—–
ifplugd rocks. period.
I am playing with wpasupplicant to rifle through WEP keys and open wireless AP’s: