Jeff Duntemann's Contrapositive Diary Rotating Header Image

hardware

Odd Lots

When XP’s svchost.exe Takes 100% of the CPU

I have computers the way some people have mice (those other mice, with legs) and two days ago, a couple of them went nuts. Carol’s SX280 went to 100% CPU usage and roaring fans, and when I turned it on, a second machine (an older SX270) did the same thing. Rebooting changed nothing, though it took a minute or so after reboot for the problem to reappear, which allowed me to do some hasty troubleshooting.

Meanwhile, my quadcore purred along without incident. All three machines use XP SP3, and all three are set for auotmatic updates. I pulled an older SX270 off the shelf that I knew was still at XP SP2 and hooked it up on the bench. Nothing so far. I booted into Windows 7 on my GX620 (it ordinarily runs Mint) and have not seen anything out of the ordinary.

The module sucking all those cycles is the instance of svchost.exe that runs all of the miscellanous Windows machinery, including updates. Hmmmmm.

This is not a new problem; in fact, this rang some bells so old the cloud of dust took an hour to settle. As long ago as 2004, people have reported svchost.exe suddenly taking the whole CPU. Quite a few reports indicated that the culprit was the Windows Update automatic updates client, wuauclt.exe. I turned off automatic updates on the misbehaving machines, rebooted again, and the problem went away.

That’s only a partial solution, of course. And the problem is evidently still with us. In the comments to that post, a user suggested this command series as a fix:

  1. net stop “Automatic Updates”
  2. del /f /s /q %windir%\SoftwareDistribution\*.*
  3. net start “Automatic Updates”
  4. wuauclt.exe /detectnow

In essence, you disable automatic updates, delete all the files from the subdirectory where wuauclt.exe keeps its logs and other data files (you can’t do this if automatic updates is running), restart automatic updates, and then force an immediate check for updates. This worked, and I dusted my hands together in triumph.

Alas, yesterday noonish, both machines again went nuts. Both are scheduled for replacement, so I just let them run. After about two hours of screaming fans, svchost.exe let go of the CPU, and everything returned to normal. In the meantime, my quadcore and that creaky old SP2 machine have shown no symptoms.

I still don’t know precisely what’s going on, but it’s almost certainly some kind of bug in automatic updates. (I’ve scanned all machines for malware and found nothing.) XP updates end next April 1, and by that time I’ll have replaced the two wonky machines with much newer Win7 boxes. (One is already on order.) In the meantime, I’d be curious to hear if anyone reading this has seen the same issue. I expected to see a flurry of online reports and found nothing, right up to a couple of minutes ago. So maybe Carol and I just got to the top of the XP karma fairy’s little list. Still looking, and certainly open to suggestions.

Odd Lots

Odd Lots

Dude, Where’s (the Rest of) My Thumb Drive?

Sony-XAV-601BT.jpg

My new knobless car stereo worked beautifully…except that it couldn’t keep time. The LCD clock display was erratic from the beginning. For the first day or two it was gaining five minutes per day. Then the whole thing reset to January 1 at midnight. I set it again to the current date and time. It ran fast for a couple more days. Then it reset itself again. Nothing was done to the car in that time frame, so it wasn’t that the battery was disconnected from the stereo.

It was just a lemon. So I invoked the 30-day warranty and took it back.

Yesterday I had them swap it out for a Sony XAV-601BT. I’m watching its clock (and everything else) but so far it’s glitch-free. Oh–and it has a volume control knob! It can do hands-free Bluetooth phone wrangling, and a lot of other stuff I haven’t figured out yet. But in addition to all that, it has a USB port on the front panel. That means I can plug a thumb drive right into the stereo itself, and not into a wire dangling off the back of it.

Skin and Fit.jpg

Of course, having bent more than one thumb drive by careless use, I wanted to be sure that a casual hand-wave wouldn’t destroy a drive with every damned MP3 I own on it. So I bought me a thumb drive unlike any other: The 16GB SanDisk Cruzer Fit. Once you plug it into something, the part that sticks out isn’t quite 1/4″ long.

Dude! Where’s the rest of my thumb drive? But no, that’s all there is. It’s just a bump on the stereo front panel.

The stereo is still on probation, of course, but I’m thinking this one is a keeper. More as it (hopefully doesn’t) happen.

Measuring Raspberry Pi USB Power Draw

Smartronix USB Meter.jpg

Most of the problems that turn up while configuring Raspberry Pi systems cook down to inadequate power. The infamous stuttering keyboard problem vanished immediately here when I put the RPi on a stiffer 5V supply. When I bought a second RPi for a programming system, I incorporated a powered hub capable of sourcing 500 ma from each port, and in doing so strangled the power problem in its crib.

Problem solved, but I still wondered: How much juice do these things actually need? How stiff is the 5V supply? I’m a bench tech, and not being able to do actual measurements made me nuts. So I sniffed around a bought a test instrument for measuring voltage and current at a USB port under load. It’s the Smartronix USB Power Monitor, model ST034TT05-01-001. I bought it from CyberGuys; $49.95.

It works like any current meter: You connect it between a USB port and a USB device. It simultaneously measures the voltage on the port and the current through the device. There’s a full-size Type A jack on the right side of the box for connecting the load, and a full-size AB cable plugging into a B jack on the left side of the box, which plugs into a Type A port.

Works like a charm. I did the measurements below in about ten minutes:

Raspberry Pi board running Raspbian, w/o Wi-Fi 50-73 ma
Dell 0C8639 wired USB mouse 5-17 ma
Dell SK8135 wired USB keyboard 53-56 ma
AirLink AWLL5088 Wireless N Ultra Mini USB Wi-Fi 32-80 ma
SanDisk Cruzer Mini thumb drive, 256 MB 27-30 ma
SanDisk Cruzer Micro Skin thumb drive, 256 MB 75-89 ma
San Disk Cruzer Mini thumb drive, 512 MB 7-11 ma
KingMax Super Stick thumb drive, 512 MB 35-62 ma
SanDisk Cruzer Mini 1 GB thumb drive, 1 GB 5-11 ma
SanDisk Cruzer Micro Skin thumb drive, 4 GB 75-91 ma
SanDisk Cruzer Micro Skin thumb drive, 8 GB 43-70 ma

In the readings above, the two numbers are the range across which I saw current run. In most cases, the first number is when the device is idle, the second is when it’s busy. All measurements were taken from the same USB port, one of the four ports on the Rosewill powered hub. All devices tested are USB 2.0, because the meter itself is not listed as capable of testing USB 3 devices.

I have several of most of the thumb drives, and identical models were almost alike in their power behavior. This made me wonder how the Cruzer Minis managed to use so little power while doing the same task that all the other drives did. In this case, the task was copying a 109 MB file (the Lazarus 1.0.6 installer) from the PC to the thumb drive. One would think that smaller drives would draw less current, but not so.

Probably the biggest eyebrow-raiser was how rubbery the 5V USB rail is on my quadcore. An 8GB Cruzer Micro Skin thumb drive pulled the port down from 4.99 v to 4.91 v while drawing 90 ma. The same drive pulled the Rosewill hub supply down by only .02 v , from 5.17 v to 5.15 v while drawing 70 ma. (Current draw in thumb drives is not the same on the RPi as it is on Windows.)

My only gripe about the meter is that “peak” mode displays the highest values for voltage and current, when voltage and current generally move in opposite directions as load increases. So a downward movement in voltage isn’t registered in peak mode.

Other than that, it works as described and answered a whole lot of questions about what sorts of things I can reasonably expect to connect to a Raspberry Pi’s built-in USB ports. Actually, I now recommend using the powered hub for everything, given the RPi’s touchiness about power. It makes the RPi system bulkier and snakier, but a whale of a lot more reliable.

And as for the Smartronix USB power meter, let’s say solidly (if not quite highly) recommended.

Man, But I Miss Knobs

avh-x2500bt_hero_large.jpgThe six-disc changer in my 4Runner’s console stereo dropped dead late last summer, after serving me well for eleven years. Considering the mechanical nightmare the damned thing was internally, I’m a little surprised it lasted as long as it did. So for about ten months now, I’ve been reduced to listening to the radio, in a town where radio is not a priority. (Irony, however, is a Colorado Springs delicacy: With just about every other town and county but Denver voting to ban legal marijuana, the home of Focus on the Family looks like it will soon be the highest city in the state.)

I haven’t listened to pop radio in the car for maybe 25 years, since I started recording mix tapes off vinyl. I expected to develop (however unintentionally) an appetite for recent pop music. Hey, it worked with Madonna in 1986. Not this time. I found one band worth investigating further (Owl City) and bought four, count em, four MP3s. A couple of Owl City tracks, Kelly Clarkson’s “Catch My Breath,” and Two Door Cinema Club’s moody song “Sun,” which I bought because it contains the word “drumlins.” Just that, based on ten months of mostly cringing and reaching for the volume knob.

Now I can’t even do that.

After punting for far too long, I went down to Car Toys earlier today and had them install one of these. It had a Bluetooth phone feature I wanted, since I don’t like manhandling a phone in the car. It plays MP3s from a thumb drive, and every MP3 I have that’s worth hearing will fit on a thumb drive. (Not a big one, either.) It looks for all the world like a smartphone held sideways, complete with the little four-square menu button. All it lacks is a volume control knob. It has a mute button, which will come in handy, just like it does when The Weather Channel plays that excruciating commercial about the poor woman who’s been falling on her kitchen floor and failing to get up since before they tore down the Berlin Wall. It has firmware to update, God help us, and…cripes, I wasn’t ready for this…a remote.

At the risk of sounding like an MP3 on autorepeat, well, all it lacks is a volume control knob.

I’ll get used to it. (I got used to Madonna in 1986, after all.) Mostly what I want out of it is hands-free phone calls and MP3 playback. I know why it doesn’t have a knob: Knobs take room on the panel that you could otherwise fill with icons. And a knob would add another 85.67 cents to the UMC. Besides, knobs are just so 1952.

Just like me.

Odd Lots

Odd Lots

  • Yes, I’ve been away from Contra for longer than I’d like, and the Odd Lots have been piling up. Some of that away was necessary for my sanity, and was spent by the pool at a resort in Phoenix, where Carol and I discussed things like the wonder of a single-celled organism that is 10 cm long. The secret appears to be evolving superior organelles. Bandersnatchi, anyone?
  • While I was gone, someone released a new OS for the Raspberry Pi: The Pidora Remix. It’s basically Fedora for the Pi. I haven’t tried it yet, but I’ll flip another SD card out of the drawer soonest and burn an image. Man, you have to run like hell just to stay in one place in this business.
  • The Raspberry Pi’s main competition, the BeagleBone, now has a 1 GHz ARM Cortex A8 version that ships with a Linux 3.8 kernel. BeagleBone Black supports the Linux Device Tree, which does a lot to decouple hardware details from the kernel. Looks terrific–now all it needs is an installed base.
  • I noticed a system resource draw-down when I had iTunes installed on my old and now electrocuted quadcore. The software took a lot of cycles and memory, even when it didn’t appear to be doing anything. The discussion has come up on Slashdot. (The poster also mentioned Rainmeter, which I tried once and found…ok.) I try to run a lean system here, and I frown on things that want services, tray icons, and 15% of my cycles all the damned time. (The Dell Dock does precisely that. For showing a row of icons. Sheesh.)
  • Amazon is setting up a new markeplace for short fiction, with a twist: It offers to share revenues on fan fiction with the authors of the original items. It’s unclear how many authors will accept that, but I would, like a shot. (I guess all I’d need are some fans.) In truth, Jim Strickland and I talked in detail some years back about opening up the Drumlins World to all authors who’d care to tell a story there, without even asking for money.
  • Clinical depression may be linked to sleep cycles, which appear to have a genetic basis. How to fix this is unclear, but I’ll testify that depression in the wake of losing Coriolis laid waste to my sleep habits for a couple of years. (Thanks to Jonathan O’Neal for the link.)
  • The Man Who Ploughed the Sea may soon be mining it…for uranium. I’d cut to the chase and just mine it for gold, so I can buy more ytterbium for my Hilbert Drive. Alas, there’s less gold in the oceans than we thought (1 part per trillion) and not much more ytterbium (1.5 parts per trillion) so maybe I should just extract the uranium (3 parts per billion) and make yellow pigments to sell on Etsy.
  • I’m not sure I buy this, but it’s an interesting speculation: That the Younger Dryas cold snap was triggered by a smallish asteroid that crashed…in Lake Michigan. Click through for the maps if nothing else. My favorite Great Lake is deeper and more complex than I thought.
  • Save the apostrophe’s! (From a fate worse than dearth…)
  • And save us, furthermore, from new Microsoft technology that counts people in the room watching your TV. Because having more than one person watching a TV show or movie rental is…is…stealing!
  • 3-D printing is still in the stone age (and the Old Stone Age at that) but if we don’t allow berserk patent law to strangle the kid in its crib, wonderful things will happen once 3-D printers are no longer CNC glue guns. (Thanks to Pete Albrecht for the link.)
  • I’m starting to think that 3-D printers like that will soon make one-off repro of small plastic parts like the ones at the center of kites practical. I guess the challenge is somehow getting the precise shape of the part into a file. If I weren’t trying so hard to be a novelist I would probably have a 3-D printer already. For the moment I’m glad I didn’t jump as soon as I otherwise might have.
  • Speaking of CNC…and guns: Plastic guns are dumb, dangerous, ineffective, and basically a stunt that seems designed (probably in Autocad) to make politicians say stupid things and make enemies. The real issue is cheap, portable CNC machines capable of cutting metal. That horse is out of the barn and beyond the horizon.

Odd Lots