Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

2011-08-22

Permanently fixing Realtek networking on Ubuntu Natty

So here we are again. Kernel upgrade, then reboot => no network. Last week a kernel upgrade borked my network again, and it took a while before I remembered that I needed the r8168 module (see last posting).

Today it happened again. So I think to myself "There must be a better way."  It turns out there is:  It is called DKMS, the "Dynamic Kernel Module Support".  Essentially it works by registering the module for rebuild whenever the kernel is upgraded.

2011-05-03

Fixing Realtek networking on Ubuntu 11.04 (Natty Narwhal)

Tonight I made the mistake of upgrading my primary home work computer to Ubuntu 11.04 in the middle of a crunch period at work.  I'd found the perfect time for it, I thought; start the upgrade and get the kids to bed while it runs (monitoring it every now and then).  Once the kids are tucked in, I reboot the box.  So what happens?  

Boom! no network.  dmesg says 
r8169 0000:02:00.0: eth0: unable to apply firmware patch
r8169 0000:02:00.0: eth0: link down
ADDRCONF(NETDEV_UP): eth0: link is not ready
Ouchie; I, like, uhm, really need net access for work.

I'll elide the approximately four hours of increasingly panicky fiddling and Googling that occurred at this point; I feel my blood pressure rising just thinking about it.

End of story:  Check which Realtek chipset you have using lspci. Grab the appropriate proprietary driver, r8168 or r8169 (hope for the 8168, the 8169 driver doesn't even compile without the changes this guy details; luckily I have an 8168) and install it.  I have net again!

Now to do what I originally booted the box for.

2008-11-10

Running a secondary X server

Sometimes it is useful to run a second (or third, or fourth...) X server for testing porpoises. I find this invaluable when hacking at window managers (such as my current favorite, awesome).

It is also occasionally useful to be able to kill an X server with impunity, e.g. to check how an application behaves when its X connection goes away.

Even better: You can use this to deal with less-than-well-behaved programs that require a given resolution or color depth; I use it to be able to play Might and Magic VI full-screen using Wine, without having to fiddle with XRandR to get my resolution back afterwards.

So how do I do this? Simple:
startx /path/to/program option1 option2 -- :1

It really is that simple. If you wish, you can add more options after the double dash to pass them to the invoked X server. For instance, to run MM6 I do this:
startx $HOME/bin/mm6-core -- :1 -depth 16

Where the -depth 16 tells X that I want 16-bit color. mm6-core is simply a script that takes care of invoking Wine with the right options.