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

Emulated tablet is mishandled in openQA hardware tests #9563

Closed
marmarek opened this issue Nov 7, 2024 · 14 comments · Fixed by QubesOS/qubes-app-linux-input-proxy#34
Closed
Assignees
Labels
affects-4.3 This issue affects Qubes OS 4.3. C: infrastructure C: tests diagnosed Technical diagnosis has been performed (see issue comments). P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. pr submitted A pull request has been submitted for this issue. r4.2-host-cur-test r4.2-vm-bookworm-cur-test r4.2-vm-fc39-cur-test r4.2-vm-fc40-cur-test r4.2-vm-fc41-cur-test r4.2-vm-trixie-cur-test r4.3-host-cur-test r4.3-vm-bookworm-cur-test r4.3-vm-fc39-cur-test r4.3-vm-fc40-cur-test r4.3-vm-fc41-cur-test r4.3-vm-trixie-cur-test T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists.

Comments

@marmarek
Copy link
Member

marmarek commented Nov 7, 2024

Observation

openQA test in scenario qubesos-4.3-pull-requests-x86_64-system_tests_gui_tools@hw7 fails in
qui_widgets_clipboard

Mouse moves in wrong positions, for example trying to move to the right bottom corner moves it somewhere in the middle of the screen.

Reproducible

Fails since (at least) Build 2024110705-4.3

Expected result

Last good: 2024110421-4.3 (or more recent)

Further details

Always latest result in this scenario: latest

https://openqa.qubes-os.org/tests/117793#investigation shows interesting diff:

-xorg-x11-drv-wacom-1.2.2-2.fc41.x86_64
-xorg-x11-drv-wacom-serial-support-1.2.2-2.fc41.x86_64
+xorg-x11-drv-wacom-1.2.3-1.fc41.x86_64
+xorg-x11-drv-wacom-serial-support-1.2.3-1.fc41.x86_64

This looks relevant. Inspecting X log shows the tablet used libinput driver before and now it uses wacom driver.

Logs

Old (good):

[    34.405] (II) config/udev: Adding input device sys-usb: marmarek RPi4 USB Gadget (/dev/input/event6)
[    34.405] (**) sys-usb: marmarek RPi4 USB Gadget: Applying InputClass "evdev tablet catchall"
[    34.405] (**) sys-usb: marmarek RPi4 USB Gadget: Applying InputClass "libinput tablet catchall"
[    34.405] (II) Using input driver 'libinput' for 'sys-usb: marmarek RPi4 USB Gadget'
[    34.405] (**) sys-usb: marmarek RPi4 USB Gadget: always reports core events
[    34.405] (**) Option "Device" "/dev/input/event6"
[    34.406] (II) event6  - sys-usb: marmarek RPi4 USB Gadget: is tagged by udev as: Tablet
[    36.097] (II) event6  - sys-usb: marmarek RPi4 USB Gadget: tablet 'sys-usb: marmarek RPi4 USB Gadget' unknown to libwacom
[    36.097] (II) event6  - sys-usb: marmarek RPi4 USB Gadget: device is a tablet
[    36.097] (II) event6  - sys-usb: marmarek RPi4 USB Gadget: device removed
[    36.119] (**) Option "config_info" "udev:/sys/devices/virtual/input/input22/event6"
[    36.119] (II) XINPUT: Adding extended input device "sys-usb: marmarek RPi4 USB Gadget" (type: TABLET, id 12)
[    36.120] (II) event6  - sys-usb: marmarek RPi4 USB Gadget: is tagged by udev as: Tablet
[    36.154] (II) event6  - sys-usb: marmarek RPi4 USB Gadget: tablet 'sys-usb: marmarek RPi4 USB Gadget' unknown to libwacom
[    36.155] (II) event6  - sys-usb: marmarek RPi4 USB Gadget: device is a tablet
[    36.155] (II) config/udev: Adding input device sys-usb: marmarek RPi4 USB Gadget (/dev/input/mouse2)
[    36.155] (II) No input driver specified, ignoring this device.
[    36.155] (II) This device may have been added with another device file.
[    36.155] (II) config/udev: Adding input device sys-usb: marmarek RPi4 USB Gadget Mouse (/dev/input/event7)
[    36.155] (**) sys-usb: marmarek RPi4 USB Gadget Mouse: Applying InputClass "evdev pointer catchall"
[    36.155] (**) sys-usb: marmarek RPi4 USB Gadget Mouse: Applying InputClass "libinput pointer catchall"
[    36.155] (II) Using input driver 'libinput' for 'sys-usb: marmarek RPi4 USB Gadget Mouse'
[    36.155] (**) sys-usb: marmarek RPi4 USB Gadget Mouse: always reports core events
[    36.155] (**) Option "Device" "/dev/input/event7"
[    36.156] (II) event7  - sys-usb: marmarek RPi4 USB Gadget Mouse: is tagged by udev as: Mouse
[    36.156] (II) event7  - sys-usb: marmarek RPi4 USB Gadget Mouse: device is a pointer
[    36.156] (II) event7  - sys-usb: marmarek RPi4 USB Gadget Mouse: device removed
...
[    37.782] (II) Using input driver 'libinput' for 'sys-usb: marmarek RPi4 USB Gadget'
[    37.782] (**) sys-usb: marmarek RPi4 USB Gadget: always reports core events
[    37.782] (**) Option "Device" "/dev/input/event6"
[    37.783] (II) event6  - sys-usb: marmarek RPi4 USB Gadget: is tagged by udev as: Tablet
[    37.839] (II) event6  - sys-usb: marmarek RPi4 USB Gadget: tablet 'sys-usb: marmarek RPi4 USB Gadget' unknown to libwacom
[    37.839] (II) event6  - sys-usb: marmarek RPi4 USB Gadget: device is a tablet
[    37.839] (II) event6  - sys-usb: marmarek RPi4 USB Gadget: device removed
[    37.853] (**) Option "config_info" "udev:/sys/devices/virtual/input/input22/event6"
[    37.853] (II) XINPUT: Adding extended input device "sys-usb: marmarek RPi4 USB Gadget" (type: TABLET, id 12)
[    37.854] (II) event6  - sys-usb: marmarek RPi4 USB Gadget: is tagged by udev as: Tablet
[    37.890] (II) event6  - sys-usb: marmarek RPi4 USB Gadget: tablet 'sys-usb: marmarek RPi4 USB Gadget' unknown to libwacom
[    37.890] (II) event6  - sys-usb: marmarek RPi4 USB Gadget: device is a tablet
[    37.891] (II) config/udev: removing device sys-usb: marmarek RPi4 USB Gadget Mouse
[    37.891] (II) event7  - sys-usb: marmarek RPi4 USB Gadget Mouse: device removed
[    37.904] (II) UnloadModule: "libinput"
[    37.904] (II) config/udev: Adding input device sys-usb: marmarek RPi4 USB Gadget Mouse (/dev/input/event7)
[    37.904] (**) sys-usb: marmarek RPi4 USB Gadget Mouse: Applying InputClass "evdev pointer catchall"
[    37.904] (**) sys-usb: marmarek RPi4 USB Gadget Mouse: Applying InputClass "libinput pointer catchall"
[    37.904] (II) Using input driver 'libinput' for 'sys-usb: marmarek RPi4 USB Gadget Mouse'
[    37.904] (**) sys-usb: marmarek RPi4 USB Gadget Mouse: always reports core events
[    37.904] (**) Option "Device" "/dev/input/event7"
[    37.904] (II) event7  - sys-usb: marmarek RPi4 USB Gadget Mouse: is tagged by udev as: Mouse
[    37.904] (II) event7  - sys-usb: marmarek RPi4 USB Gadget Mouse: device is a pointer
[    37.905] (II) event7  - sys-usb: marmarek RPi4 USB Gadget Mouse: device removed
[    37.941] (II) libinput: sys-usb: marmarek RPi4 USB Gadget Mouse: Step value 0 was provided, libinput Fallback acceleration function is used.
[    37.941] (II) libinput: sys-usb: marmarek RPi4 USB Gadget Mouse: Step value 0 was provided, libinput Fallback acceleration function is used.
[    37.941] (II) libinput: sys-usb: marmarek RPi4 USB Gadget Mouse: Step value 0 was provided, libinput Fallback acceleration function is used.
[    37.941] (**) Option "config_info" "udev:/sys/devices/virtual/input/input23/event7"
[    37.941] (II) XINPUT: Adding extended input device "sys-usb: marmarek RPi4 USB Gadget Mouse" (type: MOUSE, id 13)
[    37.941] (**) Option "AccelerationScheme" "none"
[    37.941] (**) sys-usb: marmarek RPi4 USB Gadget Mouse: (accel) selected scheme none/0
[    37.941] (**) sys-usb: marmarek RPi4 USB Gadget Mouse: (accel) acceleration factor: 2.000
[    37.941] (**) sys-usb: marmarek RPi4 USB Gadget Mouse: (accel) acceleration threshold: 4
[    37.941] (II) event7  - sys-usb: marmarek RPi4 USB Gadget Mouse: is tagged by udev as: Mouse
[    37.941] (II) event7  - sys-usb: marmarek RPi4 USB Gadget Mouse: device is a pointer

New (broken):

[    79.849] (II) Using input driver 'wacom' for 'sys-usb: marmarek RPi4 USB Gadget'
[    79.849] (**) sys-usb: marmarek RPi4 USB Gadget: always reports core events
[    79.849] (**) Option "Device" "/dev/input/event6"
[    79.849] (II) wacom: sys-usb: marmarek RPi4 USB Gadget: type not specified, assuming 'stylus'.
[    79.849] (II) wacom: sys-usb: marmarek RPi4 USB Gadget: other types will be automatically added.
[    79.849] (**) wacom: sys-usb: marmarek RPi4 USB Gadget stylus: Smooth panscrolling is enabled
[    79.849] (--) wacom: sys-usb: marmarek RPi4 USB Gadget stylus: using pressure threshold of 851 for button 1
[    79.849] (**) wacom: sys-usb: marmarek RPi4 USB Gadget stylus: panscroll is 0
[    79.849] (**) wacom: sys-usb: marmarek RPi4 USB Gadget stylus: panscroll modified to 52
[    79.849] (--) wacom: sys-usb: marmarek RPi4 USB Gadget stylus: maxX=1024 maxY=768 maxZ=0 resX=4000 resY=4000  tilt=enabled
[    79.849] (II) wacom: sys-usb: marmarek RPi4 USB Gadget stylus: hotplugging dependent devices.
[    79.849] (II) wacom: sys-usb: marmarek RPi4 USB Gadget stylus: hotplugging completed.
[    79.923] (**) Option "config_info" "udev:/sys/devices/virtual/input/input23/event6"
[    79.923] (II) XINPUT: Adding extended input device "sys-usb: marmarek RPi4 USB Gadget stylus" (type: STYLUS, id 12)
[    79.924] (**) sys-usb: marmarek RPi4 USB Gadget stylus: (accel) keeping acceleration scheme 1
[    79.924] (**) sys-usb: marmarek RPi4 USB Gadget stylus: (accel) acceleration profile 0
[    79.924] (**) sys-usb: marmarek RPi4 USB Gadget stylus: (accel) acceleration factor: 2.000
[    79.924] (**) sys-usb: marmarek RPi4 USB Gadget stylus: (accel) acceleration threshold: 4
[    79.924] (II) config/udev: Adding input device sys-usb: marmarek RPi4 USB Gadget Mouse (/dev/input/event16)
[    79.924] (**) sys-usb: marmarek RPi4 USB Gadget Mouse: Applying InputClass "evdev pointer catchall"
[    79.924] (**) sys-usb: marmarek RPi4 USB Gadget Mouse: Applying InputClass "libinput pointer catchall"
[    79.924] (II) Using input driver 'libinput' for 'sys-usb: marmarek RPi4 USB Gadget Mouse'
[    79.924] (**) sys-usb: marmarek RPi4 USB Gadget Mouse: always reports core events
[    79.924] (**) Option "Device" "/dev/input/event16"
[    79.925] (II) event16 - sys-usb: marmarek RPi4 USB Gadget Mouse: is tagged by udev as: Mouse
[    79.925] (II) event16 - sys-usb: marmarek RPi4 USB Gadget Mouse: device is a pointer
[    79.925] (II) event16 - sys-usb: marmarek RPi4 USB Gadget Mouse: device removed
[    79.964] (II) libinput: sys-usb: marmarek RPi4 USB Gadget Mouse: Step value 0 was provided, libinput Fallback acceleration function is used.
[    79.964] (II) libinput: sys-usb: marmarek RPi4 USB Gadget Mouse: Step value 0 was provided, libinput Fallback acceleration function is used.
[    79.964] (II) libinput: sys-usb: marmarek RPi4 USB Gadget Mouse: Step value 0 was provided, libinput Fallback acceleration function is used.
[    79.964] (**) Option "config_info" "udev:/sys/devices/virtual/input/input24/event16"
[    79.964] (II) XINPUT: Adding extended input device "sys-usb: marmarek RPi4 USB Gadget Mouse" (type: MOUSE, id 13)
[    79.964] (**) Option "AccelerationScheme" "none"
[    79.965] (**) sys-usb: marmarek RPi4 USB Gadget Mouse: (accel) selected scheme none/0
[    79.965] (**) sys-usb: marmarek RPi4 USB Gadget Mouse: (accel) acceleration factor: 2.000
[    79.965] (**) sys-usb: marmarek RPi4 USB Gadget Mouse: (accel) acceleration threshold: 4
[    79.966] (II) event16 - sys-usb: marmarek RPi4 USB Gadget Mouse: is tagged by udev as: Mouse
[    79.966] (II) event16 - sys-usb: marmarek RPi4 USB Gadget Mouse: device is a pointer

@marmarek marmarek added T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists. C: tests P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. C: infrastructure needs diagnosis Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed. affects-4.3 This issue affects Qubes OS 4.3. labels Nov 7, 2024
@marmarek
Copy link
Member Author

marmarek commented Nov 7, 2024

I'm not sure yet if the real issue is choosing wrong driver, or maybe "wacom" is the right driver but the emulated device has some incorrect metadata (that didn't caused issues with libinput device).
The issue affect only device emulated by openQA. The one emulated by PiKVM works fine.

@marmarek
Copy link
Member Author

marmarek commented Nov 7, 2024

The update includes "Bind to all tablets if this driver is installed" change: https://src.fedoraproject.org/rpms/xorg-x11-drv-wacom/c/534dbfcc8170aa1c6685048227a722fe83104723?branch=rawhide

@marmarek
Copy link
Member Author

marmarek commented Nov 7, 2024

https://bodhi.fedoraproject.org/updates/FEDORA-2024-d84f47c97d - pushed to stable 10h ago. The tests on the other host (hw1) didn't fail because this update didn't reach the other host yet (message on bodhi says the update may take up to 24h to propagate to mirrors).

@marmarek
Copy link
Member Author

marmarek commented Nov 7, 2024

PiKVM device isn't detected as a tablet, but as a mouse that happens report absolute position. This makes it keep using libinput driver instead of the wacom driver. The absolute mouse required special handling in input-proxy to work, but maybe that's a better approach than working around the wacom driver...

@marmarek marmarek self-assigned this Nov 7, 2024
marmarek added a commit to marmarek/qubes-app-linux-input-proxy that referenced this issue Nov 7, 2024
Check if a "mouse" report absolute capabilities - if so try to connect
it as a tablet first. If that doesn't work, tablet service has a
fallback to mouse.

QubesOS/qubes-issues#9563
@qubesos-bot
Copy link

Automated announcement from builder-github

The package app-linux-input-proxy has been pushed to the r4.2 testing repository for the Debian template.
To test this update, first enable the testing repository in /etc/apt/sources.list.d/qubes-*.list by uncommenting the line containing bookworm-testing (or appropriate equivalent for your template version), then use the standard update command:

sudo apt-get update && sudo apt-get dist-upgrade

Changes included in this update

@qubesos-bot
Copy link

Automated announcement from builder-github

The package app-linux-input-proxy has been pushed to the r4.3 testing repository for the Debian template.
To test this update, first enable the testing repository in /etc/apt/sources.list.d/qubes-*.list by uncommenting the line containing bookworm-testing (or appropriate equivalent for your template version), then use the standard update command:

sudo apt-get update && sudo apt-get dist-upgrade

Changes included in this update

@qubesos-bot
Copy link

Automated announcement from builder-github

The component app-linux-input-proxy (including package app-linux-input-proxy) has been pushed to the r4.2 testing repository for the Fedora template.
To test this update, please install it with the following command:

sudo dnf update --enablerepo=qubes-vm-r4.2-current-testing

Changes included in this update

@qubesos-bot
Copy link

Automated announcement from builder-github

The package app-linux-input-proxy has been pushed to the r4.2 testing repository for the Debian template.
To test this update, first enable the testing repository in /etc/apt/sources.list.d/qubes-*.list by uncommenting the line containing trixie-testing (or appropriate equivalent for your template version), then use the standard update command:

sudo apt-get update && sudo apt-get dist-upgrade

Changes included in this update

@qubesos-bot
Copy link

Automated announcement from builder-github

The component app-linux-input-proxy (including package app-linux-input-proxy) has been pushed to the r4.2 testing repository for the Fedora template.
To test this update, please install it with the following command:

sudo dnf update --enablerepo=qubes-vm-r4.2-current-testing

Changes included in this update

@qubesos-bot
Copy link

Automated announcement from builder-github

The package app-linux-input-proxy has been pushed to the r4.3 testing repository for the Debian template.
To test this update, first enable the testing repository in /etc/apt/sources.list.d/qubes-*.list by uncommenting the line containing trixie-testing (or appropriate equivalent for your template version), then use the standard update command:

sudo apt-get update && sudo apt-get dist-upgrade

Changes included in this update

@qubesos-bot
Copy link

Automated announcement from builder-github

The component app-linux-input-proxy (including package app-linux-input-proxy) has been pushed to the r4.2 testing repository for the Fedora template.
To test this update, please install it with the following command:

sudo dnf update --enablerepo=qubes-vm-r4.2-current-testing

Changes included in this update

@qubesos-bot
Copy link

Automated announcement from builder-github

The component app-linux-input-proxy (including package app-linux-input-proxy) has been pushed to the r4.3 testing repository for the Fedora template.
To test this update, please install it with the following command:

sudo dnf update --enablerepo=qubes-vm-r4.3-current-testing

Changes included in this update

@qubesos-bot
Copy link

Automated announcement from builder-github

The component app-linux-input-proxy (including package app-linux-input-proxy) has been pushed to the r4.3 testing repository for the Fedora template.
To test this update, please install it with the following command:

sudo dnf update --enablerepo=qubes-vm-r4.3-current-testing

Changes included in this update

@qubesos-bot
Copy link

Automated announcement from builder-github

The component app-linux-input-proxy (including package app-linux-input-proxy) has been pushed to the r4.3 testing repository for the Fedora template.
To test this update, please install it with the following command:

sudo dnf update --enablerepo=qubes-vm-r4.3-current-testing

Changes included in this update

@andrewdavidwong andrewdavidwong added diagnosed Technical diagnosis has been performed (see issue comments). pr submitted A pull request has been submitted for this issue. labels Nov 8, 2024
marmarek added a commit to marmarek/qubes-app-linux-input-proxy that referenced this issue Nov 8, 2024
It's ascii, not binary. Fortunately, for mouse reporting relative or
absolute X,Y events only the result is the same.

QubesOS/qubes-issues#9563
@andrewdavidwong andrewdavidwong removed the needs diagnosis Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed. label Nov 9, 2024
marmarek added a commit to marmarek/qubes-app-linux-input-proxy that referenced this issue Nov 15, 2024
It's ascii, not binary. Fortunately, for mouse reporting relative or
absolute X,Y events only the result is the same.

QubesOS/qubes-issues#9563
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-4.3 This issue affects Qubes OS 4.3. C: infrastructure C: tests diagnosed Technical diagnosis has been performed (see issue comments). P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. pr submitted A pull request has been submitted for this issue. r4.2-host-cur-test r4.2-vm-bookworm-cur-test r4.2-vm-fc39-cur-test r4.2-vm-fc40-cur-test r4.2-vm-fc41-cur-test r4.2-vm-trixie-cur-test r4.3-host-cur-test r4.3-vm-bookworm-cur-test r4.3-vm-fc39-cur-test r4.3-vm-fc40-cur-test r4.3-vm-fc41-cur-test r4.3-vm-trixie-cur-test T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants