Linux on Laptop = Epic Fail

I brought my MacBook Pro in for a warranty repair yesterday around noon. Since then I’ve been using a Lenovo T61 to get basic work done, and also to see if any progress has been made in the area of Linux support for my laptop. I bought this laptop specifically because a website said that it was very well supported by Linux distributions “out of the box”, including video and wireless. I was sure to make hardware choices that didn’t require special third-party drivers… I’ve been doing this for 10 years, so I have some understanding of how to buy a laptop that I plan to put Linux on. Well, this time I apparently failed.

First, I had Ubuntu installed, and I was never able to keep the wireless card working consistently. To be honest, Ubuntu is the best distro I’ve had on this thing so far. Next, I gave OpenSUSE 11 a shot, and there’s been no end to the issues. Of course, it started with the wireless card. I have an Intel 3945ABG wireless card, according to lspci and dmesg output. In fact, here’s my lspci output right here:

00:00.0 Host bridge: Intel Corporation Mobile PM965/GM965/GL960 Memory Controller Hub (rev 0c)
00:02.0 VGA compatible controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (rev 0c)
00:02.1 Display controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (rev 0c)
00:19.0 Ethernet controller: Intel Corporation 82566MM Gigabit Network Connection (rev 03)
00:1a.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #4 (rev 03)
00:1a.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #5 (rev 03)
00:1a.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #2 (rev 03)
00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 03)
00:1c.0 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 1 (rev 03)
00:1c.1 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 2 (rev 03)
00:1c.2 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 3 (rev 03)
00:1c.3 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 4 (rev 03)
00:1c.4 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 5 (rev 03)
00:1d.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #1 (rev 03)
00:1d.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #2 (rev 03)
00:1d.2 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #3 (rev 03)
00:1d.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1 (rev 03)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev f3)
00:1f.0 ISA bridge: Intel Corporation 82801HBM (ICH8M-E) LPC Interface Controller (rev 03)
00:1f.1 IDE interface: Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) IDE Controller (rev 03)
00:1f.2 SATA controller: Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) SATA AHCI Controller (rev 03)
00:1f.3 SMBus: Intel Corporation 82801H (ICH8 Family) SMBus Controller (rev 03)
03:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02)
15:00.0 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev ba)
15:00.1 FireWire (IEEE 1394): Ricoh Co Ltd R5C832 IEEE 1394 Controller (rev 04)
15:00.2 SD Host controller: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 21)
15:00.3 System peripheral: Ricoh Co Ltd R5C843 MMC Host Controller (rev ff)
15:00.4 System peripheral: Ricoh Co Ltd R5C592 Memory Stick Bus Host Adapter (rev 11)
15:00.5 System peripheral: Ricoh Co Ltd xD-Picture Card Controller (rev 11)

I’m running the KDE4 desktop, and tried using the default NetworkManager icon that’s in the systray to get things working. From what I saw there, it appeared that my card wasn’t scanning. I put in my network details manually, and tried to connect, and it failed with no errors. In the NetworkManager log there was lots of output, but nothing particularly useful. It just said the association took to long and that it was now marking that connection as ‘invalid’. Great. So here I am, trying to use Linux on the desktop, and only 5 minutes after the very first system boot, I’m tailing log files and debugging, and basically playing sysadmin, which is exactly what I don’t want to be doing on my desktop system. Restart NetworkManager, see what dhclient is doing, reboot, check /etc/modprobe.d, lsmod…. fail. Now what?

Well, I opened kwifimanager, and it said that I had indeed associated with an access point. So… I *am* scanning? Hmm. I had no IP address, so I figured I had probably fat-fingered my WEP settings somewhere. Tailing /var/log/messages agrees, saying WEP decryption is failing. So I double-check everything, all looks normal and correct to me, I try again, and No Bueno. *sigh*.

Finally, I reverted to command-line tactics, and ran this little line:

iwconfig wlan0 essid <myssid> key <mykey>

Magically, it works, where all of the GUI nonsense had failed. Now here’s a question: how the hell do you get this to “just work” at boot time? Well, I had about 10 emails to send to clients, so I put that question off and fired up a browser and…. fail. WTF?

I had an IP address, pinged my router, pinged another host on the network, all good. Pinged an external IP I know by heart, fail. Ugh. Ran ‘cat /etc/resolv.conf’ — empty. Apparently, dhclient didn’t update the information it got from my router. It also didn’t update when I set the domain in NetworkManager to ‘home’, because it still said ‘search site’. I added the proper lines in there, and tried again in the browser… fail. Now what?!?

Ran ‘netstat -rn’. I don’t have a default gateway. *sigh*…

route add default gw 192.168.1.1

And I finally have internet access.

Of course, I can’t work 24 hours a day, so I went to bed, and left my laptop running so I could get right back to work in the morning. Or not.

I had foolishly chosen to use an OpenGL screensaver. Overnight, it completely locked up the machine, rendering it useless without forcibly rebooting it. So much for getting right back to work.

Well, let’s see if I can get some of these issues fixed by updating the software, since I’m now at least connected to the internet (of course, after the forced reboot, I had to do the iwconfig->route add routine again). Ran the updater, picked some extra repositories, and it goes off to set things up. Unfortunately, it also prompts me to import probably 50 or so GPG keys. Annoying. More annoying is, after all of that, it fails to update any of my software, even though it tells me there are updates available. Why you ask? Here’s what I got…

Failed to mount cd:///?devices=/dev/sr0 on /var/adm/mount/AP_0x00000001: No medium found (mount: No medium found)

Click ok. Get same error again. Click ok. Get slightly different error…

Unexpected exception. Failed to mount cd:///?devices=/dev/sr0 on /var/adm/mount/AP_0x00000001: No medium found (mount: No medium found)

Click Ok, get another message…

Please file a bug report about this. See http://en.opensuse.org/Zypper#Troubleshooting for instructions.

I go there, the URL isn’t valid. I find the Troubleshooting page on my own, and there’s a bunch of generic troubleshooting information there. More command line sysadmin-ish stuff in there. Just the kind of stuff I don’t need to be spending otherwise billable time on. I give up and decide that I’ll just deal with it in its broken-ass state for the next 10 hours or so until I can get my beloved MacBook Pro back.

  • http://damroo.blogspot.com Varun

    Which version of ubuntu did u try?

    Intel Corporation PRO/Wireless 3945ABG Network Connection works out of the box. I have a T60 with an Atheros chipset, it worked with ndiswrapper but with 8.10 even madwifi is able to work without the ndiswrapper.

    Is ur wifi on 54MBps or greater?

  • m0j0

    @Varun

    I have installed all versions of ubuntu since I got the laptop, which I believe include 8.04 and 8.10, and whatever was before 8.04 (7.10? Don’t remember).

    Also, note that it’s not so much that my card wasn’t supported. It was more that NetworkManager somehow failed to work with it. I didn’t install any extra software to get it to work — I just ran a command line to get it working. Still, even after that, NetworkManager fails to do anything useful with it. I guess there should be a distinction between “works out of the box” and “supported out of the box”. The hardware was clearly supported, but the software failed to make proper use of it.

    Of course, this was only one issue I had with this (there are graphics issues, and stuff like suspend/hibernate and audio that I didn’t even touch on), and the low-level issues are a bit less on-point than the higher-level message that Linux on the desktop, and particularly on laptops, well… “it’s not soup yet”.

    “Works for me” isn’t good enough anymore. I’ve been using Linux for 10 years, all along hearing how it’s good enough for your grandma and all the problems have been solved. All the while I’ve been replying that hardware is Linux’s Achilles heel, and until it’s addressed, Linux is basically a server OS only. Fanboys (I’m not including you in that term – I don’t even know you) have stayed in denial. The rest of us have mostly gone to Macs or bought preinstalled hardware from Linux-supporting hardware vendors. This is evidenced by the huge growth in the number of Macs I’ve seen at places like OSCON and LISA conferences, which used to be all-Linux, all the time.

    It’s an odd feeling to be longing for a 100% proprietary solution, but really, I just want to get work done instead of clowning around with my OS.

  • Coreigh

    From your post I gather that you are a more knowledgeable user that I am, but I do have this to offer. In the little experience I have (a few years with Ubuntu) I have fount that the LTS versions, 8.04 is one, work better than the other releases. Also I have heard many others complain that the Kubuntu (KDE) version does not work as smoothly as plain Ubuntu (gnome desktop). I did not gather from your post if you were using Ubuntu plus KDE, or the spin-off Kubuntu. You are porbably wondering why they would be very different and I don’t know, but I have heard this a lot on the ubuntuforums.org support web site. Best of luck to you.

  • m0j0

    Blech. The nightmare continues: the KDEtwitter widget is horrible. The bg is almost black, which is fine since friends’ tweets have a white font. But new posts? They have a *black* font. Fail.

    Also, the KDE digital clock appears to *only* support time in military format. Fail.

  • http://gedmin.as Marius Gedminas

    Just as a data point: I’ve got a Lenovo T61. Same wireless:

    03:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG [Golan] Network Connection (rev 02)

    Works fine with unprotected and WPA2 networks (no idea about WEP) in Ubuntu 8.10 (the GNOME version, not that there should be any differences with KDE, I don’t think). I had to enable the card in the BIOS before it was detected (‘Internal Wireless Radio Frequency: ON’) by Ubuntu.

    The big problem with the current crop of Linux distros is that all of them have problems with some of the hardware.

  • chris

    I’ve been using OpenBSD on a Lenovo T60 for quite sometimes with success. Linux has gotten to a point where it’s too bloated to be of any use; it has become a poor man’s Windows. Anyhow, if you want, download OpenBSD 4.4 ISO and give it a try on your laptop.

  • Perry

    Have you gotten all of the updates? I am running 8.10 on a T61 and had some minor issues until updated the whole system to the latest and greatest. I haven’t had any issues since then.

  • m0j0

    @chris

    I have run open/net/freebsd. To be honest with you, I’m not sure I could be offered enough money to run OpenBSD as a day-to-day workstation or laptop. The last time I tried I actually lasted a full 3 weeks (a few years ago now), and it was without question the most painful desktop computing experience of my lifetime. The idea here isn’t to get more geek cred by showing people my hardcore BSD desktop system (gasp!). The idea is to get work done without giving much thought to the underlying system.

    Also, to call Linux bloated is to sort of negate any geek cred you might get from running a bsd distro, because Linux is only as bloated as you want it to be. If you don’t like the bloat, recompile the freaking kernel and get rid of it. I’ve compiled Linux kernels for servers that were 1/10 the size of the one the distro supplied, and everything worked just fine.

    Also, to call a spade a spade, OpenBSD doesn’t have any better support for laptop hardware than Linux does. Saying OpenBSD “works for me” is hardly a testament that holds any water with anyone who has any familiarity with these systems.

  • eylisian

    T60 & Ubuntu 8.10, wireless net is broken. Card (intel 3945) is recognized and lsmod shows the iwl3945 module loaded. Not entirely certain it’s network manager as I uninstalled it and installed wicd (sourceforge), it handles wired ok, but wireless (WPA2, pub essid) net is not showing up (didn’t under network-manager either). I am going to try the backports trick and see if 8.04 module will fix. I finally pay the ‘lenovo’ price, this is the first thinkpad I have picked up (out of 4), that has bombed this way.

    Sometimes I wish I used a Mac too, and have (work), but when I get peeved I remember how much I paid for the software that commie bastard (Shuttleworth) is pushing on me… And thats when I think about falling back to Debian :)

    e.

  • eylisian

    ok. did the backport thing (uncommented intrepid-backports in /etc/apt/sources.list) and then installed linux-backports-modules-intrepid-generic, restarted to boot into the new kernel and wireless (with hardware led on monitor) is working. Reason to stick w/ your Mac, connection flaked out after about 70M of traffic, had to restart it in wicd (which btw, is a decent tool for interface management). Could be wicd, so I’ll try network manager later on.