BytesOfProgress

Wiki


Mapping a Wacom Tablet to one specific monitor

When a Wacom Tablet is plugged into a Linux Computer with multiple screens, it is being mapped to all of them which makes it hard to write. Here is how to map it to one particular screen:

BUT: This way works only for xorg. If you are running wayland, you can configure these settings with "libinput". Some Desktop Environments do even have a GUI programm in their Wayland Version, which is specifically made to handle the libinput stuff for you! GNOME has full support for configuring buttons and mapping the tablet to a monitor. KDE Plasma has full support for configuring buttons and mapping the tablet to a monitor. You can read more about this here.


  $ xinput
    

The output should look somewhat like this:

  [user@host ~]$ xinput
  ⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
  ⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
  ⎜   ↳ bcm5974                                 	id=12	[slave  pointer  (2)]
  ⎜   ↳ SINO WEALTH Thunderobot KG3089 Consumer Control	id=13	[slave  pointer  (2)]
  ⎜   ↳ SINO WEALTH Thunderobot KG3089 Mouse    	id=18	[slave  pointer  (2)]
  ⎜   ↳ Logitech G305                           	id=19	[slave  pointer  (2)]
  ⎜   ↳ Wacom One by Wacom S Pen Pen (0)        	id=22	[slave  pointer  (2)]
  ⎣ Virtual core keyboard                   	id=3	[master keyboard (2)]
      ↳ Virtual core XTEST keyboard             	id=5	[slave  keyboard (3)]
      ↳ Power Button                            	id=6	[slave  keyboard (3)]
      ↳ Video Bus                               	id=7	[slave  keyboard (3)]
      ↳ Power Button                            	id=8	[slave  keyboard (3)]
      ↳ Lid Switch                              	id=9	[slave  keyboard (3)]
      ↳ Sleep Button                            	id=10	[slave  keyboard (3)]
      ↳ Apple Inc. Apple Internal Keyboard / Trackpad	id=11	[slave  keyboard (3)]
      ↳ SINO WEALTH Thunderobot KG3089 Consumer Control	id=14	[slave  keyboard (3)]
      ↳ SINO WEALTH Thunderobot KG3089 Keyboard 	id=15	[slave  keyboard (3)]
      ↳ SINO WEALTH Thunderobot KG3089 System Control	id=16	[slave  keyboard (3)]
      ↳ SINO WEALTH Thunderobot KG3089          	id=17	[slave  keyboard (3)]
      ↳ Logitech G305                           	id=20	[slave  keyboard (3)]
      ↳ Wacom One by Wacom                       	id=21	[slave  keyboard (3)]

We can see that in this case, the Wacom Tablet has the ID "21", and the pen of the tablet has the ID "22".

The next thing we want to do is finding out the name of the screen we want the tablet to be mapped to. We can do that by executing:


  $ xrandr
    

The output should look somewhat like this:

  [user@host ~]$ xrandr
  Screen 0: minimum 320 x 200, current 3360 x 1080, maximum 16384 x 16384
  eDP-1 connected 1440x900+1920+0 (normal left inverted right x axis y axis) 286mm x 179mm
    1440x900      59.84*+
    1400x900      59.96    59.88
    1440x810      60.00    59.97
    1368x768      59.88    59.85
    1280x800      59.99    59.97    59.81    59.91
    1280x720      60.00    59.99    59.86    59.74
    1024x768      60.04    60.00
    960x720       60.00
    928x696       60.05
    896x672       60.01
    1024x576      59.95    59.96    59.90    59.82
    960x600       59.93    60.00
    960x540       59.96    59.99    59.63    59.82
    800x600       60.00    60.32    56.25
    840x525       60.01    59.88
    864x486       59.92    59.57
    700x525       59.98
    800x450       59.95    59.82
    640x512       60.02
    700x450       59.96    59.88
    640x480       60.00    59.94
    720x405       59.51    58.99
    684x384       59.88    59.85
    640x400       59.88    59.98
    640x360       59.86    59.83    59.84    59.32
    512x384       60.00
    512x288       60.00    59.92
    480x270       59.63    59.82
    400x300       60.32    56.34
    432x243       59.92    59.57
    320x240       60.05
    360x202       59.51    59.13
    320x180       59.84    59.32
  DP-1 disconnected (normal left inverted right x axis y axis)
  HDMI-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 521mm x 293mm
    1920x1080     60.00*+  50.00    59.94
    1680x1050     59.88
    1600x900      60.00
    1280x1024     60.02
    1440x900      59.90
    1280x800      59.91
    1280x720      60.00    50.00    59.94
    1024x768      70.07    60.00
    800x600       72.19    60.32    56.25
    720x576       50.00
    720x480       60.00    59.94
    640x480       72.81    66.67    60.00    59.94
    720x400       70.08
  DP-2 disconnected (normal left inverted right x axis y axis)
  HDMI-2 disconnected (normal left inverted right x axis y axis)

We now see all of our screens connected to the Computer. We can also see our primary monitor which we want the tablet to be mapped to:


  HDMI-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 521mm x 293mm
    

Now we have all information needed to map the Wacom tablet to our primary screen only. Let's do it:


  $ xinput map-to-output "penID" "name-of-screen"
    

For my example the command would look like this:


  $ xinput map-to-output 22 HDMI-1
    

Congratulations! You now mapped your Wacom Tablet to one specific monitor! Happy writing, happy drawing!



back