Showing posts with label wireless. Show all posts
Showing posts with label wireless. Show all posts

Monday, March 31, 2008

Linux on IBM Thinkpad R32 Shutdown / Poweroff Problem with PCMCIA Wifi

Having trouble with your Linux distro not powering down on your laptop? On my old Thinkpad R32, several distributions including Kubuntu 7.10 and OpenSUSE 10.3 were not able to power off the system via software. I'm not exactly sure what was going on, but right when the system should have powered off, the CDROM drive would spin and the CPU fan would come on full blast. Nearly the exact opposite of shutting down, really.

I traced this problem to my D-Link DWL-G50 PCMCIA wifi card -- a nice Atheros based AG card on the cheap. Well, I shouldn't imply that the problem is with the card itself, but something to do with PCMCIA at least.

One solution I've found for this problem is to tell the system to eject the PCMCIA card before or during shutdown with the following command:

pccardctl eject

(Note: if your distro is slightly old, the command might be `cardctl eject`).

Which script you put this command into will depend on your distribution and preference. In OpenSUSE 10.3, open the file /etc/sysconfig/shutdown (as root) and change the line:

HALT_POWERDOWN_INSERT=""

to...

HALT_POWERDOWN_INSERT="pccardctl eject"

I've noticed a few complaints elsewhere about systems not being able to suspend due to wifi card issues. I haven't had a problem with OpenSUSE 10.3 suspending or hibernating on my system, but it seems like a pccardctl eject and a pccardctl insert in the appropriate suspend scripts could solve the issue.

There might be a more appropriate fix for this problem, but I don't care. I'm sick of configuring Linux. I know that Ubuntu 7.10 was able to power my system off correctly, and I think that PCLinuxOS 2007 was able to as well.

Saturday, February 9, 2008

Ubuntu 7.10 vs. Linksys wireless

Ok, Ubuntu 7.10 Glorious Goiter is finally installed. This is just wonderful, I can't even tell you. Damn that brown is hot.

Why no exclamation points to convey my ultimate excitement, you ask with an evil grin? Well, something is wrong with your wireless networking. I can see wireless networks, and I can try to connect, but the connection always fails. Unsecured, WEP, WPA, YMCA, doesn't matter. It tries to connect, the little light on my adapter blinks, but no connection.

Hm. The adapter I'm trying to use is a Linksys WUSB54G v4. I think it has the Klingon RT33019993322911933 chipset. It's a pretty standard unit, and part of Linksys's standard "G" product lineup. Linksys, you know, like one of the biggest consumer-grade network product manufacturers in existence? Recently purchased by Crisco? Perhaps you've heard of them?

I don't believe this crap.

Fine fine fine. Let me put my google goggles on....

Oh dear, this doesn't look good. It seems like you've completely missed the boat with this particular card. Coincidence that it happens to be the one I use? I think not.

Oh wait, here's how to fix it. Aw hell, why didn't I think of this? *slaps forehead* I just have install the linux headers and build environment, then grab a new driver from a monkey. Then it's as simple as untarring, compiling, installing, blacklisting the existing driver, restarting, setting up a manual connection, restart, edit my interfaces file, and finally restart one more time. It's like Windows ME, but with more typing.

Ok ok, I kid. After the procedure things were definately ok. It didn't work of course, but hey, I didn't expect you to give up that easily anyhow.

Here's an awesome idea, I'll install Wicd and remove network-manager. Wicd, as you can tell by its name, is a network manager that isn't dependent upon any particular desktop, aside from the fact that it uses gtk. "network-manager," as you can tell by the name, is a network manager
specifically for gnome.

Alright, all I have to do is add a new location to my sources list, good good, click click cut paste. Installing Wicd automatically uninstalls network-manager and its cronies, that's good... adding Wicd to my system tray or whatever it's called and restarting.

Ok, so there's a space for the Wicd icon on the task bar there, but no icon. Odd. Ok, let's fire up Wicd from the start menu clone and see what's up. Looks good. It sees my Ethernet connection, and that's awesome. But alas, no wireless networks found.

Its about this time that things get a little funny. The system starts getting unresponsive, applications start locking up, notably Wicd, and I'm forced to wait...and wait...and wait. Sweet, a dialog asking me if I want to "force quit" my application. Sounds familiar somehow...hmm... Ok, everything's gone to shit now. When in doubt, restart - a lesson from 1995 that still seems to apply.

Alright, this is where things get real weird. I'm enabling and disabling and refreshing and configuring the crap out of everything network, and finally I can see my wireless connection in Wicd. I'm getting an awesome single bar even though I'm three feet from the router (which is a Linksys, btw). Anyhow, same exact problem as before. I can see the network, but I can't login to it. It pukes waiting for an IP. I guess that's not so weird, just different. No, not different, just more of the same.

So whatever, let's ditch this Wicd stuff and go back to network-manager. This works, but my wireless networks don't show up in the network-manager icon thingy. None of my networks do, but I can connect via hard line.

This is retarded. I would kill for an "update driver" button.

Next option seems to be using ndiswrapper, and I'm totally looking forward to that hack fest, let me tell you.

If that doesn't work, I've heard that the card works in SUSE for whatever reason.

"Hey crabby pants, why don't you just go buy a new network adapter that's supported by Ubuntu? Don't you RTFMs??"

Hey nerd-with-dumb-ideas, go fork() yourself.

****UPDATE****

I am successfully running the WUSB54G v4 on Ubuntu 7.10 using the ndiswrapper. Even WPA works! It's a quick procedure. See this guy's blog entry. (However, you do not need to download and manually install ndiswrapper, it's available through normal Ubuntu channels). Note, there is another non-ndiswrapper tutorial out there -- I initially tried it -- but it doesn't seem to work if you need WPA.

Man, this is so easy, I'm gonna send my Grandma an Ubuntu CD for Valentine's Day!