You are currently browsing the monthly archive for July 2009.

Great title, I know.

If there’s something that needs to be done whenever you wake your computer from suspend, hibernate, or just before it suspends/hibernates, you can do it without too much difficulty if you know how to script.

The Madwifi driver for my Thinkpad’s wireless card doesn’t like to be suspended and I always had to reset it every time I awoke my computer. Annoying! So from several sources I have found that putting a script in /usr/lib/pm-utils/sleep.d/ would let me do this. However, they have to adhere to certain guidelines. First of all, you define what the script handles for each change (sleep/wake) in a single script. A bare Bash script that does this is as follows:


#!/bin/bash
case $1 in
    hibernate)
        ;;
    suspend)
        ;;
    thaw)
        ;;
    resume)
        ;;
    *)  echo "ERROR: called incorrectly."
        ;;
esac

This is pretty simple. Now just call whatever you need in the corresponding parts (thaw means wake from hibernation).
My wireless script (I didn’t bother with hibernation because I never use it) looks like this:


#!/bin/bash
case $1 in
    hibernate)
        ;;
    suspend)
	if [ -n "$(lsmod | grep ath_pci)" ]; then modprobe -r ath_pci; fi
        ;;
    thaw)
        ;;
    resume)
	if [ -z "$(lsmod | grep ath5k)" ]; then modprobe ath_pci; fi
        ;;
    *)  echo "ERROR: used incorrectly."
        ;;
esac

It checks to see if I’m using ath5k (which I do sometimes), and if I’m not loads/unloads ath_pci as necessary. Works like a charm.
Now there are two more steps. You have to save the file as ##something to tell pm-suspend when to call the script. The higher the number, the earlier the script will be called, so if your script depends on things being set up, it generally needs to be fairly low. I wanted mine to run before 55NetworkManager but after 75modules, so I named the file 57athpci.

Finally, set the file as executable by running chmod +x filename (so in my case chmod +x 57athpci). You’re all set.

I know this works in Fedora, and also ArchLinux (my tutorial is modified and personalized from their tutorial); any feedback on other distributions would be nice. (Especially Ubuntu).

Guys, I just want you to realize that people who write blogs aren’t writing well-read research or well-documented papers or any of that shit. Blog posts are by-and-large (especially here) rants. I often have my beliefs backed up by research I have done at some point but I don’t document, I don’t footnote, and for crying out loud I don’t cite my sources because the stuff I’m bitching and moaning about is accumulated knowledge from god-only-knows-how-long that for one reason or another has decided to burst forth onto this poor website like a whitehead on a teenager’s face.

All I’m hoping to do is to make you think. I don’t care if I change your opinion but I want you to reconsider something new every time you read one of my posts. If it pisses you off, good. At least you can put up a decent defense, I hope.

Hell, I proofread these damn rants like once. Twice, if it’s technical stuff and I don’t want to confuse some poor Ubuntu n00b.

If you want real honest stuff go read Michelle Malkin’s blog or Jeff Atwood’s. Hell, I don’t even have my name on this blog. Just understand the medium.

Don’t believe everything you read on the internet. For that matter, until you find a real paper with real sources, don’t believe anything you read on the internet. Especially blogs. Especially blogs pretending to be newspapers. For crying out loud.

Really.

Really.

Athiests like to say things like “religion is the opiate of the masses” without realizing that they are subscribing to their own. Just because your religion lacks a deity doesn’t make it any less of a religion. There are certainly flavors of neo-paganism that don’t specifically have a deity and are undeniably religions.

If there is a non-religion, it’s either agnosticism, which says “we can’t know” or apatheism, which says “I don’t care enough to try to find out.” It is not Athiesm.

Why not? What constitutes a religion? A creation theory? Well Athiesm has Evolution. Churches? Athiesm is professed in the Universities. Its priests are the scientists who deny God’s existence and ridicule those who believe in Him as small-minded. Its evangelicals are the legions of devotees who ridicule believers of every faith saying things like “God is Santa Claus for adults.” Its apocalypse is Global Warming.

Evolution and Global Warming are based on as much blind faith as science (much to their believer’s chagrin, should one ever point it out),

Its holy books are Nature, Scientific American, and National Geographic who deny God. No, God isn’t “scientific,” and I understand that saying “God made it.” isn’t a scientific hypothesis, however science should be interested in the “how” whatever deity or non-deity made science work. When I look at the earth I think “look at the beauty of God’s work,” but any of these three would say “look at the beauty of Mother Nature,” which is an active denial of the majority religion of the intended audience.

Athiests work so hard to remove God from every facet of life that it would be absurd to think of them as anything other than evangelicals for their religion. They aren’t any more intellectual or intelligent because they have rejected God, and I for one, am tired of being ridiculed as simple-minded or stupid for having faith.

I’ve written on this before, and will probably do it again. It is an ongoing battle with those who are condescending with no right to be.

Health Insurance Quotes

I’ve heard that most people don’t have a problem with this, but I did. I have an AR5212 in my Thinkpad, and while ath5k works, it drops connections randomly, especially when the connection strength isn’t great to begin with.

This began to get very frustrating, so I slogged through a forum thread at FedoraForum.org. Despite being called lazy on multiple occasions (because someone is temperamental and I tend to overlook useful information if it’s not pointed out as being critical), I managed to get madwifi installed.

Madwifi must be recompiled every time the kernel updates. This is fine, as I tend to re-try ath5k each time the kernel updates as it seems to work better (better signal strength and comes back more reliably after I suspend the computer) besides the connection thing.

Anyhow, if you are having the same problem as me, this is the important stuff from the thread:

  1. Download THIS SNAPSHOT OF MADWIFI because the others do not compile in F11.
  2. As root,  yum -y install gcc gcc-c++ make kernel-devel
  3. Untar the snapshot, compile it with “make” and install it with “make install” as root.
  4. As root, do “rmmod ath5k && modprobe ath_pci” to enable madwifi. NetworkManager will disconnect and reconnect shortly.
  5. If you want to keep this, add “blacklist ath5k” to the end of  /etc/modprobe.d/blacklist.conf (again, as root)