Cant get a connection with an R8169 NIC and Linux/Windows

And so, earlier today, I had a problem with my MSI Wind U230. Normally, I can connect via ethernet (A realtek 8111/8168B chip that used the r8169 driver)  without any problems, but today... it decided to not connect to anything. dmesg showed that the link was down and I only kept getting a "Cable unplugged" message from my DE (KDE 4.X in this incarnation of my linux installation).

Fortunately, wifi was available, and I checked a few forums and bugs that recommended installing the r8168 driver instead of using the stock r8169 that's shipped with Kubuntu. Then there was this other link (sorry, but I can't recall them anymore, since I hopped between dozens of pages looking for a solution) that mentioned that if you dual-boot (which I do), to check in the windows device manager and set a few wake-on-* settings to either enabled or disabled, depending on the driver version. Neither solution appealed to me for some reason. I've kept to using stock ubuntu kernels (they work just fine for my case, and am currently on 3.0.0-13-generic) and have no problems. As for the windows solution, I couldn't see where or how windows would put my NIC to sleep (more like a coma, was the way it was descrobed), since I jump between Linux and Windows 7, and my NIC never went into a coma before.

What worried me most was that I was playing with some grub options (specifically pcie_aspm=force and acpi_osi=Linux). Although I wasn't scared that those would be permanent errors (well, I was hoping they wouldn't), I wen't back and forth with different combinations in using them (side note: they didn't work for me in regard to power-saving).

What fixed the whole thing eventually was unplugging this laptop from power, and pulling out the battery. With all power sources disconnected, I held down the power button for a good 15-30 seconds (sorry, I wasn't counting, but it was a significant number of seconds though), and plugged in again. After booting, all was fine.

The only thing I could think of that might have triggered this was either the pcie_aspm=force or the acpi_osi=Linux or both, that put my nic to sleep. But after draining all the residual power from the board - which is what disconnecting all power sources and holding down the power button does - it seems whatever was got cached(?) in the nic got cleared and a new surge of juice set it right up again.

Ah well... something new that I never experienced before. Took me all of 30 minutes to figure out through trial and error.


Log in to your remote KDE desktop through SSH.

My usual work machine is a laptop, but I also have a desktop where I run a few things as well. I control both using synergy, so that I share my laptops keyboard and mouse between both machines. but since I rarely work on the desktop directly, I took out the keyboard and the mouse to save desktop space. But every so often, it has to restart (like after updates), and logging into it again was a hassle having to plug the keyboard and mouse again. Synergy won't work unless you're logged in (meaning past the KDM log-in screen.). So what's a man to do when you're connected only via SSH?

Well, what you do is simply:
sudo kdmctl -g login :0 now username password
What does that do? The -g lets it connect using the global unix domain socket.
The login means exactly that, log in.
:0 - This tells kdm that you'd like it to happen on display 0.
now - well, it means now.
username and password would be the username and password you normally use to log into your kde desktop.

Sure as heck saves me a lot of backaches from crawling under the table just to reconnect the mouse and keyboard.

My work set-up.
Now, this won't show your desktop machine's screen on your laptop screen, since this isn't a VNC connection. This will only log in to that machines KDE desktop. Controlling it will happen using synergy (link above). Synergy runs on linux, windows and mac.Let's me have the pleasure of having two screens with the full power of two separate computers. The only thing that's missing from the mix is that you can't drag windows from one screeen to another, but I can live with that.