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.

Tag: Rants

And kvetching, too

  • Backyard Deer Herd

    One deer might be cute:

    Deer Herd - outlier
    Deer Herd – outlier

    But the rest of the herd makes up for it:

    Deer Herd - main
    Deer Herd – main

    You’ll note the complete lack of understory vegetation; the only remaining plants can withstand continuous deer browsing. Deer have clipped all of the evergreens five feet off the ground, even through they don’t normally eat evergreens…

    In fact, there’s no new tree growth in the Hudson Valley, because tree seedlings don’t stand a chance.

  • Samba Setup Woes

    As with all Windows boxes, the old Lenovo Q150 (dual booted with Win 7 Home Premium) became slow and cranky, despite not being used for anything other than monthly science and annual taxes. Various fixes and tweaks being unavailing, I swapped in an Optiplex 780 (dual booted with Win 7 Pro), replaced the IBM L191p monitor with the recapped Dell 2005FPW, reinstalled all the programs, and discovered that Samba was intermittent.

    For future reference…

    Win 7 Pro includes the Remote Desktop Protocol server that’s missing from Win 7 Home Premium. Oddly, RDP works better than UltraVNC, using Remmina as a client.

    The file server in the basement runs Xubuntu 14.04 with Samba 4.1.6 and works perfectly with smbclient, showing no glitches at all. Even when the Win 7 box doesn’t show the server shares at all, it’s rock solid to my desktop Xubuntu box.

    The familiar sudo service samba restart doesn’t actually do that any more, so get used to the two-step dance:

    sudo service nmbd restart
    sudo service smbd restart
    

    However, that sometimes seems to start a spurious third copy of smbd (there should be two, for unknown reasons), so it’s better to use a four-step dance:

    sudo service nmbd stop
    sudo service nmbd start
    sudo service smbd stop
    sudo service smbd start
    

    The old SysV init system wasn’t good enough, so they invented the run-all-the-things upstart, then systemd Borged upstart, all while Samba, one of the most critical Windows interfaces, still hasn’t emerged from the original init scripts. They call this progress, but I’m not sure.

    Telling the Samba server to not be the domain controller, which should resolve intermittent pissing matches over who’s on first, had no effect.

    When the Win 7 box does show the shared files, everything works fine: files read & write with the proper permissions, the owners & groups are fine, all is right with the world. In between those moments, however, nothing works, because the share simply doesn’t appear.

    Then, seconds or minutes or tens of minutes later, it’s back!

    Setting map to guest = bad password, as found in the usual random blog comment, had no effect.

    The most recent Samba update replaced the /etc/samba/smb.conf file, so we’ll restart from scratch and see what happens next.

    My general approach to Samba has been to futz around until it mysteriously starts working. That seems not to be of any avail this time around; we may put the tax data on a USB stick and move on.

  • Dell Inspiron E1405 vs. Ubuntu 14.04LTS vs. Broadcom Drivers

    So the ancient Dell E1405 laptop on the Electronics Bench, connected to this-and-that, woke up without network connections. As in, right after booting, the link and activity lights jammed on solid, the usual eth0 device wasn’t there, WiFi was defunct, and nothing made any difference.

    After a bit of searching, the best summary of what to do appears on the Ubuntu forums. The gist of the story, so I need not search quite so much the next time, goes like this:

    The laptop uses the Broadcom BCM4401 Ethernet and BCM4311 WiFi chips, which require the non-free Broadcom firmware found in the linux-nonfree-firmware package. There’s a proprietary alternative in bcmwl-kernel-source that apparently works well for most Broadcom chips, but not this particular set.

    Guess which driver installed itself as part of the previous update?

    The key steps:

    sudo apt-get purge bcmwl-kernel-source
    egrep 'blacklist (b43|ssb)' /etc/modprobe.d/*
    ... then manually kill any files that appear ...
    

    Apparently that problem has been tripping people for at least the last four years. That this is the 14.04 Long Term Support version evidently has little to do with anything at all.

    While I was at it, I deleted all the nVidia packages that somehow installed themselves without my noticing; the laptop has Intel 945 integrated graphics hardware.

    I vaguely recall what I intended to do before this happened…

  • Fixing Ubuntu’s nVidia Driver Update Glitch

    So there’s been a conflict between Ubuntu’s kernel update procedure (which has trouble with non-GPL kernel modules) and the nVidia proprietary drivers (which you must use in order to Make Things Work). Ever since 14.04LTS came out, some-but-not-all kernel updates have produced anything from no problem at all to a totally broken system requiring esoteric manual tweakage that shouldn’t be expected of mere mortals.

    You know it’s a problem when one of the many bug reports starts out thusly:

    This bug affects 2593 people

    Bug Description

    **WARNING:** This bug has been widely reported and has *many* automatic subscribers. Please be considerate.

    The most recent update to my desktop box clobbered it hard enough that the landscape display didn’t start up properly and the portrait display wasn’t rotated. The same update to other boxes seems to have worked, but that may be a set of unwarranted assumptions; the boxes simply haven’t displayed any obvious symptoms.

    After having to fix this mess every now and again over the last year, this worked:

    sudo apt-get install --reinstall nvidia-331-uvm
    

    As nearly as I can tell, reinstalling any nVidia package that’s already installed simply retriggers the failing step, resulting in a clean and workable installation. There’s apparently something wrong with the Dynamic Kernel Module Support structure that works the second time around, but I have no idea (and little interest) about the details.

    However, that “fix” required this sequence:

    • Boot the rescue session from the Grub menu
    • Activate networking
    • Clean out any broken packages
    • Drop to a root shell prompt
    • Do the apt-get dance
    • Power off
    • Unplug the portrait montitor’s Displayport cable
    • Boot to the BIOS settings to force-start the landscape monitor
    • Power off
    • Reconnect the portrait monitor
    • Reboot into Xubuntu as usual
    • Reset the monitor positions
    • Reload the desktop backgrounds

    Now, at least, all that’s written down where I can refer to it the next time this happens… on a separate laptop, of course.

    This has been happening for nigh onto a year in what Ubuntu charmingly calls a “long term support” release.

  • Xubuntu vs. Gnome Keyring Redux

    Once again, another Xubuntu desktop box started having troubles with the Gnome keyring manager, with baffling symptoms including a request for a password you don’t know and forgetting passwords you’ve entered correctly.

    The solution, much as before, requires at least some of:

    • Auto-start Gnome services: Session & Startup -> Advanced -> ×
    • Find and delete the keyrings directory: this time it was ~/.gnome2/keyrings
    • Tweak the contents of /etc/xdg/autostart/gnome-keyring-pkcs11.desktop
    • Reboot that sucker
    • Enter passwords as needed, which should be The Last Time you must do that

    This keyring problem remains a problem after all these years, because … I haven’t a clue.

    At least now I have a list of things to try, which should might reduce the hassle next time around.

  • Wider Borders in XFCE / Xubuntu

    A longstanding Xubuntu / XFCE UI problem has been single-pixel window borders that make click-and-drag resizing essentially impossible. The reason it’s a longstanding problem has been the developers’ unflinching response to any and all issues raised on the bug tracker:

    That discussion may be illuminating.

    I had never looked for the XFCE theme-building documentation (and, thus, never found any), because building a whole new theme would be a lot of work just to resize the damn borders. It should be feasible to tweak only the borders of an existing theme, but … I stalled.

    Repeatedly. On every single version of Xubuntu that’s come along.

    Fortunately, someone recently did the legwork and summarized the method, which I slightly adapted:

    cd /usr/share/themes/
    sudo cp -a Greybird-compact/ Greybird-wide
    cd Greybird-wide/xfwm4
    for f in bottom left right ; do sudo cp ../../Daloa/xfwm4/${f}* . ; done
    sudo sed -i -e 's/C0C0C0/CECECE/' *xpm
    sudo sed -i -e 's/A0A0FF/7C7C7C/' *xpm
    sudo sed -i -e 's/E0E0FF/E0E0E0/' *xpm
    

    The exact color mapping depends on which two themes you’re using. You can also specify GTK element colors, which seems like a better way to do it. Maybe next time.

    Apparently, the corresponding PNG files contain transparency information for the XPM files, but I haven’t bothered to investigate how that works or what might happen if I tweaked them.

    Then you select the new Graybird-wide theme and It Just Works.

    Sheesh & similar remarks…

  • Pilot InstaBoost: Battery Capacity

    The cardboard package liner claims the lithium-ion battery inside our Larval Engineer’s shiny new InstaBoost jump starter is good for 10.8 A·h and and the minuscule inscription on the case truncates it to 10 A·h. Given what I’ve seen for other batteries, either value would be true when measured under the most favorable conditions, but these curves still came as a bit of a surprise (clicky for more dots):

    Pilot Instaboost
    Pilot Instaboost

    The three short, abruptly dropping curves come from the main terminals, with the battery clamps attached to similar clamps (with a glitch when they shifted position) plugged into my CBA II/IV battery tester, showing that the InstaBoost shuts off after a few minutes, regardless of load. That makes good sense: don’t connect a lithium battery to a lead-acid battery for more than a few minutes!

    The two longer curves come from the 12 V jack on the side and show that it will run until the battery goes flat. Evidently, the internal battery protection circuit cuts out at less than the 10 V minimum I used for these tests.

    I didn’t bother testing the USB charging outlet, as I assume it would produce 5 V at 1 A for slightly less than twice as long.

    Under the most favorable conditions I could come up with, the actual battery capacity of 3.5 A·h is a third of what it should be. I’d expect that from the usual eBay supplier, not Lowe’s.

    Given the cheapnified clamps, perhaps Pilot deliberately gutted the battery capacity to save a few bucks. After all, the customers will never notice. Will they?

    Except…

    Another customer took his apart and found three 3.6 A·h “high output” (whatever that means) lithium cells in series. In that configuration, the individual cell capacity does not add and the pack should produce about 3.6 A·h. Those curves show it produces slightly less than that when discharged to 10 V, which means the thing works exactly like you’d expect. Indeed, it’s better than a typical second-tier product and much better than typical eBay crap.

    The most charitable explanation would be that somebody screwed up, multiplied the number of cells by their individual capacity, put that number in the specs, and everyone downstream ran with it. If the cells were in parallel, then the total capacity in ampere·hours would equal the sum of the cell capacity.

    If you change the specs to match the as-built hardware, then, apart from those cheapnified clamps, it’s working just fine…