mixedmath

Explorations in math and programming
David Lowry-Duda



For much of the pandemic, when it has come time to write things by hand, I could write on my (old, inexpensive) tablet, or write on paper and point a camera. But more recently I've begun to use collaborative whiteboards, and my tablet simply cannot handle it. To be fair, it's several years old, I got it on sale, and it was even then quite inexpensive. But it's just not up to the task.

So I bought a Wacom drawing tablet to plug into my computer. Specifically, I bought a Wacom Intuos CTL-4100 (about 70 dollars) and have gotten it working on my multiple monitor Ubuntu 20.04 LTS setup.

For many, that would be the end of the story — as these work very well and are just plug-and-play. Or at least, that's the story on supported systems. I use linux as my daily driver, and on my main machine I use Ubuntu. This is explicitly unsupported by Wacom, but there has long been community support and community drivers.

I note here the various things that I've done to make this tablet work out well.

My ubuntu distribution (20.04 LTS) already had drivers installed, so I could just plug it in and "use" the drawing tablet. But there were problems.

Firstly, it turns out that when Wacom Intuos CTL-4100 is first plugged in, the status light on the Wacom dims and indicates that it's miscalibrated. This is immediately noticeable, as the left third of the tablet corresponds to the whole writing area on the screen (which also happens to be incorrect at first — this is the second point handled below).

This is caused by the tablet mis-identifying my operating system as Android, and the dimmed light is one way the tablet indicates it's in Android mode. (I'll note that this is also indicated with a different vendor ID in lsusb, where it's reported as 0x2D1F instead of 0x056A. This doesn't actually matter, but it did help me track down the problem).

Thus after plugging in my tablet, it is necessary to restart the tablet in "PC Mode". This is done by holding the two outer keys on the tablet for a few seconds until the light turns off and on again. After it turns on, it should be at full brightness.

Secondly, I also have multiple screens set up. Although it looks fine, in practice what actually happens is that I have a single "screen" of a certain dimension and the X window system partitions the screen across my monitors. But the Wacom tablet initially was mapped to the whole "screen", and thus the left side of the tablet was at the far left of my left monitor, and 7 inches or so to the right on the tablet corresponded to the far right of my right monitor. All of my writing had the wrong aspect ratio and this was totally unwieldy.

But this is fixable. After plugging in the tablet and having it in PC Mode (described above), it is possible to map its output to a region of the "screen". This is easiest done through xrandr and xsetwacom.

First, I used xrandr –listactivemonitors to get the name of my monitors. I see that my right monitor is labelled DP-2. I've decided that my monitor labelled DP-2 will be the monitor in which I use this tablet — the area on the tablet will correspond to the area mapped to my right monitor.

Now I will map the STYLUS to this monitor. First I need to find the id of the stylus. To do this, I use xsetwacom –list devices, whose output for me was

Wacom Intuos S Pad pad id: 21 type: PAD
Wacom Intuos S Pen stylus id: 22 type: STYLUS
Wacom Intuos S Pen eraser id: 23 type: ERASER
Wacom Intuos S Pen cursor id: 24 type: CURSOR

I want to map the stylus. (I don't currently know the effect of mapping anythign else, and that hasn't been necessary, but I suppose this is a thing to keep in mind). Thus I note the id 22.

Then I run xsetwacom –set "21" MapToOutput DP-2, and all works excellently.

I'm sure that I'll encounter more problems at some point in the future. When I do, I'll update these notes accordingly.


Leave a comment

Info on how to comment

To make a comment, please send an email using the button below. Your email address won't be shared (unless you include it in the body of your comment). If you don't want your real name to be used next to your comment, please specify the name you would like to use. If you want your name to link to a particular url, include that as well.

bold, italics, and plain text are allowed in comments. A reasonable subset of markdown is supported, including lists, links, and fenced code blocks. In addition, math can be formatted using $(inline math)$ or $$(your display equation)$$.

Please use plaintext email when commenting. See Plaintext Email and Comments on this site for more. Note also that comments are expected to be open, considerate, and respectful.

Comment via email