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

  • Optiplex 980 Bringup Notes

    Although the Optiplex 780 continues to chug along, some additional bringup notes for the new-to-me Optiplex 980 may be of future use. In no particular order, because that’s how it goes:

    The OS is Xubuntu 13.10 in the 64-bit flavor, mostly for UI & infrastructure consistency with my other boxes. The Ubuntu project continues to diverge from consensus reality and the process of fighting down the Special Ubuntu Sauce seems increasingly difficult and less rewarding. This may be the last box I set up with Xubuntu, although I’m not sure what else to use; Arch requires more fiddly sysadmin-fu than I’m willing to allocate and Ubuntu-based distros like Mint seem to have all the disadvantage of Ubuntu plus the difficulties of splinter distros.

    dmesg reports that the CPU:

    Intel(R) Core(TM) i5 CPU 650 @ 3.20GHz (fam: 06, model: 25, stepping: 02)

    With two cores and HyperThreading turned on, it has enough moxie to run one instance of the GIMPS prime factoring code without crippling the UI. The estimated completion date for the current work is 9 July 2014, which should creep closer as the CPU sees more uptime. The previous crontab startup continues to work. It adds about 25 W to the baseline 50 W consumption.

    Adobe has abandoned Adobe Reader for Linux and attempting to install the most recent version of 9.whatever produces a blizzard of warnings. I’ll try Okular and Evince, although both have problems with some PDFs that Reader handles with aplomb. Eliminating the security exposures in Reader should be a net win.

    Okular gets its own devilspie2 rule that look a lot like the previous one for Adobe Reader:

    if (string.find(get_window_name(),"Okular")) then
          unmaximize();
          set_window_geometry(0,0,1000,100);
          set_window_geometry(2561,0,1000,100)
          maximize();
    end
    

    This Optiplex 980 has two built-in video connectors (DisplayPort and VGA) that work with the Free Software drivers. After some fumbling around, the XFCE Display configuration utility positioned and rotated the  landscape and portrait monitors as I wanted them. Running the 1680×1050 display with analog VGA signals produces a noticeably less crisp result, but it’s on the OK side of Good Enough.

    The startup display / greeter doesn’t handle that configuration very well at all:

    Xubuntu greeter - dual displays
    Xubuntu greeter – dual displays

    The .xprofile file doesn’t need the xrandr hacks and includes the display names corresponding to the new video outputs:

    setxkbmap -option terminate:ctrl_alt_bksp
    #xrandr --output HDMI-0 --rotate left
    #xrandr --dpi 100x100
    xsetwacom --verbose set "Wacom Graphire3 6x8 stylus" MapToOutput "DP1"
    xsetwacom --verbose set "Wacom Graphire3 6x8 eraser" MapToOutput "DP1"
    

    Although I’m sure there’s a Better Way that’s now The Standard Method, just creating a simple /etc/X11/xorg.conf file (with nothing else!) swapped the Kensington Expert Mouse buttons:

    Section "InputClass"
    Identifier      "Kensington Trackball"
    MatchProduct    "Kensington Expert Mouse"
    Option          "SendCoreEvents" "True"
    Option          "ButtonMapping" "3 8 1 4 5 6 7 2"
    EndSection
    

    Perhaps that should be in a file tucked in /usr/share/X11/, along with 50-wacom.conf, which I modified to swap the stylus buttons, which worked the last time:

    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
    

    The default audio stream goes through DisplayPort and comes out of the monitor’s audio jack, which took an embarassingly long time to discover. As nearly as I can tell, there is no way to enable the internal audio in addition to the DisplayPort channel; putzing with pavucontrol and alsamixer was unproductive.

    The “indicator applet” sound control seems to be irrecoverably broken, for reasons having to do with the change from GTK2 to GTK3 (or something like that); the suggested workaround do not work for this system. Unfortunately, XFCE allows exactly one mixer applet in the panel, which will pose a problem with the USB headset I use for phone calls.

    The vast Pachinko machine that is the current Ubuntu startup process has slightly different timing, so the simpleminded scheme I used to get the NFS share mounted before the UI starts up doesn’t quite work; signing in a few seconds after the greeter pops up seems to do the trick.

    I think having the local.conf routine emit a unique signal after mounting the NFS shares, then having the lightdm.conf routine wait for that signal, might just do the trick. More research is needed.

    Of course, a release or two ago the tried-and-true network interface names changed, for well and good reason, but … OK, I can use em1 instead of eth0, although I sure hope that’s not a random outcome.

    En passant, I discovered why the keyboard didn’t respond during boot: a crappy powered USB2 hub wasn’t working quite right. Swapping in an ancient Belkin powered USB hub solved that problem:

    Belkin USB Hub - under desk
    Belkin USB Hub – under desk

    The hub concentrates the desktop peripherals (keyboard, two trackballs, and the tablet), so it doesn’t need high-speed throughput or responsiveness.

  • New Video Card: Pinball Panic!

    Picked up a new Jaton PX610GT-EX video card, just like that one, for the new desktop box that’s slowly taking shape. Dropped it into the slot, fired it up, and …

    Jaton PX610GT-EX - Pinball Panic
    Well, that doesn’t look quite right. In real life, the pattern sparkled and the horizontal bar slid slowly down the screen; this is a photo, because the UI was completely hosed.

    In truth, that’s what happened when I swapped it into the current desktop box to figure out whether the fault lay in the card, the PC, or the OS. In the new PC, the card flat-out didn’t work at all, so the fact that it booted and got the OS GUI up, before getting wedged, counted for something.

    Given that the two cards are identical, the new one is on its way back for an exchange.

    The full desktop picture is over there.

  • Why Proper Packaging Is A Good Thing

    When I ordered this carton of paper, I specified “pick up at store” because I knew this would happen:

    Ruptured paper carton
    Ruptured paper carton

    A carton weighs so much that everybody, myself included, grabs it by the straps and slings it around. Unlike them, I put it down gently, because it’s my paper… but now it’s too late.

    Inside the carton, the impact shattered the paper wrapper on every one of the ten reams:

    Split paper reams
    Split paper reams

    In the last carton I bought (admittedly, quite some time ago), Staples used plastic wrappers that gave each ream a bit more protection against abuse and the elements, but that’s been cheapnified out of existence.

    I also ordered a ream of fancy heavyweight paper that pushed the order over the “Free Shipping!” threshold; I missed the fact that they auto-checked “Free Delivery!” for the whole order. Of course, that ream shipped separately and it’s now delayed by a week or two…

    I could take it back, but the paper from that bottom-corner ream seems to be no more than somewhat bent, so I’ll live with it.

  • Dell Optiplex 980 Setup

    My desktop box (an off-lease Dell Optiplex 780) work up dead a while back, but recovered; I figured an insurance policy might be a good idea, so a new-to-me off-lease Dell Optiplex 980 just arrived. It booted into Windows Vista Business, whereupon:

    • Apply all the usual Windows updates
    • Boot SysRescCD from USB, run GPartEd
    • Shrink the Windows partition (/dev/sda1) to 25 GB
    • Slide the recovery partition (/dev/sda2) over against it
    • Create 10 GB swap partition (/dev/sda3), likely never to be used with 4 GB of RAM
    • Create extended partition (/dev/sda4)
    • Create 35 GB Linux partition (/dev/sda5)

    Then install Xubuntu 13.10 using the mini ISO USB, put GRUB in the MBR, reboot, and … get Vista again. Huh. This is not a nominal outcome.

    For whatever reason, GRUB either doesn’t get control or defaults to the Windows partition. However, attempting to boot from the mini ISO transfers control to GRUB, thence to Xubuntu, and attempting to boot from SysRescCD works fine. Boot to Xubuntu, tinker with /etc/default/grub, run update-grub, and it still doesn’t work. Well, it boots Vista, but that doesn’t work for me; no error messages, either.

    The box runs BIOS A07, so:

    • Fetch BIOS A14
    • Boot Windows, update the BIOS
    • Check the settings and discover that the hard drive is set to RAID mode
    • Change that to RAID Autodetect – AHCI
    • Ignore warnings about possible reinstall; box doesn’t come with a reinstall CD
    • Reboot and it’s all good: GRUB is now in full control
    • Both Vista and Xubuntu work fine

    I think the problem came from having a single hard drive set to RAID mode. Dunno what they had in mind with that; it’s a small form factor box with no room for another drive…

    Memo to Self: Yet Another Thing To Preemptively Un-Wedge

  • Hard Drive Lifetime: Data Points

    Three years ago I installed a 1.5 TB WD Elements USB drive as an external backup for the “file server” in the Basement Laboratory. The log files show that the drive started spitting out “short reads” early in October, which means the rust has begun flaking off the platters.

    Repeated fsck -fyv /dev/sda1 runs produce repeated failures at various spots, so it’s not in good condition:

    e2fsck 1.41.14 (22-Dec-2010)
    Backup-1.5TB contains a file system with errors, check forced.
    Pass 1: Checking inodes, blocks, and sizes
    Error reading block 97649088 (Attempt to read block from filesystem resulted in short read) while getting next inode from scan.  Ignore error? yes
    ... snippage ...
    Pass 2: Checking directory structure
    Error reading block 104039017 (Attempt to read block from filesystem resulted in short read) while reading directory block.  Ignore error? yes
    Force rewrite? yes
    Directory inode 26009985, block #26, offset 0: directory corrupted
    Salvage? yes
    ... snippage ...
    Pass 4: Checking reference counts
    Inode 25903223 ref count is 41, should be 40.  Fix? yes
    ... snippage ...
    Backup-1.5TB: ***** FILE SYSTEM WAS MODIFIED *****
    
    736471 inodes used (0.80%)
    10173 non-contiguous files (1.4%)
    9367 non-contiguous directories (1.3%)
    # of inodes with ind/dind/tind blocks: 119655/12234/0
    142996292 blocks used (39.04%)
    0 bad blocks
    3 large files
    
    276772 regular files
    459614 directories
    0 character device files
    0 block device files
    0 fifos
    10377447 links
    76 symbolic links (72 fast symbolic links)
    0 sockets
    --------
    11113909 files
    

    Given that rsnapshot lashes the daily backups together with extensive hard links, so that there’s only one copy of a given file version on the drive, I don’t know what 76 symbolic links might mean.

    It’s been spinning up once a day, every day, for about 40 months; call it 1200 power cycles and you’ll be close. The usual runtime is about 10 minutes, giving the poor thing barely enough time to warm up.

    One data point does not a curve make.

    The warranty on new WD Element drives seems to be a year; I have no idea what it was slightly over three years ago, although I’m pretty sure it wasn’t more than three years…

    The various desktop boxes around here get powered up once a day, too, but I tend to replace them every few years and have never had a hard drive failure; a few system boards have crapped out, though. The boxes acting as controllers for the 3D printers and the Sherline CNC mill have a much lower duty cycle.

  • Devilspie2: Lua Scripts

    Prompted by that suggestion, here’s the current collection of Devilspie2 scripts (in ~/.config/devilspie2/) that make my dual-monitor setup (left: 2560×1440 landscape, right: 1050×1680 portrait) usable with a single X session in Xubuntu 12.10. The window manager understands about the monitor layout, so maximizing a window will fill whatever monitor it’s currently occupying.

    acroread.lua — maximized on portrait

    if (get_window_name()=="Adobe Reader") then
          unmaximize();
          set_window_geometry(0,0,1000,100);
          set_window_geometry(2561,0,1000,100);
          maximize();
    end
    

    chromium.lua — right half of landscape

    if (get_application_name()=="Chromium" and get_window_name() ~= "Print") then
       set_window_geometry(1400,0,1150,1200);
       maximize_vertically();
    end
    

    debugging.lua — handy with –debug option

    debug_print("Window Name: " .. get_window_name());
    debug_print("Application name: " .. get_application_name());
    

    digikam.lua — right half of landscape, force large Search dialog, dammit

    if (get_application_name() == "Digikam") then
    	debug_print("DigiKam conditional - top");
    	if (get_window_name() == "Advanced Search") then
    		debug_print("Digikam - Adv Search");
    		set_window_geometry(750,100,1000,1300);
    	else
    		debug_print("Main DigiKam window");
    		set_window_geometry(0,0,1400,1000);
    		maximize_vertically();
    	end
    end
    

    firefox.lua — left half of landscape, enlarge dialogs

    if (get_application_name()=="Firefox") then
    	debug_print("FF conditional - top");
    	if (get_window_name() == "Print") then
    		set_window_position(700,350);
    	elseif (0 == string.find(get_window_name(),"Password")) then
    		set_window_position(0,0);
    		maximize_vertically();
    	end
    end
    

    gimp.lua — force Gutenprint dialog to the top, dammit

    if (get_application_name() == "GNU Image Manipulation Program") then
    	debug_print("GIMP conditional - top");
    	if (string.find(get_window_name(),"Print")) then
    		debug_print("GIMP - GutenPrint")
    		set_window_position(700,350);
    		make_always_on_top();
    	else
    		debug_print("GIMP - Main window");
    	end
    end
    

    passwords.lua — put password dialogs in mid-screen

    if (get_window_name()=="Password Required") then
    	debug_print("Password");
    	set_window_position(700,350);
    end
    

    pronterface.lua — force to middle-ish of Desktop 2

    if (get_window_name()=="Printer Interface") then
       set_window_workspace(2);
       set_window_position(1200,750);
    end
    

    slic3r.lua — force to right side of Desktop 2

    if (get_window_name()=="Slic3r") then
       set_window_workspace(2);
       set_window_geometry(1600,0,700,700);
    end
    

    terminal.lua — maximized on portrait

    if (get_window_name()=="Terminal") then
       set_window_position(2561,0);
       maximize();
    end
    

    thunderbird.lua — left half of landscape, force big dialogs

    if (get_application_name() == "Thunderbird") then
    	debug_print("TBird conditional - top");
    	if (1 == string.find(get_window_name(),"Print")) then
    		debug_print("TBird - print...");
    		set_window_position(700,350);
    	elseif (string.find(get_window_name(),"Sending") or
    			string.find(get_window_name(),"Confirm") or
    			string.find(get_window_name(),"Processing")) then
    		debug_print("TBird - generic dialog");
    		set_window_position(200,600);
    	elseif (string.find(get_window_name(),"Write:")) then
    		debug_print("TBird - writing");
    		set_window_geometry(1300,0,900,600);
    		maximize_vertically();
    	elseif (0 == string.find(get_window_name(),"Password")) then
    		debug_print("Main TBird window?");
    		debug_print(" name: ",get_window_name());
    		set_window_geometry(0,0,1300,1200);
    		maximize_vertically();
    	end
    end
    
  • Why I Won’t Fix Your Windows PC

    Got a call from a friend who was having trouble getting BitDefender to accept its new license key, so I drove over; she’s at the top of a killer hill and I’d already biked my two dozen miles for the day. Solving that problem was straightforward, if you happen to know that they use “authorization” and “license” as synonyms and that you access the key entry dialog by clicking on a text field that doesn’t look at all clickable.

    I should have declared victory and returned to the Basement Laboratory, but, no, I had to be a nice guy.

    BitDefender kvetched that it had been 777 days since its last scan, so I set up some regularly scheduled scans and automagic updates for everything in sight; we agreed she’d just let the thing run overnight on Mondays to get all that done.

    BitDefender also suggested a handful of critical Windows XP updates, plus the usual Adobe Flash and Reader updates, plus some nonsense about Windows Live Messenger that seemed to require downloading and installing a metric shitload of Microsoft Bloatware. Rather than leave all that for next Monday’s unattended update, I unleashed the critical ones, did the Flash and Reader updates, and stuffed the Messenger update back under the rug.

    Then AOL recommended an urgent update to AOL Desktop 9.7. She has a couple of AOL email addresses, mostly for historic reasons, and I asked if she ever used the AOL Desktop. She wasn’t sure, so I lit up the installed AOL Desktop 9.6: “Oh, that’s how I get all my email!” OK, so we’ll update that, too.

    After all the thrashing was done, the system rebooted and presented us with the single most unhelpful error message I’ve ever seen:

    Windows Error - Ordinal Not Found
    Windows Error – Ordinal Not Found

    No, you chowderheads, that is not OK…

    Searching on the obvious terms indicated this had something to do with Internet Explorer 8 (remember IE 8?) and produced a number of irrelevant suggestions. The least awful seemed to involve running the Microsoft System File Checker utility:

    sfc /scannow

    Which I did.

    It ran for the better part of an hour, then suggested a reboot. During the shutdown, it replaced 29 files at an average of about 5 minutes per file.

    After which, Windows restarted and displayed exactly the same error message. Actually, a series of them; various programs couldn’t locate a fairly wide selection of ordinals in several DLLs.

    OK. I give up.

    We located a tech who does this sort of thing for a living. I’ve offered to split the cost of getting the box up and running again, with the understanding that it may be easier to start with a fresh off-lease Dell box running Windows 7 than to exhume an aging Windows XP installation.

    I stopped caring about Windows toward the end of the last millennium and now keep a Token Windows Box only for hardware like the HOBOWare dataloggers and software like TurboTax.

    Other than that, well…

    I. Don’t. Care.