Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pointer area is not a rectangle #322

Open
petaflot opened this issue Nov 3, 2023 · 6 comments
Open

pointer area is not a rectangle #322

petaflot opened this issue Nov 3, 2023 · 6 comments

Comments

@petaflot
Copy link

petaflot commented Nov 3, 2023

in absolute mode, it is clear that the corners of the pointer Area are not those of a rectangle : there is a small but noticeable offset that makes to tool useless for production purposes, and therefore just a fancy toy.

I could not find an option to calibrate the "corners" of the tablet/sensor, does it even exist?

@jigpu
Copy link
Member

jigpu commented Nov 30, 2023

Can you share what tablet you are using? Getting the VID/PID in particular would be most helpful -- please share the output from cat /proc/bus/input/devices in an attachment.

Some display tablets are manufactured with the sensor slightly larger than the display. We normally account for this in the kernel driver so that when the pen reports proper min/max values at the screen corners. Its possible that we are not applying this correction for your particular device (and more likely with older devices where we have less info on whether the offset is needed or not).

@petaflot
Copy link
Author

petaflot commented Dec 2, 2023

tablet has no display, just a black surface with a number of white dots arranged in an oddly-sized non-square grid

I: Bus=0003 Vendor=056a Product=037a Version=0110
N: Name="Wacom One by Wacom S Pen"
P: Phys=usb-0000:00:1a.0-1.6.4/input0
S: Sysfs=/devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.6/3-1.6.4/3-1.6.4:1.0/0003:056A:037A.000B/input/input30
U: Uniq=1GA00L1140859
H: Handlers=mouse0 event18
B: PROP=1
B: EV=b
B: KEY=1c03 0 0 0 0 0
B: ABS=3000003

@jigpu
Copy link
Member

jigpu commented Dec 5, 2023

In that case, can you share more about your test setup? I don't understand what you mean by the corners having an offset, unless you mean that the sensor is offset from the white dots --- which is a manufacturing issue, not a driver issue.

@petaflot
Copy link
Author

petaflot commented Dec 6, 2023

setup is... hardware mentioned above (tablet is WACOM TCL-472), for now I have configured the transformation matrix with https://github.com/petaflot/input_scaling to a centered physical 1:1 portion of the display

dessin

the suggestion at #323 to use xsetwacom set <id> area <x1> <y1> <x2> <y2> does not work precisely because it's not a rectangle, it is still a linear transform but it has some perspective.

I just realized I should be able to fix this with https://en.wikipedia.org/wiki/Transformation_matrix#/media/File:Perspective_transformation_matrix_2D.svg (case 2) unless I missed something. maybe don't close the issue right now, this way I can write a procedure to calibrate such devices.

@petaflot
Copy link
Author

petaflot commented Dec 6, 2023

ok.. so I was planning on going for the more general case (case 4) but even this is not the most general case because some input coordinates have a value of 0.

does the driver report negative (off-screen) values? this would really help.

@Pinglinux
Copy link
Member

The tablet doesn't report negative values. Do you get the correct maximum (x,y) on the edges of the tablet? If those values are correct, the issue would be in the system's display mapping process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants