5

How do I change the drawing area for my huion tablet? Everything works fine but but I have a dual monitor setup and the tablet area covers both monitors while I only want to to be on one.

Starting the wacom tablet app show I have no wacom tablet (well yeah, I don't) but there is no generel tablet app I could find.

Thanks in advance.

Balint
  • 51

4 Answers4

3

Found this, it fixed my issue which sounded similar to yours.
https://forum.kde.org/viewtopic.php?f=139&t=125532

Huion are violating* a USB standard by skimping on naming their stuff, so look for the generic numbers for their tablets. This is the code for HUION New 1060 for example: HID 256c:006e Pad

xinput  # get the IDs for all relevant pieces of my tablet.   

blah blah: HID 256c:006e Pad id=17
there might/should be two devices, Pad and Pen.

xrandr  # get the names of my displays  

look for the ones showing 'connected' like HDMI-A-0 connected
and maybe DisplayPort-2 connected

Then you tell xrandr to stick the id's to the screen you want Krita or Photoshop on, such as if you were using a HDMI port to main screen:

xinput map-to-output 13 HDMI-A-0
xinput map-to-output 14 HDMI-A-0  

that was mine.
it resets after a reboot. thanks to that user timotimo!

JRR
  • 31
2

Follow the instructions on the Arch Wiki for Calibrating Touchscreen. Tested on Huion 608, 420, H420.

To summarize:

  1. xinput list and find your device (ex. HUION 420 Pen Pen (0)). Try xinput list-props "Device Name" and make sure "Coordinate Transform Matrix" property is available.
  2. Now a little math is involved. (For those interested, you are specifying an affine transformation matrix of the device input in a homogeneous coordinate system.) From the wiki:
c0 = touch_area_width / total_width
c2 = touch_area_height / total_height
c1 = touch_area_x_offset / total_width
c3 = touch_area_y_offset / total_height

Matrix: [ c0 0 c1 ] [ 0 c2 c3 ] [ 0 0 1 ]

Represented as a row-major array: c0 0 c1 0 c2 c3 0 0 1

If you don't want to do any math just play around with the numbers until you get an area you like. For a smaller area, c0 and c2 will be greater than 1, and c1 and c3 may be small negative values (my tablet is less accurate towards the edge of the input region).

  1. Execute this command to set the area (put in .bashrc to auto-run)
xinput set-prop "Device Name" --type=float "Coordinate Transformation Matrix" c0 0 c1 0 c2 c3 0 0 1

For example:

xinput set-prop "HUION 420 Pen Pen (0)" --type=float "Coordinate Transformation Matrix" 1.5 0 -0.2 0 1.5 -0.2 0 0 1

See Ubuntu Wiki X/InputCoordinateTransformation for more info.

qwr
  • 2,802
0

Use 'xrestrict -I'. https://github.com/Ademan/xrestrict

It will tell you to click with the pointing device you want to restrict, on the display you want it restricted to. So just move the pen over to the drawing-screen and tap (click) it on the tablet. Done!

Snout
  • 11
0

As of writing this huion offers beta tablet drivers for Ubuntu. When this was originally posted I believe they did not.

Hello to the people who use ubuntu 22.4 and got lost trying to figure out the equivalent wayland commands for the xinput solutions.

After rebooting the drivers work great. I am able to adjust the screen sizes and buttons from the huion application. Never had the buttons working with the previous xinput solution I used. So that's nice to have now.

The screen adjustment threw my off at first. I tried to drag the window to the position, but it turns out you just click on it instead of dragging.

They have downloadable pdf with installation instructions. Pretty easy to follow. the only notable thing for the .deb package is requiring you to restart the machine. The tar package just has install and uninstall scripts.

I am specifically using the huion kanvas-13 or GT-133. But they offer drivers for most of their tablets. So yeah check it out, see if the linux drivers they have work for your tablet. https://www.huion.com/download

rn I think just ubuntu is supported. it also still says beta.