Fruddled Gruntbugglies

Enthralling readers since 2005

Author: lpaulriddle

  • Hump Day Ramblings

    I accidentally shut down my X server yesterday before I left work, so I took the opportunity to install the custom nVidia driver on my X desktop. And I must say, the proprietary driver is much nicer than the nv driver that comes with X.org. Someone at nVidia has put a lot of work into making these cards work well with Linux. The installer script produced a working config file that started right up, with acceleration enabled to boot.

    The nVidia driver has a built-in option called “TwinView” which provides multihead support via the VGA and DVI ports on the card. It replaces Xinerama, although supposedly Xinerama can still be used to provide the same functionality. However, TwinView seems to be the better alternative because it provides acceleration on both displays. It also adds Xinerama-compatible “hints” to the X server so that window managers will work the same as with Xinerama. It’s really very well done. So now I have a full 24-bit display across both monitors, with acceleration. Right now I’m still using the widescreen as my “main” display and the standard display as my “secondary” screen. I’m going to try it like this for awhile, and if I don’t like it I’ll switch them.

    The only configuration challenge was getting both displays working at their respective resolutions. I accomplished this with the following Device section:

    Section "Device"
    Identifier "nVidia"
    Driver     "nvidia"
    BusID      "PCI:1:0:0"
    Option     "TwinView"
    Option     "MetaModes" "CRT-0: 1680x1050, DFP-0: 1280x1024"
    Option     "TwinViewOrientation" "RightOf"
    EndSection

    The MetaModes line is the important one.

    [More:]

    While testing things out, I also learned something about VNC: It compresses the pixel depth over slow connections. To force full-color rendering, I need to do

    vncviewer -FullColor host.name:display

    I was initially scratching my head as to why it was still rendering limited colors despite the 24-bit display. That explains it, and I may want to keep full color rendering disabled to maximize performance over my slow DSL uplink.

    Also, this morning I hooked a scavenged SCSI disk up to my PC at home, mainly as a proof-of-concept: The disk uses 68-pin wide SCSI, and my controller uses 50-pin narrow SCSI. However, all I needed to make it work was a 50-to-68-pin adapter cable. I just jumpered the drive to SCSI ID 1 and plugged it in. Initially I had an external terminator on the drive case, and that hosed things. When I removed the terminator, it worked. Apparently my controller wants to terminate the bus itself. At any rate, now I have a spare 72-gig drive with its own case and power supply.

    And finally, what’s a summer blog entry without a mention of the pool? Last week, the backup valve on my Polaris 380 broke. The valve mechanism itself is a big mess of gears and turbines, which fits into a plastic enclosure. The enclosure is made up of two halves held together by a screw-on collar ring, with a couple of o-rings to prevent leaks. The screw-on collar piece is what actually broke, probably after the valve was dropped onto the concrete pool deck one too many times. The mechanism itself was undamaged. Fortunately, Polaris sells a replacement case kit separately, and it’s much less expensive than an entire valve. The annoying thing is, the case kit only includes one of the two necessary o-rings. The included o-ring seals the two case halves together. The other one seals the backup jet to the case. It’s “technically” not part of the case, but if I’ve got the valve disassembled anyhow, I might as well replace both o-rings as they’re both probably worn out. It’s a small o-ring (1/2″ O.D. x 3/8″ I.D.) and it would have been nice if Polaris had seen fit to throw one in with the case kit. Oh well. For future reference, I found a replacement o-ring at Home Depot, in the plumbing section where they have the faucet repair kits.

    Well, I guess I should get to work now.

  • Bike-to-work milestone

    Today I biked in for the 22nd time this year, which matches my total for last year (and this time last year, I hadn’t even started riding in yet). I haven’t been riding with quite the frequency that I did last year. Most of last year’s rides were concentrated in August and September, and this year’s have been spread out over April, May, June, and July. However, most of my missed rides have been for legitimate reasons (illness, travel, family issues, rain, extreme heat, appointments/errands, days off to work on projects, etc), as opposed to laziness. I hope to pick up the pace as we enter the second half of the riding season. My goal for the year is 40 rides, which I don’t think is unreasonable.

  • Success with Dell widescreen monitor and X.Org

    What a difference a video card makes…

    A couple months back I tried getting a Dell 2007WFP working with X, using the Intel graphics controller built into my motherboard. I didn’t have much luck. Well, now I have a new video card, with an nVidia GeForce MX 4400 chipset. And, all I had to do was specify the card, driver and resolution (1680×1050) in my xorg.conf, and it worked right away. Great. Still more work than it was with my Mac (where I just plugged it in and it worked), but not bad at all, especially considering that this is X.

    Still a few things to be resolved:

    1. The new card is only working through the VGA port. Need to figure out what magic incantations I need to use DVI.
    2. Apparently I can’t use the onboard graphics controller and the new (AGP) card at the same time. As soon as I plugged the new card in, it was like the onboard controller didn’t exist. So, I’m still stuck using the old Matrox PCI card for my other monitor. The Matrox only has 8mb video memory, which limits me to a 16 bit display depth. The MX 4400 apparently supports multiheading via the DVI port and VGA port, so I’ll have to see if I can do this with X.
    3. The widescreen monitor is vertically smaller than my other standard-resolution flat panels. I’m getting a little squinty-eyed staring at it. I think I may make it the “secondary” display and use a physically larger screen as my “primary” display.

    But all in all, I’m really happy to have the 1680×1050 working, and without much extra fiddling or hair-pulling.

    On another note, I’ve restored sonata to a new drive (after its old drive crashed). I lost a few files before I backed the dying drive up. The system works fine, but fonts in some applications are screwy (screwy fonts in X is a relative term, of course…). So, I may end up reinstalling the machine anyhow…

    Followup… looks like I may need to use nVidia’s driver (instead of the built-in nv driver) to get multihead support. I’ll try that out later this week.

  • Load center upgrades

    Continuing in my grand tradition, I’m writing about yet another house project that I’d like to do… the problem, as always, is finding the time for it..

    We have two circuit breaker panels which really should be replaced. They are FPE panels with known safety issues. One panel is our main house panel, and the other is a subpanel. The FPE subpanel is fed by a third subpanel, a Square-D QO type.

    The Square-D subpanel has 20 slots, of which only 9 are currently in use. Because we’ve abandoned a few circuits in the FPE subpanel that it feeds, I could actually squeeze all the circuits into the Square-D if I wanted. However, if I did that, the panel would be full with no room for future expansion. So.. it would probably make sense to replace both subpanels with a single 24-slot Square-D QO type.

    I would need a panel, a cover, and a ground bar kit, as well as a bunch of breakers. It looks like the project would cost around $500. Probably worth it for the safety and peace of mind — maybe I should slate it for this winter.

    The main house panel is a bigger project. I would need to involve BG&E to get them to shut off my power at the meter, and to tell me what kind of service I have — the panel is 150 amps, but it appears that the service may be 200 amps. In this case, I’d get a 200amp, 40-slot panel. This project would probably run closer to $1000. If I can get the subpanel project under my belt this winter, maybe I could tackle the main panel next winter. Again, the main issue is finding time and prioritizing it amongst all the other stuff that has to get done around here.

  • Troubleshooting cloudy pool water

    For the past several years of pool ownership, I’ve always had off-and-on problems with cloudy water. I’m generally pretty good at keeping up with the water chemistry, so I’ve always been a bit curious as to why the water clouds up so regularly. The pattern is the same every year: it starts out crystal clear, then after a month or so, the water slowly starts getting hazy.

    The only way to get to the bottom of this is to apply the scientific method: assume that the problem is caused by x, try a known solution for x, and see if it works. I’ve worked at this over the past few seasons, and I’ve come up with three potential causes.

    [More:]

    Problem: Yellow algae
    Cause: Lack of superchlorination

    Yellow (or brown) algae presents as a fine “dirt-like” substance that accumulates on surfaces. When brushed, it dissipates easily and clouds up the water. It re-settles when the pump is off. I had big problems with yellow algae last year and the year before. At the time, I was superchlorinating very infrequently (only one or two times a season). This year, I have been superchlorinating weekly and also using a polyquat type algaecide semi-regularly, and I have not had an algae problem (yet). If this is the ticket to keeping it at bay, then I need to figure out the ideal frequency of superchlorination that will prevent algae blooms without wasting too much chlorine.

    Problem: High pH
    Cause: Prolonged use of hypochlorite sanitizers without adding acid to compensate

    High pH and/or Alkalinity can cause cloudy water. Once this year I let the pH drift to almost 8, and the water was noticeably turbid. Adding acid cleared it up after 12 hours or so. I’ve found that supplementing the hypochlorite with a trichlor floater (in moderation, to avoid high levels of cyanuric acid) can help to keep the pH down, particularly during the hot months when the chlorine demand is high.

    Problem: Inadequate filtration
    Cause: Undersized pump and/or not running pump long enough

    I’ll freely admit to running the pump as infrequently as I can get away with it, to try to save electricity. Unfortunately it appears that I’m paying the price for this in the form of cloudy water. Currently, the pump runs around 9 hours a day (6 hours in daylight and 3 hours after dark). With turbid water, a pH of 7.4 and no visible algae, I ran the pump for 24 hours straight and there was a marked improvement in clarity. So it appears that I need more circulation. This seems odd to me, because 9 hours really should be enough to fully turn the water over and keep it from clouding up. So I’m curious if my pump and/or filtration system is undersized. When I get around to it, I’ll measure my flow rate and see what kind of numbers I’m getting. If they’re low, I may want to consider a larger pump and/or filter. Until then, I guess I’m stuck running the pump longer if I want clear water.

  • Crash.

    Well, the hard drive in sonata, my desktop machine at work, is dying a slow death. I saw the writing on the wall a few months ago, and now it’s finally biting the big one. I’m typing on the box now, but it’s slowly getting wonkier and wonkier as it churns out ever more i/o errors, read errors etc.

    A new drive is forthcoming, but in the meantime, I’ve managed to back up what’s left of the old drive, so I can restore it onto the new one. And, I’ve found that when it comes to archiving drives with errors, cpio beats tar hands down. I started out doing

    cd /filesystem
    tar cvplf - . |
    ssh other-box "cd /backup/disk; tar xpf -"

    But, it dies as soon as it hits a bad spot.

    I ended up doing

    cd /filesystem
    find . -xdev -depth -print |
    cpio -o --verbose -H newc |
    ssh other-box "cd /backup/disk; cpio -id -H newc"

    The -H option is needed to back up files with inode numbers greater than 65535.

    Cpio is even more obfuscated than tar WRT command line options, etc., but it seems to do a better job at disaster recovery.

    Fun fun…

  • FP using new concerto

    I’ve got my “new” P3-750 box booted up as concerto.ucs.umbc.edu. This post will hopefully confirm that b2evolution is working right. Things are looking pretty good. My calendar and photo album appear to be working. I set up my Oracle Calendar download stuff and it looks good. The RRBC mailing list is back up and running.

    The new box actually has slightly less RAM than the old one: 512M vs 576M. The old box will be going home to replace my old 300mhz P2 server, and I decided that I could use the extra RAM there more than here. So, the home machine gets 640M, and concerto gets 512M.

    Next, I need to do some memory, disk and video-card shuffling amongst the machines, so off I go to shut everything down…

  • sshdfilter config

    I’m beginning to think I need to set up a Wiki for this stuff.. but later.

    Trying to get the sshdfilter stuff up and running on my new Debian box, and of course I didn’t document the process when I did it on 3 previous machines awhile back, so here goes.

    1. Install sshdfilter script in /usr/local/sbin
    2. Edit /etc/init.d/ssh. Look for two lines that look something like

      start-stop-daemon --start [...] /usr/sbin/sshd -- $SSHD_OPTS

      Replace them with

      start-stop-daemon --start --quiet --exec /usr/local/sbin/sshdfilter -- $SSHD_OPTS &

      Don’t forget the trailing ampersand!

    3. Create an executable file /usr/local/etc/iptables.sh:


      #!/bin/sh
      modprobe ip_tables
      iptables -N SSHD
      iptables -A INPUT -p tcp -m tcp --dport 22 -j SSHD
      exit 0

    4. Modify /etc/network/interfaces. Under interface eth0, add the following line:

      pre-up /usr/local/etc/iptables.sh

    And that should do it.

  • Reinstalling ‘grub’ boot loader

    OK. Documenting this here for the next time I have to do this.

    I’m working on setting up a computer that dual-boots into Linux and XP.

    Rule 1: Always put Windows on the first primary partition on the drive. Linux can go pretty much anywhere else.

    Rule 2: Always install Windows first, then Linux, so the boot loader will get set up properly. I knew this, but chose to do things the other way around anyhow (yep, I’m stupid that way). And of course, the XP install hosed the Linux boot loader, so I had to manually restore it, which was a big pain.

    Here’s how I reinstalled the boot loader, for the next time I ignore my own advice…

    1. Boot into the Debian netinst CD, or Knoppix, or Tom’s Root Boot, or whatever flavor of standalone Linux you prefer.

      With netinst, you’ll need to walk through the install process until it gets to the disk partitioning part (this ensures that the disk devices are loaded). Then, hit ALT-F2 to get a shell.

    2. Create a mount point, say /disk, and mount your root filesystem there. Example: mount /dev/hda5 /disk
    3. chroot /disk
    4. Mount any additional filesystems you might need, like /boot, etc.
    5. grub-install /dev/hda

    That’s all I needed to do, but it took several unsuccessful attempts to arrive at this.

    References: here and here.

  • The hidden cost of bill payment services

    I signed up for a bill payment service yesterday. While I was reading through all the legalese in the “bill payment agreement,” it occurred to me that although the service is advertised as being free, it’s really not. There’s a very sneaky cost to it built in, which must be weighed when determining whether using the service is actually cheaper than sending stamped envelopes.

    Allow me to elaborate. When a financial institution offers bill payment service, there are several ways in which they can pay the payee. One of these is to actually mail a physical check. And here’s the clincher: most of these services will debit your account at the time they issue the check. The funds are transferred to a “holding” account owned by the financial institution, and the check itself is drawn against the holding account.

    Now, when you write and mail a paper check, it never clears right away, because it has to go through the mail, then the payee’s accounts receivable department, etc., before it actually posts and the funds are withdrawn from your account. During that time, the money sits in your account accumulating interest for you. But with a bill payment service, it sits in the financial institution’s holding account, earning interest for them. And that’s the hidden cost: the interest you lose when making these types of transactions. The actual cost varies with the amount of the transaction, the account’s current interest rate, and the length of time it takes the lender to cash the check.

    [More:]

    Of course, the best way to illustrate this is to use a concrete example. Imagine a hypothetical payment of $100 from an account that pays 4% interest compounded monthly, and assume the check-cashing delay is 7 days. Also assume that a stamp costs $0.39 and a paper check costs $0.10. Using the compound interest formula with the above numbers, we come up with $.08 in earned interest on the $100 over the 7 day period. That’s less than the $.49 it would cost to mail the check, so in this case, the bill payment service is the less expensive of the two methods. However, if the payment is $1000, the earned interest over 7 days comes to $0.77. In this case, mailing the check is cheaper. Similarly.. if the payment is $100 but the payee takes 60 days to cash the check instead of 7, the accrued interest comes to $0.66, making the mailed check a better deal in this case too.

    It seems that for most average transactions, the bill payment service comes out ahead. The ones to look out for are: large payments, and/or payees who take a long time to cash checks. For most people, the difference in cost is not going to be enough to be significant (I’m also not accounting for non-monetary factors, such as the convenience of the bill-pay service vs. physically writing and mailing a check). But, it’s still worthwhile to keep these things in mind as you’re trying to pinch pennies. A few pennies here and there will add up over time.

    8/24/2006: I paid my first bill through Schwab Bill Pay this week, and it appears that my initial assumption was wrong. They paid the bill via a mailed check, but the check went directly against my account, rather than going to a holding account. So, the funds weren’t withdrawn until the payee cashed the check several days later. That basically kills the entire premise of this entry, and makes the bill pay service the clear cost winner in all cases (assuming there’s no monthly fee, of course). Bill pay services have apparently come a long way in the 8 or 9 years since I first tried one out.