Wednesday, January 18, 2012

Problems with RTL8169 after Ubuntu 11.10 upgrade -- SOLVED!

I recently encountered a problem with my onboard LAN controller after installing Ubuntu 11.10.

root@WATCHER:/home/val# lsb_release -a
No LSB modules are available.
Distributor ID:    Ubuntu
Description:    Ubuntu 11.10
Release:    11.10
Codename:    oneiric
root@WATCHER:/home/val#
I have a dual-boot setup with Windows XP. My PC is wired to the router.

The culprit
PROBLEM:  After booting to Linux, no link can be detected from my LAN controller to the router.

TRIAL #1: I tried booting to Windows and to my horror the LAN controller appeared to be really dead! CONCLUSION: LAN is FRIED!

TRIAL #2: I tried resetting the BIOS defaults and enabled/disabled LAN after several reboots but it was really dead no matter which OS I booted to! CONCLUSION: LAN is REALLY FRIED!

TRIAL #3: In my frustration, I shut down the PC, UNPLUGGED the POWER CORD and was thinking of getting a USB wireless adapter. A few minutes later, I was still not ready to give up and POWERED UP the PC to try another trick.  Miraculously, the LAN controller worked!!! CONCLUSION: LAN is still OK!

Explanation (after some investigation):

My chipset is RTL8169 (Realtek) and there is a bug submitted here.

It seems that Windows is disabling the NIC WAKE-ON LAN during shutdown and is the only one that can enable it during the next Windows boot.  Linux is not checking this state so it cannot detect the NIC when you reboot to Linux after a Windows session.

The hard solution is:
  1. unload driver - rmmod r8169
  2. load the driver again - modprobe r8169
The easy solution is to POWER OFF (unplug!) your PC for a few seconds and the NIC will forget its settings causing Linux to detect its original state.


Whew! Total time wasted: 1 hour 45 minutes.

Sunday, January 1, 2012

2011 in Bullet Points

Here's my 2011 log:
  • Got inducted to the Secret Society of DAS*
  • Regained the 16.5 lbs I have technically lost* 
  • Attended a basketball coaching camp
  • Attended a lot more PBA Games than last year
  • Visited a very cold HK in March!
  • Replaced some of my over-recycled shirts
  • Spent a couple of nights in Tagaytay with friends
  • Launched the biggest project of my career (work stuff)
  • Played a lot of basketball
  • Found it harder to play a lot of basketball than in 2010
  • Coached three men's teams (no luck)
  • Coached two women's teams to the championships
  • Renewed my dormant license and paid a hefty fine*
  • Tried to play Futsal and my team were crowned champions (what luck!)
  • Visited a (still) very cold HK in December!
  • Got a new lens and flash for my camera
  • Wrote my first yearly recap
* Too long to explain