A Much Simpler Fix for the r8169 “Link-Down” Problem

There is a widespread problem with the Linux driver for the Realtek 8168/8169 cards where the modules load properly and the card is visible but no link is detected. E.g.:

Jun 21 18:28:41 localhost kernel: r8169: eth0: link down
Jun 21 18:28:41 localhost kernel: ADDRCONF(NETDEV_UP): eth0: link is not ready

There are lots of details and suggested solutions from the Ubuntu people. None of the suggestions worked for me, however. Several of them suggest configuring the card under Windows, but the box containing this device is a single-boot linux fileserver. The “wake-on-LAN” functionality seems to be implicated, but not in a way I can see how to fix.

After much head-banging (in the bad sense), I found a simple solution:

(1) Install ethtool
(2) Modify /etc/network/interfaces as follows (substitute your r8169 interface for ‘eth1′ and other settings accordingly):

iface eth1 inet static
pre-up /usr/sbin/ethtool -s eth1 autoneg off
address 192.168.98.1
netmask 255.255.255.0

This did the trick for me where no other solution would work. Of course, link autodetection no longer occurs, but that’s a small price to pay for connectivity.

This is a Debian etch installation using a slightly more recent kernel (2.6.25-2-686).

As an interesting side note, on this new box, the interface appears as eth0 in the kernel logs, but is actually mapped as eth1. Similarly, a second Ethernet interface appears in the log as a different device number than that by which it is referenced. Any ideas why?

Update 6/22/08: Still not getting 1000BaseT (Gigabit), however. If I force 1000BaseT with ethtool -s eth1 speed 1000, the link goes down again (even with autoneg off). The same card in another box, however, detects the link and goes to 1000BaseT automatically. So I’m stuck at 100BaseT.

Update 6/24/08: Linux 2.6.26-rc5 fixes the problem 100% for me.

Technorati Tags: , , , ,

Windows Tool of the Century

Okay, maybe “century” is overblown, but the True X-Mouse Gizmo for Windows is the best thing since sliced bread (if you use Windows):

Have you ever paid attention to striking difference in the thickness of forefingers in X11/Unix and MS Windows users, respectively? The latter have much more muscular forefingers that often suffer from chronic aches in their joints. They also much more often develop mouse arm, pain in the neck and shoulders, and other troubles known as Repetitive Stress Syndrome and associated with excessive usage of a pointing device. Why?

The Gizmo even solves the classic X copy/paste buffer problem where you want to select text to paste the contents of your copy buffer over it, only to replace your copy buffer with the newly selected text. Linux could use such a solution, as well!

Linux Installation Video

Speaking of funny embeddable videos, here’s another one that will appeal to at least some segment of my readers. I don’t know if this one has already made the rounds and I’m late for the memetrain. If so, I blame the fact that I’m getting on in years.

And here, via Tikirobot, is a not-funny video about Dasher, an amazing information-efficient typing system. Again, I suspect I’m late to the party on this one:

Finding Hardware That Doesn’t Suck

I’m sure I’m not the first one to have this complaint, but I really wish there was a list somewhere of the Best (x) that Just Works under GNU/Linux, where (x) is a device or card. Right now, I just want a good analog video capture card (for editing and converting VHS home videos to DVD). I keep coming across webpages that say, “I’ve gotten this to work under kernel 2.2…”

I’d just like for every hardware buying experience to not be a four or five hour expedition. Just tell me what I want, and I’ll find just choose the lowest price from pricewatch and call it a day.

And, hey, while I’m complaining: does anyone have any idea why tcextract locks up vim for several seconds at a time even when run at nice 19?

Update: I should clarify if anyone actually wants to answer my video capture question that it is for a laptop, so it either needs to be a USB2, Firewire, or PCMCIA device.

Blinkflash

Free software hack discovery of the day: Blinkflash, the unofficial winkflash commandline client.

Competition in the web-based photo printing business is heating up, and Winkflash is the best priced I’ve found so far. With an introductory coupon code, 4×6 prints are only 6 cents each; and normally they are 12 cents each, with $0.99 flat rate shipping. We just made our first order, so we’ll see how the quality is, but these days most of these services seem to provide comparable results.

The main problem is that the two bulk upload systems winkflash provides—a Java applet and an Internet Explorer “drag and drop” control—don’t work under GNU/Linux. So you’re stuck uploading photos one by one with a web form.

Enter Blinkflash—now you can upload your photos right from the command line, with Unix-ish efficiency. Blinkflash just submits the photos to the web form upload system, but it saves an awful lot of time.

Hopefully Winkflash doesn’t mind this program—it can only generate more revenue for them. I suppose they might have trademark concerns, but I don’t think that is fatal.

I think I’ll package it for Debian and make a few tweaks. For one thing, it only works with the UK version of Winkflash, but that can be fixed with an extra command line switch. Also, you have to enter your username and password on the command line—there should be a way to store that in a .rc file. But it’s in fairly legible python (isn’t all python code legible?), so I think I should be able to take care of these things quickly.

Novell Public Service Announcement

Novell Public Service Announcement. Cute, but requires Flash. Why not just make it a downloadable movie file?

GNU/Linux Training

I’ve been considering trying to offer a GNU/Linux course at a local Adult Education Center. The Boston Center for Adult Education, the Cambridge Center for Adult Education, and the Brookline Center for Adult Education all offer dozens of computer courses, but only for legacy operating systems and applications. Not a single course focusing on open source software.

I imagine a few obstacles. First, would any of these places even let me set up a Linux lab? I can’t imagine they’d be too willing to have all of their hard drives wiped (or repartitioned) and replaced with new, unfamiliar software. My experience is that Linux is more threatening to system administrators the less familiar they are with it. The class could probably be taught with a “live” CD distribution like Knoppix or Ubuntu Live, but this would mean I couldn’t demonstrate an actual, real live installation, which is often the part where people get stuck.

Second, who would take this course? This is one of those cases where you can’t even lead a horse to water (much less make him drink)! I would want to tailor the course to a target audience, but I have trouble guessing if the audience would be: (1) no one (2) curious home desktop Windows users (3) technical people with no familiarity with Linux, or (4) beginner Linux users who are looking to be able to solve problems on their own better… or maybe some other audience entirely? Of course, the way the course is advertised would to some extent determine the audience, but I’d like to find the most ripe target audience.

Third, how do you teach a computer course, anyway? I’ve never had a demonstration-based computer training that I found very useful. In my experience, I learn everything by doing—and by doing I don’t mean repeating the actions I see an instructor doing. (“Now click on ‘Gnome Control Coenter’…”) It seems to me that learning about software is such an individual experience—how do you effectively scale it up to 5-15 people so that no one is left behind, no one is bored, and everyone comes away feeling much empowered? And how do you model the critical “trial and error” stages that everyone must go through to really grasp something?

It occurs to me that maybe the best way to teach a software course might not involve much actual demonstration at all, instead the trick is to teach people a generalized method for approaching problems so that they have the tools they need to find answers when problems arise.

For example, on linux-disciples, a small community-of-interest mailing list I administer, someone recently asked “how to get online”. It wasn’t clear at all what layer was the problem; I responded:

The trick with this sort of problem—and really 99.9% of linux problems—is drilling down to the problem area. One of the problems I consistently see with newer users is that they feel helpless because they don’t know at which layer the problem is arising.

So there are a few questions:

(1) Does your computer see your network card?
(2) Does your network card see the wireless signal, and associate with the wireless router?
(3) Does your network card get an IP address from the wireless router?
(4) Does the wireless router see the “Ethernet modem” (I assume you mean cable modem)?
(5) Does the cable modem see the Internet?

And then continued to walk through each of these items with some suggestions for how to figure out if that was the problem. I think training people to (1) figure out what questions they need to ask, and (2) how to go through the questions one-by-one and get a definite answer as to whether the system works at that level, would be the best way to teach this kind of course.

Where Did “Open With” Go?

Living at the bleeding (well, leading) edge of open source development can be quite disconcerting as a desktop user. For example, in some recent nautilus upgrade, the “open with” option for folders just disappeared. I used this to queue up folders of music in xmms. Moreover, the “open with application…” option for files no longer gives a nice dialogue where you can define applications for file extensions (or specific files)—now it just prompts for a command to run. Where did it all go?

I think my blog has been too “consumer protection” focused lately—see my recent entries on WLI Reservation Rewards (now up to 25 comments!) and U-Haul for example. I’m afraid I’m becoming a one trick pony, so I’m going to limit my consumer complaints for a while, even though I’ve got a nice one stewing about Verizon. Steve says I’m actually a three trick pony: Linux, IP law, and consumer scams. Maybe he’s right.

Buffalo Technology Does Not Suck

Just got off the phone with Buffalo Technology tech support. They most definitely do not suck.

This morning, my house’s WiFi just stopped working entirely. I have a pretty new Buffalo Airstation WBR2-G54, which I bought because cnet seemed to like it, and because it comes with a repeater that extends the wireless range (and creates a new wired access point) simply by powering it up. I was sick of slow media transfer over 802.11b, since I use WiFi to play my music collection everywhere in the house. (I do have pangs of guilt at not buying a router with open source firmware, however, like the Linksys WRT54G).

After trying the standard tricks (resetting the router, different clients, etc.), I decided to call tech support. First plus: Buffalo has free 24/7 tech support for all customers.

The tech support guy I got was clearly clued in. He could tell right away that he didn’t need to ask me if the router was turned on. He also figured out pretty quickly that I run Debian, which is also the distribution that he was learning. I love the feeling of connecting with another Debian user, particularly a tech support person who you know must spend his entire day talking to clueless users—it’s like you have a secret handshake and you can skip all the bullshit.

Anyway, the problem turned out to be relatively simple: I just needed to change the wireless channel. It hadn’t occurred to me because nothing had changed recently in my home. According to the clued-in tech support guy, though, interference can come from quite far away sufficient to make a particular frequency totally unuseable. There is a large condo development going in across the street (probably about 300 feet from my router) and he said he had encountered problems with construction interfering with WiFi several times.

So I still think U-Haul Sucks, but I am firmly convinced that Buffalo does not.

(I’m also wondering if I should worry about interference that is so powerful as to knock out my whole wireless network coming from so far away).

MP4/AAC Tag Editor for Linux?

Is anyone aware of an MP4/AAC sound file ID tag editor for Linux? There doesn’t appear to be anything in Debian; a Google search doesn’t reveal any obvious candidates.