# Using Wacom tablet with dual monitors (TwinView) in Ubuntu

I have a setup with two monitors on my computer and wanted to restrict my Wacom tablet to only one of the screens. Otherwise, the tablet is expanded to the entire two screens, making any drawing stretched.

This has shown to be quite simple to fix if you can live with a script doing the job for you. First, type the following in a terminal and note the output:

xinput --list

You will see a bunch of names for you peripheral devices. You should look for anything that has to do with “Wacom”. For instance, on my machine, I see these names:

⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
⎜   ↳ Wacom Graphire4 4x5 eraser              	id=12	[slave  pointer  (2)]
⎜   ↳ Wacom Graphire4 4x5 cursor              	id=13	[slave  pointer  (2)]
⎜   ↳ Wacom Graphire4 4x5 pad                 	id=14	[slave  pointer  (2)]
⎜   ↳ Wacom Graphire4 4x5 stylus              	id=15	[slave  pointer  (2)]

Now, create a file somewhere on your computer. I’ve put mine in a subdir of my home directory, naming it “wacom-settings.sh”. Add these contents to the file and change the name of each “Wacom…” to whatever you received as output above:

#!/bin/sh
xsetwacom --set "Wacom Graphire4 4x5 stylus" Twinview Horizontal
xsetwacom --set "Wacom Graphire4 4x5 stylus" Screen_No 0x001
xsetwacom --set "Wacom Graphire4 4x5 cursor" Twinview Horizontal
xsetwacom --set "Wacom Graphire4 4x5 cursor" Screen_No 0x001
xsetwacom --set "Wacom Graphire4 4x5 pad" Twinview Horizontal
xsetwacom --set "Wacom Graphire4 4x5 pad" Screen_No 0x001
xsetwacom --set "Wacom Graphire4 4x5 eraser" Twinview Horizontal
xsetwacom --set "Wacom Graphire4 4x5 eraser" Screen_No 0x001

Then you’ll just have to make the file executable. This could be done from terminal by issuing the command

chmod +x wacom-settings.sh

in the same directory as the file.

You could also right-click the file, select Properties > Permissions tab and check “Allow executing this file as a program”.

You might either add this file to your startup applications under System > Preferences > Startup Applications (this will only work if your tablet is connected when logging in) or you could add a launcher on either your desktop or in one of your panels by dragging the file there.

This should be it. To test that the configuration really works, double click the file and click “Run in Terminal”. If the tablet appears on the wrong screen, change the Screen_No above from  0x001 to 0x000.

Good luck with your notes and drawings!

## 16 thoughts on “Using Wacom tablet with dual monitors (TwinView) in Ubuntu”

1. Wally B Feed says:

It works! thanks man … wacom is restricted to my left monitor only (which is widescreen). Funny thing is that it only uses 1481px width of my 1680px wide left desktop. Actually I am pretty fine with it though cause the stretching problem would still be there with the full usage of the widescreen monitor … I use the 199px that are left for the layer dialogue.

2. Dawid Skrodzki says:

thank you so much for this helpful tip, its working great

3. beningh says:

When I run xinput –list I get:

⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ USB Optical Mouse id=10 [slave pointer (2)]
⎜ ↳ SynPS/2 Synaptics TouchPad id=12 [slave pointer (2)]
⎜ ↳ Macintosh mouse button emulation id=13 [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)]
↳ Sleep Button id=9 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=11 [slave keyboard (3)]
↳ Asus Laptop extra buttons id=14 [slave keyboard (3)]

Now what?

1. Seems like your OS doesn’t recognize your Wacom tablet. Are you using Ubuntu? (If so, which version?)

You could try starting your computer with the tablet connected. In earlier version of Ubuntu I think this was necessary, if I remember correctly.

4. Chris says:

Hi Sven,
Thanks for this how-to guide. I must be doing something wrong (not a code person). I’m running Ubuntu 11.04, and an Intuos 2 on two monitors. I put the below in a .sh file, made it executable, double clicked it and clicked run in terminal. It then just flashes a quick terminal widow that instantly disappears. If I then open terminal and look, I don’t see anything running, and the tablet is still covering both monitors. Any ideas where I screwed up?

﻿#!/bin/sh
xsetwacom –set “Wacom Intuos2 9×12 stylus” Twinview Horizontal
xsetwacom –set “Wacom Intuos2 9×12 stylus” Screen_No 0x001
xsetwacom –set “Wacom Intuos2 9×12 cursor” Twinview Horizontal
xsetwacom –set “Wacom Intuos2 9×12 cursor” Screen_No 0x001
xsetwacom –set “Wacom Intuos2 9×12 pad” Twinview Horizontal
xsetwacom –set “Wacom Intuos2 9×12 pad” Screen_No 0x001
xsetwacom –set “Wacom Intuos2 9×12 eraser” Twinview Horizontal
xsetwacom –set “Wacom Intuos2 9×12 eraser” Screen_No 0x

1. Have you tried running the commands one by one in a terminal? I believe there should be no output if the commands run correctly. At least, if anything is wrong (such as the name being misspelled) there should be some output warning you about this.

I would also try to change the Screen_No to 0x002 or 0x000 to see if that makes any difference. I haven’t played too much around with this myself, so I don’t know exactly how to troubleshoot this the best way, but please post back if you get any further or have any more questions 😉

1. Rob says:

Twinview and screen_no only works for nvidia drivers, it might be that.

2. Rob says:

Got it working with this
xinput set-prop "Wacom Intuos3 9x12 stylus" --type=float "Coordinate Transformation Matrix" 0.533333 0 0 0 1 0 0 0 1
with an ATI radeon card on Ubuntu 11.10

5. zelrik says:

I tried it for my intus3, now my pad just covers 1/4 of a screen instead of 1/2. I have 2 screens.

1. I’m guessing your monitors are not the same size? If they are not, you might have to override the width of your setup. Sadly, this is a bit messy to set up with the tablets, but it is doable. There is a guide over at the Ubuntu forums:
http://ubuntuforums.org/showpost.php?p=10299356&postcount=33

Basically you’ll need to run
xsetwacom –set “Name of your Wacom device” TopX -30720
xsetwacom –set “Name of your Wacom device” BottomX 24576
with suitable numbers that you might get by following the guide from the forums.

I hope someone will create a GUI for this kind of customizing one day…

6. Thanks for this page. It is almost perfect. The tablet covers a tiny bit on the 2nd screen but nothing dramatic. much easier to work with.
Having 2 27″ screens it was bizarre no true relation ship between horizontal and vertical

7. Run xrandr to determine which screen you want to use with tablet.
Then use MapToOutput parameter.

#!/bin/sh xsetwacom --set "Serial Wacom Tablet stylus" MapToOutput LVDS1 xsetwacom --set "Serial Wacom Tablet eraser" MapToOutput LVDS1 

8. I created a gui that will generate a shell script or alternatively set the configuration. However, I noticed that the wacom configuration panel in the most current ubuntu version allows to limit the pad to one of the screens.

9. The default behaviour of the xorg xinput system is to map all input devices to the entire extended desktop. However, in general the correct service to configure is the Xinput system. Its been part of the xorg xwindow system for many many years.

Xinput has a Coordinate Transformation Matrix that should be re-configured by the user to restrict the mapping of pen and touch tablets to a particular area of your desktop. So actually there is no bug or lack of features for support of pen tablets with multiple monitor setups on Linux.

It’s just a little complicated for the average user to do this by hand.

In my opinion Ubuntu went the way wrong by integrating a specific GUI only for Wacom devices… because xorg xinput has supported this kind of mapping for years. Its just a little bit hidden to the average user.

So we started developing a very simple GUI tool to select which screen to use with a pen or touch device, or any kind of absolute pointer input device for that matter, please take a look here:

http://wenhsinjen.github.io/ptxconf/

Should be super easy to just click the monitor you want to map to, however we just started this project so let us know if it works for you or not. We’ll fix it straight away if there is a problem.

1. Great stuff! A simple GUI like this is something that should have been around a long time ago. And it’s awesome that you’ve looked into the details of how to do this on the X level, rather than fixing it only for a specific brand of tablet.

I haven’t been using my tablet for some time now, but I’ll definitely check it out the next time I do.