Bug 250827 - x11/xorg keyboard not properly detected
Summary: x11/xorg keyboard not properly detected
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-x11 (Nobody)
Depends on:
Reported: 2020-11-03 09:56 UTC by Bill Blake
Modified: 2020-11-20 16:14 UTC (History)
3 users (show)

See Also:

config and logs (142.51 KB, text/plain)
2020-11-03 09:56 UTC, Bill Blake
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bill Blake 2020-11-03 09:56:51 UTC
Created attachment 219321 [details]
config and logs

12.2-RELEASE, GENERIC and custom kernel, stock X, Dell Latitude E6410.

After changing the Driver "modesetting" to "vesa" in the Device section of the Xorg -configure autogenerated config, I was able to get X to start.  The mouse worked normally.  However, when I tried to use the keyboard, I got totally random, apparently unreproducible trash.  To make my keyboard work, I had to add  

Option "AutoAddDevices" "False"        

to the ServerFlags section.

The working config, the log of the failure, and the log of the success are attached.
Comment 1 Niclas Zeising freebsd_committer 2020-11-03 15:20:47 UTC
Don't configure input devices, there is no need.
Comment 2 Bill Blake 2020-11-03 19:25:09 UTC
Per my previous BUG REPORT, X would not start unless it was given a configuration.  To make it start, I tried the autogenerated config.  Same failure.  Then I made a one line change to the Device section.  X started.

But I got garbage instead of keyboard input.  Only when I configured X to not auto-add devices did I get a working X.  Since then, I took the auto-generated configure and removed *everything* except the Device section (because X wouldn't start without it).  I still got garbage.

So this is a real bug and this ticket should be re-opened.
Comment 3 Niclas Zeising freebsd_committer 2020-11-03 19:42:26 UTC
Can you provide output from xinput --list-devices from a working system as well as a non-working system?  Do you have any special options when building xorg, if you are building locally.

btw, as I stated in your other PR, your graphics driver isn't loaded properly, since you are using the vesa driver.  It would have been nice if you mentioned that in the other PR.

For the record, I have sevarl computers running FreeBSD 12.1, 12.2 and current without seeing any of these issues.  Granted, none of them are the same model as yours.
Comment 4 Niclas Zeising freebsd_committer 2020-11-03 19:42:55 UTC
Can you also give a list of installed packages?  Are you using latest or quarterly packages?
Comment 5 Niclas Zeising freebsd_committer 2020-11-03 19:44:19 UTC
The input sections are quite broken.  You should, on FreeBSD 12.2, be able to use input devices with libinput.  Do you have xf86-input-libinput installed?
Comment 6 Niclas Zeising freebsd_committer 2020-11-03 19:45:00 UTC
Can you also verify that moused is not running, and that sysctl kern.evdev.rcpt_mask is set to 12 (this is the default).
Comment 7 mats 2020-11-20 16:14:58 UTC
"when I tried to use the keyboard, I got totally random, apparently unreproducible trash."

Stumble on this in too, using XDM.
But try this; 

Section "InputClass"
    Identifier "libinput keyboard catchall"
    MatchIsKeyboard "on"
    MatchDevicePath "/dev/input/event*"
    Driver "libinput"
    Option "XkbRules" "evdev"

It did make it work for me.

(see https://forums.freebsd.org/threads/new-xorg-switch-from-devd-to-udev.74144/#post-453202)