Page MenuHomeFreeBSD

Change kern.evdev.rcpt_mask to 12 by default, to be more evdev friendly
ClosedPublic

Authored by zeising on Apr 11 2020, 12:46 PM.
Tags
None
Referenced Files
F80173539: D24370.id.diff
Thu, Mar 28, 8:55 PM
Unknown Object (File)
Thu, Mar 21, 1:40 PM
Unknown Object (File)
Thu, Mar 21, 1:40 PM
Unknown Object (File)
Feb 2 2024, 5:18 AM
Unknown Object (File)
Jan 24 2024, 2:29 AM
Unknown Object (File)
Jan 19 2024, 7:51 AM
Unknown Object (File)
Jan 17 2024, 2:01 AM
Unknown Object (File)
Jan 8 2024, 7:30 PM
Subscribers

Details

Summary

There has been a lot of support cases related to mice (and sometimes keyboards) after switching xorg to use evdev by default on FreeBSD 12 and later. Often, the fix for this is to simply change kern.evdev.recpt_mask to a value where evdev is actually used. On system with evdev enabled, such as done for GENERC on amd64 and other architectures, it probably makes sense to have a more friendly default for this sysctl.
Attached patch changes the default value to 12, meaning we let xorg handle the devices without sysmouse or kbdmux or similar. I'd like to commit this, and merge it to FreeBSD 12, in order to improve the out of the box desktop experience.
This change is conditional on EVDEV_SUPPORT, meaning that kernels without evdev will still get the old value.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 30420

Event Timeline

Looks mostly good to me. We should keep EVDEV_RCPT_KBDMUX for powerpc32 and EVDEV_SUPPORT #else branch is not needed.

sys/dev/evdev/evdev.c
70

powerpc/conf/GENERIC config uses both #option EVDEV_SUPPORT and #device abd at the same time, so EVDEV_RCPT_KBDMUX should be kept enabled with #ifdef-s at least for old powerpc32 Macs if we still support them. Abd keyboard driver does not support evdev yet. Resetting EVDEV_RCPT_KBDMUX bit in evdev_rcpt_mask will make it silent.
It also applicable to Hyper-V Gen 2 keyboards enabled by default in i386|amd64/conf/GENERIC kernel configs. But I have patches with working evdev support for this driver, so we can go forward here just now. It is a driver with very minor scope of usage.

71

There is no need to keep #else branch. Drivers with EVDEV_SUPPORT option compiled out should not access evdev_rcpt_mask variable at all.

Update based on comments from @wulf .

zeising added inline comments.
sys/dev/evdev/evdev.c
71

I believe I've taken care of your comments, was it this way you meant?

LGTM (except EVDEV_RCPT_HW_KBD flag in powerpc case)

sys/dev/evdev/evdev.c
73

EVDEV_RCPT_HW_KBD should be removed from powerpc case as it will cause double key-press/release reporting on USB keyboards. One-line comment like /* adb keyboard driver does not support evdev yet. */ will be good too.

This revision is now accepted and ready to land.Apr 18 2020, 9:55 AM
zeising marked an inline comment as done.
This revision now requires review to proceed.Apr 18 2020, 10:24 PM

Diff updated. I believe I got it right this time. :)

sys/dev/evdev/evdev.c
73

Done.

This revision is now accepted and ready to land.Apr 18 2020, 10:50 PM
This revision was automatically updated to reflect the committed changes.
zeising marked an inline comment as done.