Google Ads
2008.10.29 [Wed] | 09:08 AM

I tend to be the go-to person for tech support among my friends, family, and neighbors. A few nights ago, one of my neighbors asked me to help him with his custom-built machine. His USB ports had mysteriously quit working. I messed around, and the same thing kept happening. His Microsoft USB wireless mouse worked just fine, but his HP all-in-one inkjet printer and his SanDisk thumb drive didn’t work. Plugging them in resulted in a “one of the devices connected has malfunctioned” error from Windows. His thumb drive appeared to work just fine in Ubuntu Linux.

We removed all the USB host items from the Device Manager and reinstalled them, to no avail. Then I tried disabling the USB enhanced controller item (this is generally what lets Windows know that a USB controller is capable of USB 2.0). This worked, but kept his devices from working at USB 2.0 speeds. We even reinstalling Windows completely and still had the same problem.

I started Googling around and found this article regarding my exact problem - the SiS PCI to USB Enhanced Host Controller mysteriously quit working, and took all USB 2.0 devices down with it. This blogger’s solution was to shutdown and unplug the computer, wait for about half an hour, hold in the power button for a minute, and then restart the machine.

And, like magic…it worked.

I can only begin to guess why. Like this other blogger, my neighbor’s machine had a Gigabyte-brand motherboard. My theory is that something was getting corrupted or otherwise mistranslated by the motherboard regarding the USB 2.0 controller, and whatever was breaking things was being remembered across shutdowns and reboots.

By letting the machine sit for awhile, all the capacitors on the motherboard and power supply emptied out, thereby completely cutting power to the machine. This apparently reset whatever dark magic was causing the problem in the first place.

It’s likely that in Matt’s case, Linux was allowing the ports to work, but only at 1.1 speeds. Since we didn’t test how quickly file transfers took place in Linux, I can’t confirm this theory, but it would fit with my above assumptions.

At any rate, now we have our answer. The next time this happens (and I imagine it will), I’ll try the fixes listed on usbman.com first, so we can try to cure the problem once and for all.

2008.10.27 [Mon] | 08:53 AM

Since OS X 10.4 (Tiger), Apple has provided a remote desktop capability integrated into the operating system. However, unlike Windows (which uses a proprietary protocol called RDP), Apple chose to use the VNC protocol for their remote desktop server and client.

I wouldn’t recommend using Apple’s VNC server; it’s far more restrictive than alternatives. Vine server is much more robust and customizable, and it’s open-source.

However, if you find it necessary to use Apple’s built-in VNC for whatever reason, you may also find yourself needing to control the server from the command line (for instance, if the server application fails and you need to SSH into your remote Mac to restart the service).

I found out the hard way that the Perl script Apple uses to restart the server stores the VNC password in plaintext. This is wrong on a lot of levels, one being that it’s completely user-unfriendly. At any rate, after some Googling around, I found a Perl script that will encode the password with the necessary key. You can then input the encoded password in your VNC restart command.

The Perl script looks like this:

perl -nwe 'BEGIN { @k = unpack "C*", pack "H*", "1734516E8BA8C5E2FF1C39567390ADCA"}; \
chomp; s/^(.{8}).*/$1/; @p = unpack "C*", $_; foreach (@k) { printf "%02X", $_ ^ (shift @p || 0) }; print "\n"'

Paste this at your bash prompt and hit enter. You can then type your password, hit enter again, and have the encoded password ready to go. Once you have your encoded password, you can use the kickstart command to restart the VNC server. Apple has some documentation on using kickstart here.

Overall, Apple made a major blunder by not correctly encoding the password with the kickstart utility. Hopefully this will be remedied in a future release of OS X.

2008.10.16 [Thu] | 04:15 PM

It’s been more than a month since I last posted.

Sorry about that.

I’m going to be working on a new project that involves Twitter (likely in PHP, so that I can run it from ABetterGeek.com), so I may post some insights into that in the near future.

I don’t intend for this to be a dead site; it’s just hard to keep up with regular writing. I need more to talk about. Politics, maybe. And religion. And some lawyer jokes for good measure.

Google Ads