The Smell of Molten Projects in the Morning

Ed Nisley's Blog: Shop notes, electronics, firmware, machinery, 3D printing, laser cuttery, and curiosities. Contents: 100% human thinking, 0% AI slop.

Category: PC Tweakage

Remembering which tweaks worked

  • Canon S630 Printer vs. bj8XXYYZ.upp Printer Driver

    For quite some time, the Canon S630 printer connected to the file server downstairs has been printing some documents in what looks like garbled reverse video: all of the text areas render as white characters on a black background, with peculiar graphic gibberish filling the space to the right margin. I’d provide a picture, but it wouldn’t be too informative; suffice it to say that if I wasn’t using bulk ink the pages would cost about a buck each.

    Printing documents with two-up pages (two document pages on one paper sheet) generally resulted in the first sheet coming out garbled with the remainder emerging unscathed, but sometimes I found an entire stack of black paper. Ouch!

    This usually affected documents printed from Web pages, but sometimes clobbered pure PDF documents. Given that Linux printing involves multiple transformations between Postscript / Ghostscript / PDF / PNG / what-have-you, it’s impossible to pin down a common cause.

    Searching for the obvious keywords showed other folks had similar problems with different printers and different drivers. None of the threads had any resolution.

    Printing the same document on the Epson R380 worked perfectly.

    One recent morning I had four out of six documents fail, so I tried some of this and a little of that, before it occurred to me that I should switch the driver. I had chosen the default recommended printer driver during installation: the oddly named bj8xxyyz.upp file produced by the Ghostscript folks. Switching to the Gutenprint 5.2.7 driver seems to have solved the problem; all four failing documents printed perfectly and the problem hasn’t returned in a week of printing.

    The R380 was already using the Gutenprint driver, which (in retrospect) should have been a big, fat hint.

    I’d file a bug report, but to which project about what? [sigh]

  • Xubuntu 12.04: Some Steps Forward, Some Steps Back

    The continuing saga of trying to run a Linux desktop with two monitors (one rotated in portrait mode), separate X sessions, two trackballs, and a Wacom graphics tablet continue with Xubuntu 12.04. KDE continues to not work quite right with dual monitors, Gnome seems to be dead in the water, Unity wants to be a touch-screen UI when it grows up, and Linux Mint introduces yet another not-quite-baked UI. The breathtaking churn in Linux infrastructure continues, rendering everything I’d figured out with respect to FDI / HAL / udev configuration lagely irrelevant.

    For lack of a better alternative, I’ve installed Xubuntu, which is now a deprecated (available, but unsupported) version of Ubuntu. Configuring separate X sessions on two monitors requires the proprietary nVidia driver. The XFCE display configurator falls over dead when confronted with two screens and the xrandr extension seems unworkable. Fortunately, I’d left a bit of commented-out cruft in the xorg.conf file that worked in Xubuntu 10.10 and could copy the whole file over with only one change:

    Section "Screen"
        Identifier     "Portrait"
        Device         "GF9400_1"
        Monitor        "Dell2005FP"
        DefaultDepth    24
        Option         "TwinView" "0"
        Option         "metamodes" "DFP-1: 1680x1050 +0+0"
        Option         "NoLogo" "Off"
    #    Option         "RandRRotation" "On"
        Option         "Rotate" "CCW"
        SubSection     "Display"
            Depth       24
        EndSubSection
    EndSection
    

    Configuring two trackballs with the XFCE utility remains surprisingly easy: the Kensington is left-handed and the Logitech is right-handed.

    Swapping buttons 2 and 3 on the Wacom stylus poses a bit more of a challenge. Doing it on a per-session basis seems straightforward:

    xsetwacom set "Wacom Graphire3 6x8 stylus" button 2 3
    xsetwacom set "Wacom Graphire3 6x8 stylus" button 3 2
    

    You’d put those into a script and tell XFCE to auto-run it when you sign in, but that doesn’t handle hotplugging. I don’t hotplug the tablet, but random static glitches knock the USB hub into a tailspin and cause the same effect, so I jammed the lines that used to be in xorg.conf into /usr/share/X11/xorg.conf.d/50-wacom.conf:

    Section "InputClass"
            Identifier "Wacom class"
            MatchProduct "Wacom|WACOM|Hanwang|PTK-540WL|ISD-V4"
            MatchDevicePath "/dev/input/event*"
            Driver "wacom"
            Option "Button2" "3"
            Option "Button3" "2"
    EndSection
    

    I’m certain there’s a different location for those that fits in with whatever the overall design might be these days, but I’m kinda tired of figuring this stuff out.

    The Wacom drivers in Ubuntu 12.04 no longer permit restricting the tablet’s range to a single X session (xsetwacom set ... MapToOutput "HEAD-0" assumes you’re using xinerama with a single X session across two monitors), which sprawls the tablet’s limited resolution across both screens and leaves a big unusable rectangle in the lower third of the left side. This is not progress in a positive direction, but there’s no workaround.

    That workaround for the upstart Pachinko machine also applies to this box. The minute-long pause while NFS hauls itself to its feet isn’t attractive: you see VT 1 with the bare white-on-black command-line login prompt, but if you actually log in, things get very ugly, very quickly.

    Restoring the usual verbose Unix-oid startup messages requires tweaking /etc/default/grub to set noquiet nosplash, then running update-grub.

    Search the blog with the obvious keywords to get my earlier posts on all these topics…

  • ThinkPad 560Z BIOS Battery Replacement

    Quite some time ago I picked up a trio of IBM Thinkpad 560Z laptops from the usual eBay suppliers as part of a DDJ column project. One turned into a digital picture frame, our Larval Engineer has another (because it was maxed out with 128 MB of RAM), and I just fired up the third (96 MB!) to discover whether it could serve as a text-only terminal without too much trouble.

    Alas, the BIOS battery was dead. I’d replaced the dead OEM cell some years back with a (surplus) lithium cell that’s a bit too small, so it only lasted a few years rather than a decade, but the cells were on the shelf. Soooo, I put in another one, just like the other one:

    Thinkpad 560Z BIOS battery
    Thinkpad 560Z BIOS battery

    After nudging the date & time into the current millennium, it then failed to boot Ubuntu 8.04: evidently the mighty 4 GB CompactFlash drive (jammed into a CF-to-IDE adapter) has bit rot.

    It’s a prime candidate for the text-only version of Tiny Core Linux, except that a 560Z can’t boot from either USB or CD-ROM, which means getting the files on the “hard drive” requires extraordinary fiddling. Drat!

    FWIW, when this battery fails, I think the (empty) main battery compartment has room for a CR123A cell that should outlast the rest of the hardware. I could blow two bucks on a replacement from eBay, but what fun is that?

  • Could This Be A Hacked Router?

    Found this interesting SSID on a drive up Albany way:

    Hacked router SSID
    Hacked router SSID

    I wonder how long it’s been like that? If the router’s owner doesn’t use WiFi, then it could last forever.

    Rule of Thumb: Disabling admin access from the router’s WiFi port is just good practice…

  • Sherline CNC Mill Y Axis Home Switch: To The Front!

    Reassembling the mill provided an opportunity to move the Y axis Home switch from the rear of the axis to the front. The key discovery happened during the teardown: I can get the saddle off the Y axis dovetail by removing the gib, without sliding it off the front, which means a front switch can remain firmly glued in place.

    A few random hunks of steel and a wire nut held the switch in position while the epoxy cured:

    Mounting Y axis home switch
    Mounting Y axis home switch

    The switch actuator bottoms out with the saddle just touching the preload nut, so the saddle can’t dislodge the switch: the switch trips just before the saddle hits the nut, at which point all motion stops and the motor stalls.

    Moving the switch means I can remove all the gimcrackery that poked the rear switch with the tooling plate in place; I was never happy with that setup. I also removed the small block that trapped the rear end of the Y leadscrew, under the assumption that, as I haven’t yet dropped anything on the leadscrew, I probably won’t. That adds about 1/4 inch to the maximum travel and allows the tooling plate to whack into the column.

    The switch wire runs along the stepper cable, a tidy technique that hasn’t introduced any glitches into the shared Home signal from the X axis drivers:

    Sherline mill - X and Y axis home switches
    Sherline mill – X and Y axis home switches

    The Y axis now seeks the Home switch in the positive Y direction, so that stanza in Sherline.ini looks like this:

    [AXIS_1]
    TYPE = LINEAR
    MAX_VELOCITY = 0.400
    MAX_ACCELERATION = 5.0
    STEPGEN_MAXACCEL = 10.0
    SCALE = 16000.0
    FERROR = 0.05
    MIN_FERROR = 0.01
    MIN_LIMIT = -0.5
    MAX_LIMIT = 4.90
    BACKLASH = 0.003
    HOME_IS_SHARED = 1
    HOME_SEQUENCE = 2
    HOME_SEARCH_VEL = 0.3
    HOME_LATCH_VEL = 0.016
    HOME_FINAL_VEL = -0.4
    HOME_OFFSET = 5.125
    HOME = 5.0
    
  • Mis-wiring a CAT5 Connector

    Mis-wired CAT5 connector
    Mis-wired CAT5 connector

    What’s wrong with this picture?

    Yeah, the blue-stripe and green-stripe wires should be interchanged. Turns out the Link indicators on both ends lit up just fine, but no bits made it across the wire. Took quite a while to figure that one out, alas.

    Turns out I was moving that router upstairs to get a better signal for folks out in the driveway and snaking the cable through the only suitable (i.e., existing) hole in the floor required cutting the molded-in-place connector off, then crimping a new one on. Both you and I know those wires must cross, but in the excitement of pushing all those wires into the connector, well … so it goes.

    A useful explanation, including crossover and POE cable arrangements, lives there.

    I did wrap silicone tape around the cable and connector butt for strain relief.

    Memo to Self: just verifying the colors on the existing cable sometimes isn’t good enough!

  • NIC Backpanel Shortening

    Actually, that NIC didn’t slip right into place, because its backpanel plate was sized for a full-height PC case. Unlike the cheap stamped steel you find these days, NetGear used much thicker metal that required an attack with the bandsaw, a hammer, and some files to clean up the raw edges.

    But it fit pretty well after all that:

    Shortened NIC backplate
    Shortened NIC backplate

    You can just barely see the NetGear logo wrapped around the right-angle bend…