Debian Lenny sur Aspire One

Ce document n'est pas encore traduit en français, ça viendra, dsl.

This page is complementary to the Debian Wiki page dedicated to this machine.. so here are some things that are not (yet) on that page and are maybe a tiny bit off topic (kde related) etc.. I might add some of it, if i don't, whoever maintains that page can of course copy content from here to there.

Basically you can just go install Debian as usual, maybe chose Ext2 filesystem, and also i tend to always uncheck all the boxes when it comes to installing base software (Desktop, Web server Dns server etc), this is especially useful on this computer as it only has an 8Gb hard drive.. plus saving space is environment friendly, less downloading (install and upgrades) means less power... . . :] of course if you do so you will have to manually install everything even xorg, so do what you feel like doing.

Card reader

First thing, after installing Debian (with ext2 filesystem why not), you might want to rid the SD slots of any SD cards if any are inserted, if not you might experience some problems booting into your "new" system.. . After that you can safely follow the wiki instructions and the two slots should be working fine..


using the standard debian kernel - 2.6.26-1-686

First thing, I have never been able to get the Madwifi package to compile on either Debian or Ubuntu, HOWEVER, the Madwifi-hal works perfectly, so this is what i do (there could be a more recent version available from the page

apt-get install build-essential linux-headers-2.6.26-1-686 wireless-tools cd /usr/src/ wget tar zxvf madwifi-hal- cd madwifi-hal- make make install madwifi-unload modprobe ath_pci

That should work, meaning iwlist ath0 scan should give you results (given there is a signal somewhere near.. If it doesn't then just reboot, just don't tell anyone you did that.

It's said that network-manager (Gnome and Kde have a front end to that, just add a "g" or a "k"...) doesn't really work so good with this madwifi-hal thing.. . I can somewhat confirm. I installed Wicd as stated on the Debian Wiki page and that works not too bad however sometime i'd still need to reload the drivers for it to work.. so that's almost the same

madwifi-unload && modprobe ath_pci

However, i still prefer knetworkmanager for some weird reason and so i tried figuring out what the hec could be done on my level. .. . i could manually do (as root):

/etc/init.d/network-manager stop madwifi_unload modeprobe ath_pci /etc/init.d/network-manager restart

to automate those commands on resume edit a new file in /usr/lib/pm-utils/sleep.d, call it something starting with the number 96 for example: 96mynetworkfixer (the following could work with Wicd also (please adapt it though). :

#!/bin/sh . "${PM_FUNCTIONS}" unload_stuff() { # add anything else you might logger "96mynetworkfixer suspend" } reload_stuff() { # restart network-manager and reload madwifi stuff logger "reload_start madwifi sleep.d/96mynetworkfixer" /etc/init.d/network-manager stop /usr/local/bin/madwifi-unload modprobe ath_pci /etc/init.d/network-manager start } case "$1" in hibernate|suspend) unload_stuff ;; thaw|resume) reload_stuff ;; *) exit $NA ;; esac

Now that sould be better (now that I corrected the path to /usr/local/bin/madwifi-unload... ahem..

If you want the whole Wifi led thing go for it (debian wiki page again), i tried it, it works, and then i didn't add it to startup because i don't want to..

using a more recent kernel like o/ (free wireless drivers and more)

I'm not sure since which kernel life has changed for the little bugger (that being ath4k) but after having some issues with the SSD disk I wondered if that could be solved by better kernel support. I noticed after compiling a new kernel that the wireless card works right out of the box. Here is my .config file if you want a starting point (i'm sure this can be optimized even more), it has all you need to make the computer work


What the Cpufreq

The wiki says that it should work out of the box, and it does. ... well you might just need to activate the correct modules though, i like using modconf, but if you want you can just add to /etc/modules:

acpi-cpufreq cpufreq_powersave cpufreq_ondemand

if you only added this to the file you will need to reboot OR load each module for now via modprobe like this :

modprobe acpi-cpufreq modprobe cpufreq_ondemand modprobe cpufreq_powersave

Suspend to RAM

So now everything is starting to totally rule.. but still not there yet, suspend to RAM (and and Disk) might not work and that would most probably just be because your user is not in the powerdev group so you could do:

adduser USER powerdev

Now even the "Fn + Z" button should work just as the kpowersave menu works, if you running something other than KDE than maybe there is either just a keybinding issue or command problem. You can manually test the suspend function with the following (as root):

s2ram -f -a 3

If this works then you just need to figure out a way to execute that more conveniently.. otherwise you might have to RTFM s2ram a bit (but normally we have the same computer so this should work).

Another thing, maybe we can reduce the size of the image for quicker "stuff"... try:

echo 0 > /sys/power/image_size

if that works than just add it to the end of a bootup script somewhere. I personally prefer adding my own bootup script in which I add all my little things, for one all is gathered in the same place, and it also makes upgrading less hectic.. imho. I will put en example script at the end of this document that gathers all the little tweaks and such.

Disk optimisations

Here are a few things that can help reduce writing data on the slow SSD memory. First dissuade the system from using swap and then something about inodes and stuff :

echo 1 > /proc/sys/vm/swappiness echo 50 > /proc/sys/vm/vfs_cache_pressure

for these settings to take place on bootup you can either add this to the "common tweaks script" or edit /etc/sysctl.conf and add :

vm.swappiness = 10 vm.vfs_cache_pressure = 50

Now a piece of software thats nice to know is powertop, you probably guessed what it does, anyway it showed a few things of interest like :

echo 1500 > /proc/sys/vm/dirty_writeback_centisecs

this tells the system to bother the disk a bit less often than the usual.. same as the above this can be added to /etc/sysctl.conf (or later on in a boot script):

vm.dirty_writeback_centisecs = 15000

More optimizations via Grub

The elevator=noop option will optimize access to the disk as the function of an elevator is more relevant when using one classic disk drive and not an SSD, read more here. We can also use a more precise clock, hpet (read here) can save us some time and battery.

for this edit /boot/grub/menu.lst and modify the kernel line as follows :

title Debian GNU/Linux, kernel 2.6.26-1-686 root (hd0,1) kernel /boot/vmlinuz-2.6.26-1-686 root=/dev/sda2 ro quiet clocksource=hpet elevator=noop initrd /boot/initrd.img-2.6.26-1-686

For this to take effect upon kernel upgrades make the line

# defoptions=quiet

look like this :

# defoptions=quiet elevator=noop clocksource=hpet

Function Keys - with KDE

It seems for me the function keys work except the volume keys.. .hmm, what to do.. well, the following is more fun than tricky.. :]

first thing is use xev to see what the keycode is, of course i could just tell you (and i will) but if you want to do this for an other key you will know how to do it, open KDE and then open a terminal (Konsole). Type xev.. you should have a small window called Event Tester, in the terminal you will see a whole bunch of stuff, for every input event there should be some info up there, it's a bit "weird".. anyway, for "Fn + (sound up)" you should see among the waterfall of crap that comes up "keycode 176" and then "NoSymbol". This means that the key is not mapped (or something along that line).


the keys we are looking for are; Sound (up, down, mute) and their keycodes are respectively: 176, 174 and 160 so now write the file (as user): ~/.xmodmaprc with inside:

keycode 160 = XF86AudioMute keycode 174 = XF86AudioLowerVolume keycode 176 = XF86AudioRaiseVolume

to use this config type:

xmodmap ~/.xmodmaprc

to get this to start automatically on startup edit a new file in .kde/Autostart, call it whatever you want, i call it my_xmodmap so vi ~/.kde/Autostart/my_xmodmap and inside it put:

#!/bin/sh xmodmap ~/.xmodmaprc

and then:

chmod +x ~/.kde/Autostart/my_xmodmap

Now that's done, all you need to do is use kmenuedit to add a Sub Menu with a few entries. I called my Sub Menu .keyboard, with a "dot" as prefix so that this menu does not show up in the Kmenu.

Then add a New Item as follows:

  • Name: sound_up
  • Command: amixer set Master 6db+
  • Uncheck "Enable launch feedback"
  • define shortcut: press "Fn + Volume Up" (it should show "XF86AudioRaiseVolume")

I use the command amixer to control the sound (part of alsa-utils package => apt-get install alsa-utils) you can use whatever you want of course. Another thing, I put here 6db+, you can increment by however many decibels you want.

Add another new item for sound_down as follows

  • Name: sound_down
  • Command: amixer set Master 6db-
  • Uncheck "Enable launch feedback"
  • define shortcut: press "Fn + Volume Down" (it should show "XF86AudioLowerVolume")

AND, last but certainly not least, add a new item for Mute/UnMute

  • Name: mute
  • Command: if amixer get Master|grep off; then amixer set Master unmute; else amixer set Master mute; fi
  • Uncheck "Enable launch feedback"
  • define shortcut: press "Fn + Mute" (it should show "XF86AudioMute")
Laisser un commentaire
You may use the following HTML tags: <p> <a> <strong> <b> <em> <i> <cite> <blockquote> <code> <pre>

Les commentaires ne sont pas envoyés vers des tiers pour vérification