[Bug 250826] x11/xorg incorrect autogenerated xorg.conf
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Sun Nov 15 02:38:09 UTC 2020
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=250826
--- Comment #5 from Bill Blake <billblake2018 at gmail.com> ---
OK, I took a day to play with things. Here's the current status.
I am currently running *with* a config file, as described above. Everything
works fine, so I could theoretically just leave it as it is and wait until the
next version of FreeBSD to see what breaks when I do that install. :) However,
I decided to try to fix things to work properly. I didn't quite make it.
First, the font thing: Putting a font8x16 into rc.conf let me go back to a
100x37 screen, but only for ttyv0. I fixed that with some code in rc.local to
do all the screens. So at least I can read my text screens now!
Now, for ctwm. I stuck some debugs into ctwm to track down the problem.
Here's what's going on. When ctwm starts, it translates the key names in its
config files to keysyms and then to keycodes, and records the action to be
taken for particular keycodes. Later, when a key is pressed, the keycode in
the event is matched against the keycodes found when it parsed the config file.
My ctwm config uses Page_Up to invoke a menu and, without the i915kms driver,
that becomes keysym ff55 and keycode 99.
When I use the i915kms driver, the keysyms and keycodes translated from the
config file are apparently the same as without that driver. *BUT* the X events
have different keycodes! For Page_Up the X event keycode is 112. And, of
course, that does not match what was recorded at initialization, which means
that my menu doesn't work.
And now for the twist. While tracking this down, I happen to notice that my
key invoked menu magically started working! Turns out I can reproduce this.
Start ctwm. See my menu fail. Make ctwm restart via a menu option (invoked by
a click). The second invocation gets the *new* keycodes at parse time and,
since they match the X event codes, my menu then works. Note that, for
example, killing ctwm and restarting it doesn't work. (In my .xinitrc, I
started ctwm, slept 10 seconds, killed ctwm, slept some more and restarted
ctwm. Didn't fix the problem.)
To make this clear, XKeysymToKeycode returns different values at the two
invocations of ctwm. The first time, it returns 99 for ff55; the second time,
it returns 112 for ff55. The 99 is *not* what the X event structure returns
when Page Up is pressed, 112 is. Also, the 99 is what one gets from
XKeysymToKeycode if the i915kms driver is *not* in use (and an X config file is
present).
One other thing: I had kinda hoped that just sleeping before the first
invocation of ctwm would make the problem go away. It didn't. So it's not
simply a matter of ctwm getting in before the server fully initialized. Either
ctwm is not doing some necessary initialization or something in the bowels of X
or Xlib is broken. I'm an X user, not an X programmer, so I wouldn't even know
how to start looking, short of teaching myself X programming, which I don't
have the time to do.
That said, if someone has some pointers as to where I might look, I'll give it
a go. The problem, as I said, is reproducible, as is its magical disappearance
when ctwm is restarted by a ctwm menu selection.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-x11
mailing list