r

fortune(6)

Fortune’s Real-Life Courtroom Quote #3:

Q: When he went, had you gone and had she, if she wanted to and were
able, for the time being excluding all the restraints on her not to
go, gone also, would he have brought you, meaning you and she, with
him to the station?
MR. BROOKS: Objection. That question should be taken out and shot.

Only now do I realize how common statements such as these are in law.

Preserving Battery Power on an OpenBSD Laptop

With the addition
of the hw.setperf sysctl
, it is possible to control a laptop’s
CPU speed,
reducing its power usage and increasing its battery life.

But who has time to manually speed up or slow down their
CPU?

Luckily, apmd(8)
can do certain things when the laptop gets plugged in or unplugged.
This allows us to conserve battery power when the laptop is running
on its battery, and run at the laptop’s maximum speed when it is
running on its A/C adapter.

Here’s what you need to do:

  1. Enable apmd. (Either in /etc/rc.conf or sudo apmd.)
  2. # mkdir -p /etc/apm
  3. Add the line /sbin/sysctl hw.setperf=0 to /etc/apm/powerdown.
  4. Add the line /sbin/sysctl hw.setperf=100 to /etc/apm/powerup.
  5. Make both executable: # chmod a+x /etc/apm/*

This is what my laptop shows when plugged in:

$ sysctl hw.setperf
hw.setperf=100
$ apm
Battery state: high
Battery remaining: 94 percent
Battery life estimate: 0 minutes
A/C adapter state: connected
Power management enabled

Unplugged:

$ sysctl hw.setperf
hw.setperf=0
$ apm
Battery state: high
Battery remaining: 94 percent
Battery life estimate: 446 minutes
A/C adapter state: not connected
Power management enabled

Yay.

Rechargeable Batteries

I’ve always known that rechargeable batteries were bad for the environment. That’s why I have a collection of old batteries that I didn’t have the heart to throw out, just taking up space in my house. I’ve been looking for a place to dump them, but the sanitation department’s web site just tells me to throw them out along with the rest of the garbage.

It’s a good thing I decided to Google this issue some more before just tossing that stuff in the trash. The Recycling Battery Recycling Corporation tells me that I can just go to a local Best Buy, Radio Shack, Sears, Target, and many other electronics stores to dump them off. How convenient!

So folks, please don’t dump your hazardous waste haphazardly. Flourescent lights, computer monitors, and refrigerators also contain hazardous material. Think before you dump.

Go, Planet!

802.11b Sucks

It is so painfully slow. Interference galore. So slow. So slow. It’s just travelling through two floors, how tough can it be?

Instead of writing my own RSS aggregator, I’m pleased to discover rawdog. I no longer have to worry about one illegal character stopping the whole feed from being parsed. It also has some nice features that I’ve had some ideas about but never dared implement, such as caching old old feed items and displaying them. Well, anyway, this is just the first day of trying it out. We’ll see what happens. I’ve already discovered one bug: it doesn’t properly parse RSS feeds that use characters written in the notation &bleh; or &#xxxx;. I wrote a pathetic patch and sent it to the authors. This entry should be a good test for my patch.

Lately I’ve been trying to get my aterm to have dropshadows. Unfortunately it doesn’t seem to be flexible enough to support different fonts and/or font sizes. With some tweaks I’ve got it working perfectly for terminus at 24px.

I’ve stopped stripping the HTML tags from the RSS feeds. This should create a more pleasant visual experience.

I’ve been using ratpoison for my window manager. JCS is right. It’s especially necessary given my limited screen real estate (1024