Xubuntu Startup Delay vs. xsetwacom

Over the years, various xsetwacom incantations have confined the tablet stylus to the left-hand landscape monitor on my desk. Updating to Xubuntu 18.04 once again changed the monitors names (from HEAD-0 back to DP-1), but xsetwacom stopped working.

My script runs from Xubuntu’s “Application Autostart” list, so X is already running and xsetwacom should do the right thing. Alas, even with $XAUTHORITY and $DISPLAY set correctly (automagically by X), xsetwacom still didn’t corral the cursor.

Some rummaging around the Intertubes suggested a delay would allow X to get up to speed and, indeed, sleeping for two seconds solved the problem:

logger " - copying Xauthority values"
whoami > /tmp/who
cp /home/ed/.Xauthority /tmp/Xauthority.txt
cp $XAUTHORITY /tmp/xauth.cp
echo $DISPLAY > /tmp/DISPLAY.txt
# xsetwacom needs an additional delay after $XAUTHORITY and $DISPLAY become correct
logger " - waiting aimlessly"
sleep 2s
logger " - doing wacom setup"
xsetwacom --verbose set "Wacom Graphire3 6x8 Pen stylus" MapToOutput "DP-1"
xsetwacom --verbose set "Wacom Graphire3 6x8 Pen eraser" MapToOutput "DP-1"

Sheesh & similar remarks.

The complete Bash script as a GitHub Gist:

The cruft in there reminds me of previous fixes / workarounds / haxx, so it’s not entirely wasted space.


Leave a comment

Kindle Fire Picture Frame: Side Block

A steel frame that Came With The House™ emerged from a hidden corner and, instants before tossing it in the recycle heap, I realized it had excellent upcycling potential:

Kindle Fire Picture Frame - Test Run

Kindle Fire Picture Frame – Test Run

Stipulated: I need better pictures for not-so-techie audiences.

Anyhow, my long-disused Kindle Fire fits perfectly into the welded-on clips, with just enough room for a right-angle USB cable, and Photo Frame Slideshow Premium does exactly what’s necessary to show pictures from internal storage with no network connection.

All I needed was a small block holding the Kindle against the far side of the frame:

Kindle Frame - side blocks

Kindle Frame – side blocks

A strip of double-stick carpet tape holds the block onto the frame. To extract the Kindle, should the need arise, slide it upward to clear the bottom clips, rotate it rearward, and out it comes.

Getting a good block required three tries, because the basement has cooled off enough to trigger Marlin’s Thermal Runaway protection for the M2’s platform heater. A test fit after the first failure showed the long leg was 1 mm too wide and, after the second failure, I reduced the fan threshold to 15 s and the minimum layer time to 5 s, producing the third block without incident.

The platform heater runs at 40 V and I considered bumping it to 43 V for a 15% power boost, but it has no trouble keeping up when the fan isn’t blowing chilly basement air across its surface.

The OpenSCAD source code, such as it is, doesn’t deserve its own GitHub Gist:

// Block to hold Kindle in a picture frame mount
// Ed Nisley - KE4ZNU
// November 2018

Protrusion = 0.1;

difference() {

    cube([18-4 + Protrusion,44-10 + Protrusion,10 + 2*Protrusion]);


, ,


Lenovo Headset Volume Control Lube

The volume control wart pod on the cable of my old and longsuffering Lenovo headset had been dropping out the right channel for a while, eventually prompting me to discover it comes apart by simply pulling on the halves:

Lenovo Headset - control pod

Lenovo Headset – control pod

There being no way to get closer to the open-frame volume pot’s innards, I eased a drop of DeoxIT Red along its edge (upper in the photo), slipped another drop into what’s presumably the wiper opening in the knob, and ran it through enough cycles to spread the juice evenly.

Reassemble in reverse order and It Just Works™ again.


1 Comment

Small Stone Moving By Itself

A decorative snail emerged from within a large garden lettuce:

Snail - looking left

Snail – looking left

It seemed interested in its new surroundings:

Snail - looking right

Snail – looking right

And eventually set off on an adventure:

Snail - escaping

Snail – escaping

We returned it to the Great Outdoors, far from the garden goodies, and wished it well.

Sometimes, having eyes mounted on stalks would be advantageous, but I’m unwilling to give up opposable thumbs to get ’em.



Squidwrench Electronics Workshop: Session 6 Whiteboards

Coverage of capacitors as charge-storage devices, rather than filters:

Session 6 - Whiteboard 1 - overview

Session 6 – Whiteboard 1 – overview

We avoided all the calculus and derivations, taking the exponential waveform as a given for RC circuits:

Session 6 - Whiteboard 1 - exponential detail

Session 6 – Whiteboard 1 – exponential detail

Discussions of dielectrics, plate spacing / area, and suchlike:

Session 6 - Whiteboard 1 - dielectric permittivity

Session 6 – Whiteboard 1 – dielectric permittivity

Some handwaving discussion of construction, electrolytic capacitor innards, and The Plague:

Session 6 - Whiteboard 1 - cap construction

Session 6 – Whiteboard 1 – cap construction

A 1 F cap charged through a 1.8 kΩ resistor during most of the session to show what an 1800 s time constant looked like. Nope, it never quite got to the 3.5 V from the power supply, even when we all decided it was time to shut down!


Monthly Image: AMP Plug Board

Around 1960, somebody my father knew at the Harrisburg AMP factory gave me a chunk of plugboard bandsawed from a scrapped computer or industrial controller, because he knew I’d enjoy it:

AMP Plug Board

AMP Plug Board

He was right.

I spent months rearranging those little cubes (some with cryptic legends!) into meaningful (to me) patterns, plugging cables between vital spots, and imagining how the whole thing worked:

AMP Plug Board - detail

AMP Plug Board – detail

Long springs ran through the notches under the top of the blocks to connect the plug shells to circuit ground. The ends of the steel rails (still!) have raw bandsaw cuts, some of the blocks were sliced in two, the tip contact array behind the panel wasn’t included, and none of that mattered in the least.

Only a fraction of the original treasure trove survives. It was absolutely my favorite “toy” ever.

Quite some years ago, our Larval Engineer assembled the pattern you see; the hardware still had some attraction.

I’ve asked Mary to toss it in the hole with whatever’s left of me, when that day arrives …


HP 6201B Power Supply Meter Switch Rehabilitation

The meter range switch on Squidwrench’s HP 6201B bench power supply became erratic enough to get me to tear it apart:

HP 6201B Power Supply - meter switch nut

HP 6201B Power Supply – meter switch nut

For future reference, apply a 9/16 inch deep socket after loosening two teeny setscrews in the knob.

The date codes suggest a mid-70s assembly, but the design dates back to the 60s with no plug-in anything:

HP 6201B Power Supply - meter switch in panel

HP 6201B Power Supply – meter switch in panel

Rather than unsolder eight switch leads, I wrangled it into a visible location:

HP 6201B Power Supply - meter switch rear

HP 6201B Power Supply – meter switch rear

The knob and shaft sit on a separate metal bracket held in the white plastic ring with a pair of expanded prongs. Squashing the prongs together released the bracket, so I could see both sides of the switch wafer:

HP 6201B Power Supply - meter switch front

HP 6201B Power Supply – meter switch front

Note the copious markings which would, in the event of an actual finger fumble, give me a better chance of reassembling the spilled guts. Turned out not to be necessary, but it’s good to be prepared!

The actual repair consisted of easing a drop of DeoxIT Red into each side, spinning the central switch wafer / contacts a few dozen times, then reassembling in reverse order. Re-bending the prongs turned out to be the most difficult part, eventually requiring the designated Prydriver, and ended well enough.

A quick test with a 100 Ω power resistor shows the supply was working fine and the switch produced the expected results without glitches or twitches:

HP 6201B Power Supply - test load

HP 6201B Power Supply – test load

You just can’t beat the performance of old lab equipment!