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

  • Dell Inspiron 8100: VGA Kernel Options

    Just installed CrunchBang Linux on the old Dell Inspiron 8100 (1 GHz 512 MB Pentium III laptop) to get some experience with OpenBox and maybe make the thing usable with the Arduino IDE on my electronics workbench.

    As with most distros, it features a totally useless boot progress thermometer splash screen that hides all the interesting details. Carving the splash quiet options off the kernel line in /boot/grub/menu.lst gets back to the usual torrent of text info, which I find comforting. But the default screen is 80×25, which means things scroll by at a pretty good clip…

    Adding vga=ask to the kernel line lets you dump what the BIOS thinks will work. This includes:

    • 0x345 or 0x346 = 1600x1200x16
    • 0x315 = 800x600x32
    • 0x31A = 1280x1024x16

    Plus a whole bunch of other modes that don’t matter much these days. Anyone for 40×25 text mode?

    I wanted 1600×1200, but both of the listed options caused a garbled display: double-spaced raster lines and eventual overlapping wrapped text. There’s probably a BIOS bug in there somewhere.

    Choosing the 80×60 modes produced truly ugly squashed text.

    After some poking around, 0x31A produced a usable display that, to my wondering eyes, appears to be 1600×1200. The kernel expects the decimal equivalent of that value: vga=794.

    It’s plenty dense enough for all the boot text…

  • Why Friends Don’t Let Friends Run Windows: Mystery Banking DLL

    So I signed into the credit union’s online banking site, did the multi-factor authentication dance, and was confronted with this dialog box…

    HVFCU Mystery DLL Download
    HVFCU Mystery DLL Download

    No, as a matter of fact, I did not choose to open ibank.dll, thank you very much for asking.

    Well, what would you do?

    Got this response from the credit union’s email help desk:

    Upon speaking to out Information Technology department, I have been advised that this is a known problem for FireFox, Mac, and Linux users.

    Hmmm, well now, Internet Explorer is conspicuous by its absence on that list, isn’t it?

    A bit more prodding produced this response:

    HVFCU uses a third party vendor to provide the Internet Banking software used on our servers.  On November 22 we installed the equivalent of their year end release (which is mandatory due to regulatory changes contained in the release).  Subsequent to that upgrade we discovered that errors had been introduced for Mac and/or Linux users of Safari and FireFox (and also for a small subset of Windows Internet Explorer users).  These same errors do not occur on Safari nor FireFox running on Windows.  We reported these problems to our vendor within 24 hours of the installation.

    My guess is that the “small subset of Windows Internet Explorer users” corresponds to the few who actually armored-up their IE security settings enough that it doesn’t automatically download and execute anything offered to it from any website.

    The rest, well, those PCs are most likely part of a zombie botnet.

    He assured me:

    The “ibank.dll” program cannot run on a Mac nor a PC.  It is solely a server side application which generates HTML pages.

    Just guessing here, but if the “misconfiguration” had extended to actually serving the file, well, it probably would have run just fine (or, at least, attempted to run) on any Windows PC. They are, after all, using DLLs on the server, so it’s not like they’re a Unix-based shop.

    And it’s pretty obvious that their vendor’s testing extended only far enough to verify that the code worked with security settings dialed to “Root me!” Maybe they didn’t actually do any testing at all; this was, after all, just an end-of-year update. What could possibly go wrong?

    If you’re wondering why your Windows-based PC has been behaving oddly, maybe you’ve gotten a drive-by download from a trustworthy site with all the appropriate icons on their home page.

    Makes you really trust the banking system, doesn’t it?

    Or maybe it’s just another reason to stop using Windows…

  • Arch Linux: Volume Control

    My Microsoft Comfort Curve 2000 keyboard has the usual gaggle of multimedia & program-control keys. I tend to not use many of those keys, but Volume +/- and Mute come in handy.

    The default Arch Linux keyboard configuration, whatever it is, reports the appropriate codes from the keyboard, so I didn’t have to fiddle with any of that.

    I used the same basic procedure as I described there, with tweaks to the amixer commands:

    amixer sset Master,0 3dB+
    amixer sset Master,0 3dB-
    amixer sset Master,0 toggle

    Linking the keys and commands goes through the XFCE4 Keyboard settings applet (or whatever those things are called).

    For what it’s worth, the Back and Forward keys work perfectly in Firefox, right out of the box.

  • Arch Linux: Wacom Graphire3 FDI File

    Again, this is similar to the FDI file for Xubuntu, with a partial match on the name.

    The button mapping swaps the two buttons along the pen, leaving the tip as Button 1. Button 2 pops up context menus, which I find easier when it’s on the front part of that two-button rocker.

    X occasionally crashes hard when the tablet moves the pointer between the two screens. It’s more common when scrolling, where the pointer is moving vertically along the gutter and falls off the edge. The workaround: restrict the tablet pointer so that it can’t quite get off the edge of the screen. Setting the BottomX value to just slightly more than the tablet can produce seems to work well: Tablet max = 16704 and BottomX = 16750.

    Unlike in Xubuntu, the tablet values mapped pretty closely to the whole screen; there was no need for absurd scaling values to expand a small upper-left rectangle to the full screen.

    The problem with hard X crashes is that X takes the (USB) keyboard down with it. The only solution seems to be ssh-ing in from another system and killing startx; you cannot Ctrl-Alt-Backspace or Ctrl-Alt-F1 or any of that stuff with a completely dead keyboard.

    You must include the SendCoreEvents option, otherwise The GIMP (and, presumably, other tablet-aware apps) will capture the events and never relinquish focus to system dialog boxes. Like, for example, the tablet won’t be able to focus inside the File->Save As dialog box…

    Herewith, the file /etc/hal/fdi/policy/10-linuxwacom.fdi:

    <?xml version="1.0" encoding="ISO-8859-1"?>
    <deviceinfo version="0.2">
     <device>
     <match key="info.product" contains="Wacom Graphire3">
     <merge key="input.x11_driver" type="string">wacom</merge>
     <merge key="input.x11_options.Type" type="string">stylus</merge>
     <merge key="input.x11_options.SendCoreEvents" type="string">True</merge>
     <merge key="input.x11_options.Button2" type="string">3</merge>
     <merge key="input.x11_options.Button3" type="string">2</merge>
     <merge key="input.x11_options.MMonitor" type="string">off</merge>
     <merge key="input.x11_options.ScreenNo" type="string">0</merge>
     <merge key="input.x11_options.BottomX" type="string">16750</merge>
    <!-- <merge key="input.x11_options.BottomY" type="string">11893</merge> -->
     <append key="info.callouts.add" type="strlist">hal-setup-wacom</append>
     <append key="wacom.types" type="strlist">eraser</append>
     <append key="wacom.types" type="strlist">cursor</append>
     </match>
     </device>
     <!-- Wacom names "parser" -->
     <device>
     <match key="info.udi" contains_not="subdev_0">
     <match key="info.udi" contains_not="subdev_1">
     <match key="info.udi" contains_not="subdev_2">
     <match key="input.x11_options.Type" contains="stylus">
     <merge key="info.product" type="string">stylus</merge>
     </match>
     <match key="input.x11_options.Type" contains="eraser">
     <merge key="input.x11_options.SendCoreEvents" type="string">True</merge>
     <merge key="info.product" type="string">eraser</merge>
     <merge key="input.x11_options.MMonitor" type="string">off</merge>
     <merge key="input.x11_options.ScreenNo" type="string">0</merge>
     <merge key="input.x11_options.BottomX" type="string">16750</merge>
    <!-- <merge key="input.x11_options.BottomY" type="string">11893</merge> -->
     </match>
     <match key="input.x11_options.Type" contains="cursor">
     <merge key="info.product" type="string">cursor</merge>
     </match>
     </match>
     </match>
     </match>
     </device>
    </deviceinfo>
    

    All in all, it’s much better than it was.

  • Arch Linux: Kensington Expert Mouse FDI File

    The FDI file is similar to the one I used for Xubuntu, with the exact match changed to a partial match. For some reason, the exact match seemed to not work.

    Because the XFCE4 Mouse configuration utility sets handedness on a per-mouse basis, you need not swap buttons 1+3 here. I did, anyway, and the mouse automagically came up left-handed.

    I swapped 2+8, the top two buttons, putting the browser “back one page” button at the upper left and the “open in new tab” button at the upper right.

    The contents of /etc/hal/fdi/policy/10-expertmouse.fdi:

    <?xml version="1.0" encoding="ISO-8859-1"?>
    <deviceinfo version="0.2">
     <device>
     <match key="input.product" contains="Kensington Expert Mouse">
     <append key="input.x11_options.ButtonMapping" type="string">3 8 1 4 5 6 7 2</append>
     </match>
     </device>
    </deviceinfo>
    

    And, for whatever reason, the scroll ring now works perfectly without the least hint of stuttering or jamming.

  • Arch Linux: X11 and XFCE4 Setup

    The Arch Linux Installation Guide gets X11 up and running in fairly short order, leaving you with a bare xterm session. That handled a single screen, so I copied the /etc/X11/xorg.conf file I’d hand-carved for Xubuntu, restarted X, and by gosh-and-golly, it worked perfectly!

    The right-hand screen is still in landscape mode while physically rotated to portrait, but that’s fixable with xrandr.

    For future reference…

    Section "ServerLayout"
        Identifier     "RotatedPortrait"
        Screen      0  "Landscape" 0 0
        Screen      1  "Portrait" RightOf "Landscape"
    EndSection
    
    Section "Module"
        Load           "dbe"
        Load           "extmod"
    #   Load           "type1"
    #   Load           "freetype"
        Load           "glx"
    EndSection
    
    Section "ServerFlags"
        Option         "Xinerama" "0"
    EndSection
    
    Section "Monitor"
        # HorizSync source: edid, VertRefresh source: edid
        Identifier     "Dell2001FP"
        VendorName     "Dell"
        ModelName      "DELL 2001FP"
        HorizSync       31.0 - 80.0
        VertRefresh     56.0 - 76.0
        Option         "DPMS"
    EndSection
    
    Section "Monitor"
        # HorizSync source: edid, VertRefresh source: edid
        Identifier     "Dell2005FP"
        VendorName     "Dell"
        ModelName      "DELL 2005FPW"
        HorizSync       30.0 - 83.0
        VertRefresh     56.0 - 75.0
        Option         "DPMS"
    EndSection
    
    Section "Device"
        Identifier     "GF9400_0"
        Driver         "nvidia"
        VendorName     "NVIDIA Corporation"
        BoardName      "GeForce 9400 GT"
        BusID          "PCI:1:0:0"
        Screen          0
    EndSection
    
    Section "Device"
        Identifier     "GF9400_1"
        Driver         "nvidia"
        VendorName     "NVIDIA Corporation"
        BoardName      "GeForce 9400 GT"
        BusID          "PCI:1:0:0"
        Screen          1
    EndSection
    
    Section "Screen"
        Identifier     "Landscape"
        Device         "GF9400_0"
        Monitor        "Dell2001FP"
        DefaultDepth    24
        Option         "TwinView" "0"
        Option         "metamodes" "DFP-0: 1600x1200 +0+0"
        Option         "NoLogo" "Off"
        SubSection     "Display"
            Depth       24
        EndSubSection
    EndSection
    
    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
    

    With that in hand, the Install Guide gets you through setting up XFCE4 with no problems at all; consult the XFCE guide for more details.. It handles both screens, lets you install panels on both with no complaint, and generally Just Works.

    Useful widgets:

    • clipman
    • cpugraph
    • datetime
    • netload
    • screenshooter
    • time-out (wish it knew about screensaver timeouts)

    Add xscreensaver which politely blanks both screens. Timeout in 5 minutes, lock after 1 more, then power saving stages in at 7/8/9 minutes.

  • Arch Linux: Initial Setup

    Herewith, some general notes on getting Arch Linux installed & tweaked on my rather bizarre set of desktop hardware. The bottom line is that it pretty much works, with very few quirks, right out of the carton. Search for previous posts detailing most of the things discussed here.

    Hard drive partitioning on /dev/sda:

    1. Dell Utility
    2. Windows XP
    3. Dell Restore
    4. Logical -> Extended
    5. Swap
    6. Xubuntu 9.10 (recently installed desktop)
    7. Xubuntu 8.10 (last year’s desktop)
    8. Arch Linux installation (replacing Ubuntu 9.10 trial install)

    The trick is to have enough partitions lying around that you can do a complete installation without clobbering your previous version. Then, when you’re happy the new one works, just change the Grub boot default and you’re off & running.

    Follow the Installation & User Guides, which walk you through most of the choices and situations.

    I did not allow it to install Grub, as I already had it set up and didn’t mind some manual tweakage.

    After the installation, I added this stanza to the existing Xubuntu 9.10 grub.cfg file to boot the new Arch installation; the old menu.lst file has vanished with the new Grub. On a 1600×200 LCD, I need VGA=792 in what used to be the kernel line to get readable characters.

    menuentry "Arch Linux on /dev/sda8" {
    	insmod ext2
    	set root=(hd0,8)
    	search --no-floppy --fs-uuid --set 108a6b1b-1628-47dd-ab84-7a13be82590b
    	linux /boot/vmlinuz26 root=/dev/sda8 ro vga=792
    	initrd /boot/kernel26.img
    }
    

    The Arch installation completes with a reboot to a naked root command prompt. Everything beyond that happens only at your command.

    Add your personal user, add the wheel group to your ID, then uncomment that line to enable super powers when you edit /etc/sudoers.

    I had to do pacman -Syy before any installs worked. I found no advantage to powerpill rather than pacman.

    Various programs:

    • rpcbind & nfs-common
    • alsa-utils
    • cups

    The modified entries in /etc/rc.conf, which is where much of the system configuration & daemon startup occurs:

    LOCALE="en_US.UTF-8"
    HARDWARECLOCK="localtime"
    TIMEZONE="America/New_York"
    KEYMAP="us"
    CONSOLEFONT="Lat2-Terminus16.psfu.gz"
    ...
    eth0="eth0 192.168.1.3 netmask 255.255.255.0 broadcast 192.168.1.255"
    INTERFACES=(eth0)
    ...
    gateway="default gw 192.168.1.1"
    ROUTES=(gateway)
    ...
    DAEMONS=(syslog-ng hal network rpcbind netfs nfs-common cups crond)
    

    The Terminus font looks better than whatever the default is, but maybe that’s just me.

    The eth0 line is all it takes to set up a static IP address. Zowie!

    The gateway line aims all Internet traffic at my firewall router.

    The DAEMONS line starts up a variety of services. I have these:

    • hal – required for XFCE and others
    • rpcbind – for nfs network file shares
    • netfs – similarly
    • nfs-common – nfs client
    • cups – network printing

    I added my usual nfs mounts to /etc/fstab, got the service startup order correct in rc.conf, and it’s all good.