! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Num lock state changes when UVC webcam is plugged in.
Status:
RESOLVED: MOVED
Product:
Xfce4-settings
Component:
Keyboard Settings

Comments

Description Alistair Buxton 2016-07-12 15:18:20 CEST
To reproduce:

1. In keyboard settings turn on "restore num lock state at start up"
2. Open settings editor and create a boolean key "/Default/Numlock" under channel "keyboards". Set it to false.
2. Plug in a UVC webcam.

Result: Keyboard num lock is turned off.

3. Change the key to true.
4. Unplug and plug in the webcam.

Result: Keyboard num lock is turned on.

Impact: My monitor has a built in USB hub. My webcam is plugged in to the USB hub, and appears as an input device. When the monitor goes in to power saving mode the USB hub is turned off. When the monitor turns back on the webcam appears to have just been plugged in.

The result is that whenever my monitor wakes from power saving mode, num lock is changed to whichever state it was in at the last system power off.

Recommendation: Ignore web cams, or save the num lock state at device disconnect, or both.
Comment 1 Theo Linkspfeifer editbugs 2019-06-27 01:21:03 CEST
Is this report still valid? My first impression is that the kernel/udev should be blamed for registering a webcam as keyboard.
Comment 2 Alistair Buxton 2019-06-27 18:13:31 CEST
The bug is that Xfce reverts numlock to whatever state it was at the last system shutdown whenever you plug in a keyboard. If that can still be reproduced then the bug is still valid. Webcams are just one type of device which happen to register as a keyboard, meaning it is more common than you would think for people to have multiple keyboards and trigger this bug.
Comment 3 Theo Linkspfeifer editbugs 2019-06-27 20:26:27 CEST
I agree that the current behavior is not optimal.
Comment 4 Alistair Buxton 2019-06-27 20:39:37 CEST
Technically: any USB device can enumerate with a HID report descriptor with key events, and many types of device do this if they have buttons including cameras, scanners, and weird joysticks. It isn't a fault of the system USB stack to present them as keyboards, it is by design that this happens, and we have to deal with it.

I'm not really convinced of the utility of this setting anyway. Surely you always want numlock in a known state at system start up so you can enter your password without problems?

FWIW I just tested and this still happens on Ubuntu 18.04. I don't have anything newer than that to test with currently.
Comment 5 Theo Linkspfeifer editbugs 2019-06-27 20:57:52 CEST
The description of the setting is "Restore num lock state at start up", but it is (mis)used to determine if the state should be restored on a hotplug event also. Is this really needed? I do not know.
Comment 6 Git Bot editbugs 2020-05-28 23:05:55 CEST
-- GitLab Migration Automatic Message --

This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/xfce/xfce4-settings/-/issues/83.

Please create an account or use an existing account on one of our supported OAuth providers. 

If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests

Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev

Bug #12694

Reported by:
Alistair Buxton
Reported on: 2016-07-12
Last modified on: 2020-05-28

People

Assignee:
Jérôme Guelfucci
CC List:
4 users

Version

Version:
unspecified

Attachments

Additional information