Archive for category PC Tweakage

Huion H610Pro (V2) Tablet vs. Ubuntu 18.04

Given the hassle involved with getting my ancient Wacom Graphire3 tablet working with various Linux versions, I was unsurprised to find a Huion H610Pro (V2) tablet (*) didn’t quite work out of the box.

Good old lsusb showed the tablet’s USB info:

lsusb
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 004: ID 248a:ff0f  
Bus 001 Device 007: ID 058f:9410 Alcor Micro Corp. Keyboard
Bus 001 Device 006: ID 047d:1020 Kensington Expert Mouse Trackball
Bus 001 Device 005: ID 046d:c508 Logitech, Inc. Cordless Trackball
Bus 001 Device 003: ID 0451:2046 Texas Instruments, Inc. TUSB2046 Hub
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 006: ID 05e3:0748 Genesys Logic, Inc. 
Bus 004 Device 005: ID 0480:a202 Toshiba America Inc Canvio Basics HDD
Bus 004 Device 004: ID 0bda:0411 Realtek Semiconductor Corp. 
Bus 004 Device 003: ID 0451:8041 Texas Instruments, Inc. 
Bus 004 Device 002: ID 0bda:0411 Realtek Semiconductor Corp. 
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 006: ID 256c:006d  
Bus 003 Device 004: ID 0bda:5411 Realtek Semiconductor Corp. 
Bus 003 Device 003: ID 0451:8043 Texas Instruments, Inc. 
Bus 003 Device 002: ID 0bda:5411 Realtek Semiconductor Corp. 
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Yes, the space normally occupied by the product description is blank. The first blank description comes from a generic wireless keypad’s USB receiver; the 0x248a Vendor ID claims be Maxxter, a step down from the usual Logitech ID rip, and its 0xff0f Device ID looks bogus to me, too.

The 0x256c Vendor ID isn’t in the online databases yet, but some grepping found it in /lib/udev/rules.d/65-libwacom.rules:

# Huion H610 Pro
ENV{ID_BUS}=="usb", ENV{ID_VENDOR_ID}=="256c", ENV{ID_MODEL_ID}=="006e",  ENV{ID_INPUT}="1", ENV{ID_INPUT_JOYSTICK}="", ENV{ID_INPUT_TABLET}="1"
ATTRS{name}=="* Pad", ENV{ID_BUS}=="usb", ENV{ID_VENDOR_ID}=="256c", ENV{ID_MODEL_ID}=="006e",  ENV{ID_INPUT_TABLET_PAD}="1"
# Huion H610 Pro
ENV{ID_BUS}=="usb", ENV{ID_VENDOR_ID}=="256c", ENV{ID_MODEL_ID}=="006e",  ENV{ID_INPUT}="1", ENV{ID_INPUT_JOYSTICK}="", ENV{ID_INPUT_TABLET}="1"
ATTRS{name}=="* Pad", ENV{ID_BUS}=="usb", ENV{ID_VENDOR_ID}=="256c", ENV{ID_MODEL_ID}=="006e",  ENV{ID_INPUT_TABLET_PAD}="1"

Note, however, that the Device ID is 0x006e, where the upgraded V2 tablet is 0x006d; I have no idea why the number goes down as the version goes up. Change all instances of the former to the latter.

Even though the Wacom driver can apparently handle the older H610Pro, the V2 tablet’s buttons were missing in action.

The solution seems come from the Digimend project, although it also expects the 0x006e Device ID, and as is usually the case, installing the latest & greatest version, hot from GitHub, did the trick.

For this first pass, I didn’t use DKMS, which this post will remind me to do after the next kernel upgrade.

A reboot settled all the drivers into place, after which:

xsetwacom --list
HUION Huion Tablet Pen stylus   	id: 10	type: STYLUS    
HUION Huion Tablet Pad pad      	id: 11	type: PAD 

Yes, it’s “Tablet Pad pad” and capitalization is important.

For my simple needs, confining the stylus cursor to the landscape monitor makes sense. Adding this to ~/.config/startup.sh did the same thing as similar invocations for the Wacom:

xsetwacom --verbose set "HUION Huion Tablet Pen stylus" MapToOutput "DP-1"

The various buttons still need configuration, although that’s in the nature of fine tuning. The top three buttons are 1, 2, 3, with the rest tagging along at 8 through 12. They take trendy gray-on-black labeling to an absurd limit:

Huion H610Pro V2 - embedded gray-on-black buttons
Huion H610Pro V2 – embedded gray-on-black buttons

That’s with intense overhead lighting shining into the buttons and lighting up the lower-surface iconography. In normal light, they’re shiny black disks with invisible legends and, no, they’re not backlit.

The overall button-tweaking syntax:

xsetwacom set "HUION Huion Tablet Pad pad" button 12 key whatever

Where whatever comes from the list in /usr/include/X11/keysymdef.h, per the doc in man xsetwacom and a list of possibilities from:

xsetwacom --list modifiers  "HUION Huion Tablet Pad pad"

For example, this causes the bottom button to spit out a question mark:

xsetwacom set "HUION Huion Tablet Pad pad" button 12 key shift /

It’s not obvious changing the buttons from their default button numbers to anything else makes any sense; just tweaking individual programs to map those numbers into useful actions should work better.

(*) It has a “battery-free” stylus which, to my way of thinking, is a major selling point.

,

Leave a comment

Windows-free BIOS Update

A new-to-me Dell Optiplex 9020 needed a BIOS update, which, as always, arrives in a Windows / DOS EXE file. Because I’d already swapped in an SSD and installed Manjaro, I had to (re-)discover how to put the EXE file on a bootable DOS USB stick.

The least horrible way seemed to be perverting a known-good FreeDOS installation image:

sha256sum FD12FULL.zip 
fd353f20f509722e8b73686918995db2cd03637fa68c32e30caaca70ff94c6d2  FD12FULL.zip

Unzip it to get the USB image file, then find the partition offset:

fdisk -l FD12FULL.img
Disk FD12FULL.img: 512 MiB, 536870912 bytes, 1048576 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device        Boot Start     End Sectors   Size Id Type
FD12FULL.img1 *       63 1048319 1048257 511.9M  6 FAT16

Mount the partition as a loop device:

sudo mount -o loop,offset=$((63*512)),uid=ed FD12FULL.img /mnt/loop

See how much space is left:

df -h /mnt/loop
Filesystem      Size  Used Avail Use% Mounted on
/dev/loop0      512M  425M   87M  84% /mnt/loop

The image file is 512 MB and has 87 MB available. The BIOS file is 9.5 MB, so copy the file to the “drive”:

cp O9020A25.exe /mnt/loop

Which knocks the available space down by about what you’d expect:

df -h /mnt/loop
Filesystem      Size  Used Avail Use% Mounted on
/dev/loop0      512M  435M   78M  85% /mnt/loop

Unmount the image “drive”:

sudo umount /mnt/loop

Copy the image file to a USB stick:

sudo dcfldd status=progress bs=1M if=FD12FULL.img of=/dev/sdg
512 blocks (512Mb) written.
512+0 records in
512+0 records out

Pop the USB stick in the Optiplex, set the BIOS to boot from “Legacy” ROMs, whack F12 during the reboot, pick the USB stick from the list, and It Just Works™:

BIOS Update screen
BIOS Update screen

We have a couple of other 9020s around that need the same treatment, so the effort won’t go to waste.

,

4 Comments

Manjaro Linux VNC Setup

I installed the XFCE flavor of Manjaro Linux (beside Win 8.1 Pro) on a new-to-me Dell Latitude 7250 serving as our new Token Windows box and carry-along-able Linux laptop.

Manjaro being an offshoot of Arch, they have plenty of guides and references, with How to Set up X11VNC Server being most useful at the moment. This box needs only a VNC server and apparently works with ‑xdamage for faster updates.

With the laptop plugged into an external display and Manjaro set up to use both displays, the X11VNC server feeds both to the client with the proper positioning, producing a truly panoramic, albeit scaled, view:

WinFlip - X11VNC dual screen
WinFlip – X11VNC dual screen

TightVNC on Windows does much the same thing, although (AFAICT) Windows doesn’t allow different background pictures on the two screens; that’s irrelevant to my mmmm use case.

Leave a comment

Heatsink Fuzz

This appeared while harvesting heatsinks and suchlike from a defunct Dell Optiplex:

Clogged CPU heatsink
Clogged CPU heatsink

The only way to get access to that end of the heatsink is to break the heatsink’s thermal bond to the CPU, which seems like a Bad Idea if you intend to continue using the thing:

Clogged CPU heatsink - fan
Clogged CPU heatsink – fan

I buy off-lease Optiplexes from Dell Financial Services (a.k.a. Dell Refurbished) and, although their interiors always look well-cleaned, Dell (or, nowadays, FedEx Reverse Logistics) may have decided against breaking the CPU’s thermal bond and just sent me an office’s dust collection.

Doesn’t look like my dust. That’s my story and I’m sticking with it.

8 Comments

Home Key Tactile Bumps

It seems I do more typing than the good folks at Kinesis expected:

Kinesis keyboard - worn tactile bump
Kinesis keyboard – worn tactile bump

In round numbers, the keyboard is all of two years old and that little ridge is pretty much history.

The ultimate fix will likely involve a dab of epoxy, but a duct tape snippet should show me how much of a bump my fingers need to find the home keys without conscious thought:

Kinesis keyboard - tape bump
Kinesis keyboard – tape bump

Early returns suggest one layer isn’t quite prominent enough; some iteration will be in order.

And, yeah, I should yank the keycaps for some deep cleaning.

3 Comments

Firefox + uBlock Origin vs. CNN Autoplay Videos

Set up these filters in uBlock Origin, per some hints:

||registry.api.cnn.io/assets/fave/theoplayer$domain=cnn.com
cnn.com###large-media

All those annoying CNN auto-play videos will vanish, along with any videos you might have wanted. For me, it’s a reasonable tradeoff, as most (useful) videos will be available on Youtube or elsewhere.

The built-in browser controls you might think of activating, as I have, don’t work on CNN videos, because CNN uses theoplayer, a “universal” Javascript-based player. It’s not Flash, it’s not HTML5, it’s not a specific video thing, it’s a way to work around all those blocking mechanisms.

Mostly, I don’t get news from CNN, but occasionally a link will lead there, a video appears, and instantly gets muted.

Burn them. Burn them all.

Update: Some sites run auto-play videos through JW Player, which you kill thusly:

||jwcdn.com
||content.jwplatform.com

That blocks the source of the player, which seems to not depend on the site using it. So far, so good.

2 Comments

Imagemagick 6 vs. PDF

Come to find out Xubuntu 18.04 ratcheted the ImageMagick security settings up to a dangerous chattering whine:

convert p???.jpg "Machining D-bit Drills.pdf"
convert-im6.q16: not authorized `Machining D-bit Drills.pdf' @ error/constitute.c/WriteImage/1037.

Fortunately, someone who understands this stuff encountered the problem before I did and posted a great description of the solution.

To forestall link rot, the process looks like:

cd /etc/ImageMagick-6/
sudo cp policy.xml policy.xml.base
sudo nano policy.xml
… change one line …
 policy domain="coder" rights="read|write" pattern="PDF"

It is completely unclear to me whether ImageMagick (as of ImageMagick 6.9.7-4 Q16 x86_64 20170114 ) requires or merely tolerates the vertical bar in place of commas, nor whether it’s in my best interest to replace "coder" with "*".

In any event, I can once again stuff bitmap images into PDF files.

2 Comments