My Musings on Slackware


I have been a devout slacker for many years (since 2001 to be exact). Of course I have used many different distros over the years but, like a true addict, always keep coming back to slack. What can I say? Slackware is fast, stable, and simple. Keep up the good work Patrick :)

This page is primarily intended to serve as a reminder to myself of all the small tweaks I perform or issues I encounter. This way when I upgrade to the next release of Slackware I won't have to spend all this time trying to remember what I've done. However, if someone out there can benefit from this page too then all the better.

With that said, let's get on with the show!


Overview:


Current Slackware version: Slackware-current
Last updated: Sept 4, 2009

Hardware

My current hardware is a Dell Inspiron 600m laptop:



Video Options

The Radeon 9000 Mobiliy uses the R200 chipset and is fully supported by Xorg's radeon driver. The list of implemented features is found here. The only thing that I've really noticed is that while the chipset is OpenGL v1.4 compliant, the driver only supports v1.3. Hopefully they get it working soon.
The following is my device section from xorg.conf:

Section "Device"
     Identifier "** ATI Radeon (generic) [radeon]"
     Driver "radeon"
     VideoRam 65536
     Option "EnablePageFlip" "true"
     Option "RenderAccel" "true"
     Option "AccelMethod" "EXA"
     Option "DynamicClocks" "true"
     Option "ColorTiling" "true"
EndSection


Most of the above options are documented in the radeon driver man page. I suppose the only major difference is using EXA (newer/faster/possibly unstable) accel method. I have noticed some weird clipping at times but overall it seems to work good enough for me.

Update: I was playing around with driconf and you can enable 'HyperZ' to boost performance. Apparently this is some undocumented option (nowhere to be found in the man page), but it really does boost performance.

glxgears framerate before enabling: 2100 FPS
after enabling: 3050 FPS

That's a noticeble improvement if you ask me.

Undervolting

Undervolting the CPU can save energy and reduce heat. I'm not particularly concerned with saving energy (always plugged in anyway...) but reducing heat is always a good thing.

The best tool I've found so far is the Linux PHC Tool .

Head into the forum and download the most recent release. It patches the acpi_cpufreq module and replaces it with phc-intel. Play with different voltage settings and find the lowest voltages that make your system stable. My values are:

28 22 16 10 5 2

I use undervolting in conjunction with the (recommended) ondemand governer for frequency scaling. I can't remember if it is enabled by default in slackware, so if it isn't just roll your own kernel.



Update: Another thing you can do to reduce heat is unload your wireless driver module when not in use. Apparently the ipw2200 module constantly scans for available networks until it is connected (even if the interface is down). This may be true for other wireless drivers as well.

Encrypted Swap

For the full (if somewhat lengthy) process for encrypting data/swap partitions in slackware, simply look to the README_CRYPT.TXT on the slack CD/DVD.

Quick version:

  1. Install cryptsetup package from Alien Bob's slackbuild

  2. Identify swap partition with: swapon -s

  3. Turn off swap: swapoff -a

  4. Create encrypted swap partition:
    cryptsetup --cipher aes-cbc-essiv:sha256 --key-size 256 --key-file /dev/urandom create encryptedswap /dev/hdXX

    Note: essiv hash size can NOT be larger than --key-size. e.g., aes-cbc-essiv:sha512 won't work with a --key-size 256


  5. Remove newly created encrypted swap partition: dmsetup remove encryptedswap

  6. Securely wipe new swap: shred -n 5 -v -z /dev/hdXX

  7. Create new file: /etc/crypttab and add following contents:
    encryptedswap /dev/hdXX none swap

  8. Update fstab by commenting out old swap line and adding:
    /dev/mapper/encryptedswap none swap defaults 0 0

  9. Reboot and make sure encrypted swap is enabled: swap -s

Note 1: Make sure the swap space isn't being used before turning it off. This can be done by ensuring that 'free -m' or 'top' reports all swap space free.

Note 2: If something borks up, delete crypttab and restore fstab. Try again or restore the old swap space by running:
mkswap /dev/hdXX
swapon -a
swapon -s

If you still don't have swap space at this point then something went really really wrong :)

Misc Programs