05.29.08
Posted in General at 12:26 pm by Steven
I just noticed that in a certain usage, the phrase-forms ‘hang … off …’ and ‘hang … on …’ mean the same thing. (Of course, you could find a lot of examples of such phenomena in English, but hey, this is my blog and I reserve the right to post about things that are not very new or original.)
‘Course, you wouldn’t say ‘hang the shirt off the hanger’ or ‘hang the keys off the hook’, but you would say ‘hang the Payment object off the Speaker object’ or ‘hang the new tree off the first leaf’ when talking about data structures in software. Or at least, I and my peer group would say these. But they mean the same as if you replace ‘off’ with ‘on’. I guess the preposition there is more for looks than function, since ‘hang’ itself is fairly unambiguous.
So I guess the only thing that’s actually interesting about this is that the phrase was appropriated into programming terminology, then slightly morphed from its origin, and probably for no good reason.
Permalink
05.28.08
Posted in General at 1:11 am by Steven
Did you know that in Tomcat 6, you apparently… well, I can’t quite say what the cause is, but here’s what happened:
- I have a webapp that’s using a library that might be doing some slightly tricky classloader things
- If I access that app through the AJP connector, it fails to find a class that’s definitely there in my WEB-INF/classes and world-readable
- If I access that app (from the same URL and in the same state) through the HTTP connector, it finds the class
It must be something to do with classloaders, but I can’t say that I understand any reason why that would happen. Of course, I haven’t investigated it, either, because I’m more interested in getting the thing to work right now than in figuring out what this weirdness is about.
Instead of using mod_jk and JkMount, I’m using mod_proxy_http and ProxyPass. Works well enough for my purposes and avoids whatever this problem is. Maybe sometime I’ll be inspired to dig deeper, because ya know this would turn out to be one of those “wow, I can’t believe these things would all interact in such an unexpected way” things.
Permalink
05.20.08
Posted in General at 8:58 pm by Steven
Oh, forgot to mention in my “TV all over again” post that that was the last app I had to run in Windows. So now, in the normal state, there isn’t a lick of Windows running in my house. I run it in a VM when I need it, and on very rare occasions I might boot to it, but for the most part, don’t need it no mo.
Permalink
05.19.08
Posted in General at 2:37 am by Steven
So this morning I learned that one of my hard drives had died during the night. Luckily it was just holding backup data that was waiting to be burned to DVD-RW, so it was not a huge loss. But annoying nonetheless.
While I was in there replacing that, I figured I’d swap my TV card into that machine too, since the one that it was running in is failing to boot for reasons I don’t quite understand (it’s a combination of my fault and hardware bugs, I think). That required getting the card running under Linux.
It was only recently that my card (Hauppauge HVR-1600) got a Linux driver, so I was waiting for a while before I jumped over. But, given the confluence of annoying computer failures, I took the dive today.
It took several hours to hunt up code, compile kernel modules, install TV software, configure stuff, etc. Not really any longer than under Windows, so that’s good.
But now that I have it running, oh, man, am I glad I made the switch. MythTV is pretty awesome. The coolest thing for me is MythWeb, the web-based management plugin. Since I don’t do the using-the-remote watching-from-across-the-room thing, I really (really!) don’t like UIs designed for that mode. MythWeb instead gives a nice, compact, fast, easy to use way to browse listings, set up recordings, and get on with my life. Later I’ll just play my MPEGs out of a Samba share with VLC, totally avoiding the wacky UI stuff.
Permalink
05.15.08
Posted in General at 10:13 am by Steven
Mixing metaphors can be a great source of humor, intentionally or not so. I don’t know which category this one fits in, but it’s great. (I haven’t actually read the article, I just happened to stumble upon this little quote and hadda point out how much I love it.)
There are few bold “aha” ideas, lot’s of social “-this or -that”, and mostly a bunch of companies hoping to draft on the perceived success of a few gorillas.
(from Incrementalism and “The New New Thing”)
Permalink
05.14.08
Posted in General at 4:16 pm by Steven
Maybe I’ll make a thrilling serial out of my suspend experiences. “S3: Miami: Drivers and BIOS Division: Data Loss Prevention Unit”, maybe.
The first episode would be where I used suspend and had a mixed bag of results. Things seem to stop and start alright, but I have this fan problem… In Windows, the fan would often come on full blast and stay on after resuming, and I had a little workaround ritual where I’d select a different “power profile” from this applet that Toshiba pre-installed, then switch back, and it would go back to normal. I have similar symptoms under Ubuntu, but no workaround ritual developed yet. In the process of looking at that, I see that the fan doesn’t always kick in when the machine is running hard, which worries me a little that the thermal management is out of whack.
I’m also getting this notification when I resume that my machine could not suspend. Which is surprising, when coming out of resume, because I was under the impression that ‘to resume’ is something an entity can do only when it had, indeed, suspended. Hopefully that’s just spurious, rather than indicating some hidden problem.
So, yeah, I’m gonna need a scriptwriter to punch this up a little. Car wrecks, babies giggling, lottery winners who lose their husbands to their step-daughters, that kind of thing.
Permalink
05.11.08
Posted in General at 5:10 pm by Steven
Speaking of suspend, it’s cool that it looks like Ubuntu supports it well in Hardy Heron (8.04). I’m not giving the credit all to Ubuntu; I’m sure lots of people contributed to that, since it’s certainly a huge endeavor to get the whole chain, from the kernel-BIOS interface up through the kernel and drivers up through the desktop environment up through applications, to live in a suspendable world.
I haven’t actually used it beyond a couple tests so far, because my lid latch problem happened before my switch away from Windows, but those tests went well. I’ll report on my further experiences later.
Permalink
Posted in General at 4:58 pm by Steven
The summary: after breaking a lid latch on my Toshiba Satellite A105-S4134 laptop, I was unable to reliably use the ’suspend’ function. I repaired this with a fairly simple procedure. I took the long way around to get to that procedure; you don’t have to.
The whole back story: I had a quick and unexpected contact with Earth while exiting a car on an icy day, and while carrying my precious baby Toshiba in my backpack. She lost a right lid latch that day…
I can live with the fact that the lid is not quite as secure as before (there’s still the left lid latch), but I find it harder to live with the fact that now, when she’s in my backpack in suspend mode, she’ll spontaneously power on, in the hot and suffocating confines (when one is powered on) of the backpack laptop pocket. That could lead to at least battery drainage and at most CPU meltdown, neither of which I want.
There’s no option in the BIOS to turn off the switch action (and OS settings didn’t help either, which didn’t surprise me). Toshiba/Intel, please put this option in your BIOS settings in future models.
So, I had to say goodbye to suspend, which is paaainful to me, because I hate waiting for bootups and app startups and all that garbage several times a day. I wanted my suspend back.
The daring resolution: I decided today to go ahead and disassemble the machine and see if I could somehow disable the switch. I used the handy little Toshiba disassembly guide (and made a donation). Note: DO NOT DISASSEMBLE YOUR MACHINE LIKE THIS. It was somewhat risky and quite unnecessary for me to do this, so I don’t recommend making that mistake if all you want to do is disable your lid switch.
However, in the process of doing this, I did discover the fix to the problem. I noticed at one point that a couple of screws were sticking to the upper-right corner of the screen bezel. Odd. They were stuck there magnetically. I checked whether they’d stick to the other side; they wouldn’t. Hmmm, I thought, this is interesting, because my earlier tests had indicated that the right side of the lid was the important side in triggering the lid switch. Is it magnetic? I put things back together enough to be able to boot and test the theory, and used a magnetic toy to reveal that yes, the lid switch is magnetic.
So that means all I have to do is find and remove the magnet, eh? Wish I hadn’t disassembled the whole machine… I reassembled everything and switched to this guide. I went as far as Step 4ish. I opened the screen mask far enough to get to the top-right corner, and found a magnet with some tape over it, which was a good sign. I removed the tape and pried out the magnet (which was also glued from the underside) easily. Put everything back together and tested, and…
Woohoo, I can suspend my laptop again.
Permalink
05.10.08
Posted in General at 10:42 pm by Steven
I bet you could run Cygwin under Wine to get a Linux-like environment in Linux.
Permalink
Posted in General at 7:36 pm by Steven
Have you ever had to try to replace a hard drive in a machine with a dead built-in DVD drive and an old BIOS (i.e. one that doesn’t really boot off USB devices)? It can be a frustrating endeavor.
My favored way to replace a hard drive (and yeah, I know there are other ways, but this is really the best one) is to boot the machine off a Linux LiveCD and use some sort of cloning program to clone the drive to the new one in a USB enclosure, then swap ‘em. Clonezilla served me well when I replaced the hard drive in my laptop recently, so I wanted to do that with my girlfriend’s, too. But the internal DVD drive is dead, it wouldn’t boot off the external one, it wouldn’t boot off a USB Flash drive with the Clonezilla USB option, and any hope that a BIOS upgrade would fix the problem was dashed by the fact that the BIOS update program had to be run off a floppy (which the machine never had) or a CD, which clearly leaves me with the same problem again.
But, the BIOS does have a network boot option, which only became relevant to me when I felt I was running out of options. Setting up a server for network boot from scratch sounded kinda painful, but I remembered that Knoppix has this fairly cool feature they call ‘terminal server’ that might do the trick. Sure enough, I booted Knoppix on my laptop, ran their terminal server, connected it to this laptop with an Ethernet cable (luckily, though the Ethernet port is a little out of wack on this laptop, it’s still functional), selected network boot, and rather quickly, I was in a full-featured Linux environment without touching the to-be-cloned hard drive.
I used ntfsclone, which I knew to be the core of what Clonezilla uses when moving an NTFS partition, to move the single XP partition to the new drive, then ntfsresize to fill the drive (the new drive is twice the size of the old). The only snag I ran into with that was that Windows had previously diagnosed the drive to have bad sectors (the primary reason for replacing the drive in the first place), and ntfsclone doesn’t want to proceed with more than 5 bad sectors. But luckily that’s just a matter of adding a ‘–rescue’ commandline option. ‘course, it clones the bad sector map, which then causes ntfsresize to barf, but it has a ‘-b’ option. I see now that there’s some verbiage on the ntfsclone page that talks about bad sectors… whatever, it’s fine now, so I don’t feel the need to understand now NTFS deals with BS.
It’s cool that the Linux-NTFS tools have gotten to maturity these days; a few years ago when I was replacing drives, I had to do much more annoying things to clone NTFS. (I’m not sure if the software I mentioned in a previous post was based on Linux-NTFS or if they had some proprietary system (Apricorn’s software _was_ Linux-based, though.)).
Permalink
05.08.08
Posted in General at 12:05 pm by Steven
Hmmm… I think I pretty much have to agree with Donald Knuth on this one: multicore processors are basically not that great of an idea for general-purpose computing.
Problem is, this looks like one of those wrong turns that will lead us quite far afield before we get back to the highway. There’s a market dynamic that causes otherwise intelligent decision makers to choose poorly: “You have 4 cores (which is a bad idea)? Well, then I’ll have 12 (which is a three-times-bigger idea)!”. (Yeah, I know that particular chip was mentioned as targeting servers, for which a much better argument can be made for multicore, but they’ll inevitably drive those into desktops, etc. because people don’t want to have to use different architectures for different machines).
The one thing that could save us from going too far astray is mobile computing. Multicore has infected that world, too, but it isn’t as likely to take hold there. The need to keep power consumption under control will probably steer processor architects in more innovative directions.
Permalink
05.01.08
Posted in General at 12:04 pm by Steven
When I made the switch on my main desktop machine from Windows to Linux (I mean, a Linux kernel-based operating environment solution incorporating elements from FSF projects as well as thousands of other contributors, including but not limited to: Apache Software Foundation, Sun Microsystems Incorporated, the GNOME Foundation… ah, I mean, Linux), I lost my sound. I got it back by finding the main ‘kernel’ line in my /boot/grub/menu.lst and adding the following kernel parameters to the end of that line:
noisapnp pnpbios=off pnpacpi=off
So the whole line now looks like this:
kernel /boot/vmlinuz-2.6.24-16-generic root=UUID=... ro quiet splash noisapnp pnpbios=off pnpacpi=off
(Don’t copy that line exactly, though, if you’re going to try this solution. Just add those extra arguments to the end. I removed my disk UUID from the line because it’s specific to my computer and wouldn’t work for anyone else.)
In more detail: I’m running the newly-published Ubuntu 8.04 ‘Hardy Heron’ distribution, which is currently using Linux kernel 2.6.24 as a base. This version of the kernel doesn’t work well with some BIOSes that report probably-incorrect information about some motherboard resources (some kernel-list discussion in which Torvalds’ primary argument is ‘x is crap’, a PnP-quirks patch, and there are about a million pages about people having this problem if you look hard enough).
The eventual diagnosis centered around this in the kernel output (using the dmesg command to view it):
PCI: Unable to reserve mem region #1:4000@febf8000 for device 0000:00:1b.0
ACPI: PCI interrupt for device 0000:00:1b.0 disabled
HDA Intel: probe of 0000:00:1b.0 failed with error -16
This region couldn’t be reserved because it was already reserved, as a message like this shows (I’m copying this from someone else’s description of the problem, but the idea’s the same):
system 00:08: iomem range 0xfebfa000-0xfebfac00 has been reserved
I also used the contents of /proc/iomem to shore up the diagnosis. Here’s the indicative bits:
febf8000-febfbfff : 0000:00:1b.0
febfa000-febfac00 : pnp 00:07
febfe000-febfec00 : pnp 00:07
The part that snd_intel_hda wants overlaps with what pnp has already claimed. It ought to look like
febf8000-febfbfff : 0000:00:1b.0
febf8000-febfbfff : ICH HD audio
This overlap problem was happening on my ASUS P5B-Plus board, with two different BIOS versions (1002 and either 0903 or 1001). This board uses an Intel 82801H (ICH8 Family) HD Audio controller sound solution.
Rather than patching and building the kernel myself or trying to find some .debs out there with a newer version (the patch is included in 2.6.25), either of which is more work than I’d like to do for this problem, I just turned off all PnP. The last time I cared about PnP (a hacky system devised to make PC configuration easier back in the days of the ISA bus, and if you don’t know what an ISA bus is, you can probably just nod and forget it) was more than 5 years ago, so this is no loss for me.
Permalink