tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: troubles with an USB touch screen



Dear Manuel,

On 2014-07-16, Manuel Bouyer wrote:
> Hello,
> I have a USB touch screen, which I have trouble getting working
> properly (under -current). It reports itself as:
> uhidev0 at uhub0 port 1 configuration 1 interface 0
> uhidev0: N-trig DuoSense, rev 2.00/21.00, addr 2, iclass 3/0
> uhidev0: 10 report ids
> uhid at uhidev0 reportid 1 not configured
> uhid at uhidev0 reportid 2 not configured
> uhid at uhidev0 reportid 3 not configured
> uhid at uhidev0 reportid 4 not configured
> uhid at uhidev0 reportid 5 not configured
> uhid at uhidev0 reportid 6 not configured
> uhid at uhidev0 reportid 7 not configured
> uhid at uhidev0 reportid 8 not configured
> uhid at uhidev0 reportid 9 not configured
> uhid at uhidev0 reportid 10 not configured
> uhidev1 at uhub0 port 1 configuration 1 interface 1
> uhidev1: N-trig DuoSense, rev 2.00/21.00, addr 2, iclass 3/0
> uhidev1: 24 report ids
> ums0 at uhidev1 reportid 1: 3 buttons digitizer, tip, barrel, eraser
> wsmouse0 at ums0 mux 0
> uts0 at uhidev1 reportid 2wsmouse1 at uts0 mux 0
> uts1 at uhidev1 reportid 3wsmouse2 at uts1 mux 0
> uhid at uhidev1 reportid 4 not configured
> uhid at uhidev1 reportid 10 not configured
> uhid at uhidev1 reportid 11 not configured
> uhid at uhidev1 reportid 12 not configured
> uhid at uhidev1 reportid 13 not configured
> uhid at uhidev1 reportid 14 not configured
> uhid at uhidev1 reportid 15 not configured
> uhid at uhidev1 reportid 16 not configured
> uhid at uhidev1 reportid 17 not configured
> uhid at uhidev1 reportid 20 not configured
> uhid at uhidev1 reportid 21 not configured
> uhid at uhidev1 reportid 23 not configured
> uhid at uhidev1 reportid 24 not configured
> 
> (BTW, there's a missing \n somewhere :)
> With cat | od -x, I can see that only wsmouse1 is producing events,
> but that may be different under X11. X11 is using /dev/wsmouse (i.e. the mux).
> 
> The touch screen seems to be badly calibrated: touching the upper left
> corner seems to properly place the cursor at 0 0, but touching a bit to the
> righ or the bottom immediately moves the cursor to the right or the bottom
> of the screen (or to the bottom right corner). In addition,
> it seems to get events even if I don't touch the screen.
> 
> Here's a xev -root output (it's a bare X11 server, no windows) when a tap
> close to the upper left corner:
>       MotionNotify event, serial 18, synthetic NO, window 0xe2,
>           root 0xe2, subw 0x0, time 937301, (54,799), root:(54,799),
>           state 0x0, is_hint 0, same_screen YES
> 
>       MotionNotify event, serial 18, synthetic NO, window 0xe2,
>           root 0xe2, subw 0x0, time 937301, (54,248), root:(54,248),
>           state 0x0, is_hint 0, same_screen YES
> 
>       ButtonPress event, serial 18, synthetic NO, window 0xe2,
>           root 0xe2, subw 0x0, time 937353, (54,248), root:(54,248),
>           state 0x0, button 1, same_screen YES
> 
>       MotionNotify event, serial 18, synthetic NO, window 0xe2,
>           root 0xe2, subw 0x0, time 937506, (54,247), root:(54,247),
>           state 0x100, is_hint 0, same_screen YES
> 
>       MotionNotify event, serial 18, synthetic NO, window 0xe2,
>           root 0xe2, subw 0x0, time 938121, (55,247), root:(55,247),
>           state 0x100, is_hint 0, same_screen YES
> 
>       MotionNotify event, serial 18, synthetic NO, window 0xe2,
>           root 0xe2, subw 0x0, time 938121, (55,246), root:(55,246),
>           state 0x100, is_hint 0, same_screen YES
> 
>       MotionNotify event, serial 18, synthetic NO, window 0xe2,
>           root 0xe2, subw 0x0, time 938326, (55,245), root:(55,245),
>           state 0x100, is_hint 0, same_screen YES
> 
>       MotionNotify event, serial 18, synthetic NO, window 0xe2,
>           root 0xe2, subw 0x0, time 938531, (55,246), root:(55,246),
>           state 0x100, is_hint 0, same_screen YES
> 
>       MotionNotify event, serial 18, synthetic NO, window 0xe2,
>           root 0xe2, subw 0x0, time 938736, (56,246), root:(56,246),
>           state 0x100, is_hint 0, same_screen YES
> 
>       MotionNotify event, serial 18, synthetic NO, window 0xe2,
>           root 0xe2, subw 0x0, time 938736, (56,244), root:(56,244),
>           state 0x100, is_hint 0, same_screen YES
> 
>       MotionNotify event, serial 18, synthetic NO, window 0xe2,
>           root 0xe2, subw 0x0, time 938941, (57,244), root:(57,244),
>           state 0x100, is_hint 0, same_screen YES
> 
>       MotionNotify event, serial 18, synthetic NO, window 0xe2,
>           root 0xe2, subw 0x0, time 938941, (57,243), root:(57,243),
>           state 0x100, is_hint 0, same_screen YES
> 
> 
> Here's what I get if I drag starting from upper right to bottom left:
> 
> 
>       MotionNotify event, serial 18, synthetic NO, window 0xe2,
>           root 0xe2, subw 0x0, time 814601, (1279,799), root:(1279,799),
>           state 0x0, is_hint 0, same_screen YES
> 
>       MotionNotify event, serial 18, synthetic NO, window 0xe2,
>           root 0xe2, subw 0x0, time 814601, (1279,218), root:(1279,218),
>           state 0x0, is_hint 0, same_screen YES
> 
>       ButtonPress event, serial 18, synthetic NO, window 0xe2,
>           root 0xe2, subw 0x0, time 814653, (1279,218), root:(1279,218),
>           state 0x0, button 1, same_screen YES
> 
>       MotionNotify event, serial 18, synthetic NO, window 0xe2,
>           root 0xe2, subw 0x0, time 814806, (1279,218), root:(1279,218),
>           state 0x100, is_hint 0, same_screen YES
> 
>       MotionNotify event, serial 18, synthetic NO, window 0xe2,
>           root 0xe2, subw 0x0, time 814806, (1279,226), root:(1279,226),
>           state 0x100, is_hint 0, same_screen YES
> 
>       MotionNotify event, serial 18, synthetic NO, window 0xe2,
>           root 0xe2, subw 0x0, time 815011, (1279,226), root:(1279,226),
>           state 0x100, is_hint 0, same_screen YES
> 
>       MotionNotify event, serial 18, synthetic NO, window 0xe2,
>           root 0xe2, subw 0x0, time 815011, (1279,234), root:(1279,234),
>           state 0x100, is_hint 0, same_screen YES
> 
>       MotionNotify event, serial 18, synthetic NO, window 0xe2,
>           root 0xe2, subw 0x0, time 815216, (1279,234), root:(1279,234),
>           state 0x100, is_hint 0, same_screen YES
> 
>       MotionNotify event, serial 18, synthetic NO, window 0xe2,
>           root 0xe2, subw 0x0, time 815216, (1279,239), root:(1279,239),
>           state 0x100, is_hint 0, same_screen YES
> 
>       MotionNotify event, serial 18, synthetic NO, window 0xe2,
>           root 0xe2, subw 0x0, time 815421, (1279,239), root:(1279,239),
>           state 0x100, is_hint 0, same_screen YES
> 
>       MotionNotify event, serial 18, synthetic NO, window 0xe2,
>           root 0xe2, subw 0x0, time 815421, (1279,248), root:(1279,248),
>           state 0x100, is_hint 0, same_screen YES
> 
>       MotionNotify event, serial 18, synthetic NO, window 0xe2,
>           root 0xe2, subw 0x0, time 815626, (1279,248), root:(1279,248),
>           state 0x100, is_hint 0, same_screen YES
> 
>       MotionNotify event, serial 18, synthetic NO, window 0xe2,
>           root 0xe2, subw 0x0, time 815626, (1279,259), root:(1279,259),
>           state 0x100, is_hint 0, same_screen YES
> 
>       MotionNotify event, serial 18, synthetic NO, window 0xe2,
>           root 0xe2, subw 0x0, time 815831, (1279,259), root:(1279,259),
>           state 0x100, is_hint 0, same_screen YES
> 
>       MotionNotify event, serial 18, synthetic NO, window 0xe2,
>           root 0xe2, subw 0x0, time 815831, (1279,266), root:(1279,266),
>           state 0x100, is_hint 0, same_screen YES
> 
>       MotionNotify event, serial 18, synthetic NO, window 0xe2,
>           root 0xe2, subw 0x0, time 816036, (1279,266), root:(1279,266),
>           state 0x100, is_hint 0, same_screen YES
> 
>       MotionNotify event, serial 18, synthetic NO, window 0xe2,
>           root 0xe2, subw 0x0, time 816036, (1279,267), root:(1279,267),
>           state 0x100, is_hint 0, same_screen YES
> 
>       MotionNotify event, serial 18, synthetic NO, window 0xe2,
>           root 0xe2, subw 0x0, time 816241, (1279,267), root:(1279,267),
>           state 0x100, is_hint 0, same_screen YES
> 
>       MotionNotify event, serial 18, synthetic NO, window 0xe2,
>           root 0xe2, subw 0x0, time 816241, (1279,274), root:(1279,274),
>           state 0x100, is_hint 0, same_screen YES
> 
>       MotionNotify event, serial 18, synthetic NO, window 0xe2,
>           root 0xe2, subw 0x0, time 816446, (1279,274), root:(1279,274),
>           state 0x100, is_hint 0, same_screen YES
> 
>       MotionNotify event, serial 18, synthetic NO, window 0xe2,
>           root 0xe2, subw 0x0, time 816446, (1279,281), root:(1279,281),
>           state 0x100, is_hint 0, same_screen YES
> 
>       MotionNotify event, serial 18, synthetic NO, window 0xe2,
>           root 0xe2, subw 0x0, time 816651, (1279,281), root:(1279,281),
>           state 0x100, is_hint 0, same_screen YES
> 
>       MotionNotify event, serial 18, synthetic NO, window 0xe2,
>           root 0xe2, subw 0x0, time 816651, (1279,287), root:(1279,287),
>           state 0x100, is_hint 0, same_screen YES
> 
>       MotionNotify event, serial 18, synthetic NO, window 0xe2,
>           root 0xe2, subw 0x0, time 816856, (1279,287), root:(1279,287),
>           state 0x100, is_hint 0, same_screen YES
> 
>       MotionNotify event, serial 18, synthetic NO, window 0xe2,
>           root 0xe2, subw 0x0, time 816856, (1279,298), root:(1279,298),
>           state 0x100, is_hint 0, same_screen YES
> 
>       MotionNotify event, serial 18, synthetic NO, window 0xe2,
>           root 0xe2, subw 0x0, time 817061, (1279,298), root:(1279,298),
>           state 0x100, is_hint 0, same_screen YES
> 
>       MotionNotify event, serial 18, synthetic NO, window 0xe2,
>           root 0xe2, subw 0x0, time 817061, (1279,504), root:(1279,504),
>           state 0x100, is_hint 0, same_screen YES
> 
>       MotionNotify event, serial 18, synthetic NO, window 0xe2,
>           root 0xe2, subw 0x0, time 817266, (1279,504), root:(1279,504),
>           state 0x100, is_hint 0, same_screen YES
> 
>       MotionNotify event, serial 18, synthetic NO, window 0xe2,
>           root 0xe2, subw 0x0, time 817266, (1279,739), root:(1279,739),
>           state 0x100, is_hint 0, same_screen YES
> 
>       MotionNotify event, serial 18, synthetic NO, window 0xe2,
>           root 0xe2, subw 0x0, time 817471, (1279,739), root:(1279,739),
>           state 0x100, is_hint 0, same_screen YES
> 
>       MotionNotify event, serial 18, synthetic NO, window 0xe2,
>           root 0xe2, subw 0x0, time 817471, (1279,799), root:(1279,799),
>           state 0x100, is_hint 0, same_screen YES
> 
>       MotionNotify event, serial 18, synthetic NO, window 0xe2,
>           root 0xe2, subw 0x0, time 817676, (1279,799), root:(1279,799),
>           state 0x100, is_hint 0, same_screen YES
> 
>       MotionNotify event, serial 18, synthetic NO, window 0xe2,
>           root 0xe2, subw 0x0, time 817676, (1279,799), root:(1279,799),
>           state 0x100, is_hint 0, same_screen YES
> 
>       MotionNotify event, serial 18, synthetic NO, window 0xe2,
>           root 0xe2, subw 0x0, time 817881, (1279,799), root:(1279,799),
>           state 0x100, is_hint 0, same_screen YES
> 
>       MotionNotify event, serial 18, synthetic NO, window 0xe2,
>           root 0xe2, subw 0x0, time 817881, (1279,799), root:(1279,799),
>           state 0x100, is_hint 0, same_screen YES
> 
>       ButtonRelease event, serial 18, synthetic NO, window 0xe2,
>           root 0xe2, subw 0x0, time 817881, (1279,799), root:(1279,799),
>           state 0x100, button 1, same_screen YES
> 
>       MotionNotify event, serial 18, synthetic NO, window 0xe2,
>           root 0xe2, subw 0x0, time 818086, (1279,799), root:(1279,799),
>           state 0x0, is_hint 0, same_screen YES
> 
>       MotionNotify event, serial 18, synthetic NO, window 0xe2,
>           root 0xe2, subw 0x0, time 818086, (1279,799), root:(1279,799),
>           state 0x0, is_hint 0, same_screen YES
> 
>       ButtonPress event, serial 18, synthetic NO, window 0xe2,
>           root 0xe2, subw 0x0, time 818143, (1279,799), root:(1279,799),
>           state 0x0, button 1, same_screen YES
> 
>       MotionNotify event, serial 18, synthetic NO, window 0xe2,
>           root 0xe2, subw 0x0, time 818291, (1279,799), root:(1279,799),
>           state 0x100, is_hint 0, same_screen YES
> 
>       MotionNotify event, serial 18, synthetic NO, window 0xe2,
>           root 0xe2, subw 0x0, time 818291, (1279,799), root:(1279,799),
>           state 0x100, is_hint 0, same_screen YES
> 
>       MotionNotify event, serial 18, synthetic NO, window 0xe2,
>           root 0xe2, subw 0x0, time 818496, (1279,799), root:(1279,799),
>           state 0x100, is_hint 0, same_screen YES
> 
>       MotionNotify event, serial 18, synthetic NO, window 0xe2,
>           root 0xe2, subw 0x0, time 818496, (1279,799), root:(1279,799),
>           state 0x100, is_hint 0, same_screen YES
> 
>       ButtonRelease event, serial 18, synthetic NO, window 0xe2,
>           root 0xe2, subw 0x0, time 818496, (1279,799), root:(1279,799),
>           state 0x100, button 1, same_screen YES
> 
> note that X didn't move out of 1279
> Any idea what can be done to get this working properly ?

Which X mouse driver are you using?

What does "xinput list" output?
(And also "xinput list Mouse0" for Mouse0, change to whatever your mouse is
 called in "xinput list".)

I needed to use ws(4):

$ cat /etc/X11/xorg.conf
Section "InputDevice"
 Identifier "WSMouse"
 Driver "ws"
 Option "AutoServerLayout" "true"
 Option "Device" "/dev/wsmouse"
EndSection

If "xinput list WSMouse" (adjust as needed) includes "Type is TOUCHSCREEN"
then you should be able to

 xinput --set-prop --type=int --format=32 WSMouse \
   "WS Pointer Axis Calibration" 0 1279 0 799

or something like that.  Here "WSMouse" is the identifier for the device in
/etc/X11/xorg.conf.  If I understood correctly, "1279" and "799" need to be
set much higher for your device.  If I remember correctly, the device needs
to be attached before starting X.

I hope this information is of some use.

-- 
Kind regards,

Yorick Hardy


Home | Main Index | Thread Index | Old Index