22

I am using Ubuntu 12.10 and I am running dual screens(23inch and 15 inch). I have a wacom intuos 2 9x12 that will will not map correctly to my second monitor which is also 9x12(1400x1050). The reason I need to solve this is because I have created a homemade cintiq and I draw on the screen (you can see what I'm talking about here: http://forum.bongofish.co.uk/index.php?topic=2096.0). The pen matches quite accurately on the x axis of my screen, so I believe the width of my wacom tablet area is okay. I think the problem is the y axis of my wacom. The cursor matches my pen towards the bottom of the screen, but as I move to the top of the screen, the distance from my pen tip to the cursor increases(the cursor is about 1 inch below pen when at top of screen).

I have looked on the Internet for hours trying to find a solution and I cannot find any.

Also, I want to say that this problem only happens in Ubuntu, I also have Windows 7 installed, and the wacom matches the screen perfectly. I'm also a complete noob to linux so I don't know much about navigating terminal.

7 Answers 7

32

First, determine how your system recognizes your tablet.
In a terminal enter: xsetwacom --list devices

Wacom BambooPT 2FG 4x5 Pen stylus id: 10 type: STYLUS
Wacom BambooPT 2FG 4x5 Finger touch id: 11 type: TOUCH
Wacom BambooPT 2FG 4x5 Pad pad id: 12 type: PAD
Wacom BambooPT 2FG 4x5 Pen eraser id: 17 type: ERASER

Next determine which display or "output" to map your tablet to in your systems display settings or in the terminal with xrandr --listactivemonitors
on my system that shows:

0: +*HDMI-2 1920/521x1080/293+1600+0 HDMI-2
1: +HDMI-1 1600/443x900/249+0+0 HDMI-1

Finally, using the information you just gathered, use xsetwacom --set "[YourWacomDevice]" MapToOutput [your display] (repeat for each device listed ).

[YourWacomDevice] = device name or id:#

so, for me that would be

xsetwacom --set "10" MapToOutput HDMI-2
xsetwacom --set "11" MapToOutput HDMI-2
xsetwacom --set "12" MapToOutput HDMI-2
xsetwacom --set "17" MapToOutput HDMI-2

Since these settings aren't kept after a reboot, you may want to save them in a script that runs on startup.


Using xsetwacom --help lists possible options and commands. With the --list parameters command, we can see a list of all the supported parameters. Near the end of that list is MapToOutput - Map the device to the given output.

man xsetwacom will display it's manual entry or you can read it here

for more information about identifying and configuring displays with xrandr read this question

Thanks to @RyanWC and @user1355 for pointing me in the right direction.

6
  • Note that it is usually sufficient to re-map the resolution of the stylus, i.e. in your example that would be xsetwacom --set 10 MapToOutput HDMI-2
    – Alf
    Oct 29, 2019 at 21:03
  • 1
    Note that xsetwacom also accepts the name Wacom BambooPT 2FG 4x5 Pen as input, which is a better identifier in a script. The id might change if you change your input devices. Jan 22, 2021 at 12:03
  • 1
    If you get the error "Unable to find an output..." and use NVidia drivers try this unix.stackexchange.com/questions/318066/…
    – Rob Mosher
    Dec 2, 2022 at 18:21
  • You can also do xsetwacon --set <id> MapToOutput next to just cycle through the screens until you get the one you want, which is usually what I end up doing. Oct 25, 2023 at 20:49
  • It works perfectly, thank you! I have a question: the default for me was to map the tablet to both my monitors, combined (one next to the other). So, what command should I give to go back to this setting? In other words, what should be the argument of MapToOutput, to have the area of the tablet mapped to the total combined monitors area?
    – Fabio
    Feb 21 at 15:07
7

Don't know if this will help you, but I have a script with the following in it:

xsetwacom set "Wacom BambooFun 6x8 stylus" MapToOutput HEAD-0
xsetwacom set "Wacom BambooFun 6x8 eraser" MapToOutput HEAD-0

Which seems to correctly map the stylus and eraser to my primary monitor. I don't remember where I originally got it nor if I had to do any configuration before it worked.

Running the script on startup seems fine to me.

1
  • Could you provide additional screen shots to your answer? Your answer would be more credible since you cannot grant either the source or the location of which you got this fix from.
    – Virusboy
    Nov 28, 2014 at 20:16
6

I found out what my problem was. Intuos2 wacom tablets have an allocated portion of the tablet area that is meant for custom buttons that work with the pen.

In windows, they are configured to be seen. In Ubuntu, the section is included as being a part of the area and this distorts the mapping. To fix it, I had to configure my xsetwacom "device name" Area 0 0 30480 24060 to Area 0 1400 30480 24060.

I still would like to know how to make the changes permanent. All I can do now is do a startup script that does this, but it doesn't work very well.

2
  • Works for me on ubuntu 20.04 LTS with 2 monitors and nvidia controllers: -15200 0 15200 9500 for use in second screen only.
    – momo2047
    Dec 21, 2021 at 23:38
  • I changed the Mode to Absolute and it mapped the area correctly. ex xsetwacom --set "15" "Mode" "Absolute"
    – Shmalex
    Mar 5, 2023 at 4:51
5

Here is a small bash-script, based on Starbucks answer, that changes the monitor output of all wacom devices to your main monitor (or the id of a given monitor, if provided as an argument).

#!/bin/bash

#check if monitor number was given
if test -z "$1" 
then
  #no monitor number was given, use the main display
  MON_NO=0
else
  MON_NO=$1
fi


#get connection of monitor with number $MON_NO
MON_CON=$(xrandr --listactivemonitors | grep "$MON_NO:" | tr -s " " | cut -d " " -f 5)

#check if monitors id could be found
if test -z "$MON_CON"
then
  #no monitor with given number found!
  echo "no monitor with number $MON_NO was found!"
  MON_COUNT=$(xrandr --listactivemonitors | grep "Monitors:" | cut -d " " -f 2)
  echo "(A total of $MON_COUNT monitors were found.)"
  exit -1
fi

#for each id of wacom devices set correct output monitor
xsetwacom list devices |
while IFS= read -r line; do
  #get id of wacom device in line
  WACOM_ID="$(echo $line | sed 's/.*id: //' | cut -d " " -f 1)"
  #set monitor as output
  xsetwacom --set $WACOM_ID MapToOutput $MON_CON
done

echo "Changed monitor for all wacom devices."
0

I had an issue of this kind and it got completely resolved when on log-in I just selected that I want to use Wayland. No change of settings files needed, no figuring out what the main monitor is, just a 1-click-solution. Credit goes to this answer, look it up for more info

0

I tried to solve this by automating this using a basic python script https://github.com/jision/XinputStylusOutputToggle

0
-1

This may be a little late, but I just made a simple python script that will rotate which monitor your device is bound to. Currently, Linux is the only OS supported, but you can make pull requests. You can find it here: wacom-input-screen-switcher

A python program to change what screen your tablet is mapped to. Usually invoked by a button on the tablet. Linux is currently the only OS supported. You will need to install screeninfo with pip for it to work. I currently do not have an automated install script for that. You will need to install it for python3 since that is what this code uses.

pip install screeninfo

Example of key binding:

In a startup script issue the command:

xsetwacom --set <id or name of device pad (of "type: PAD") here> button 2 key XF86WWW

Then have your system run wiss.py when you press that button.

1
  • 3
    Welcome to Ask Ubuntu! ;-) You should edit that answer and provide the source code and install instructions here on the site. You can always leave a link to your original as a source reference for your answer...
    – Fabby
    May 7, 2017 at 20:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .