Date: Sun, 15 Nov 2020 02:38:09 +0000 From: bugzilla-noreply@freebsd.org To: x11@FreeBSD.org Subject: [Bug 250826] x11/xorg incorrect autogenerated xorg.conf Message-ID: <bug-250826-7141-KWbcbzGCKt@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-250826-7141@https.bugs.freebsd.org/bugzilla/> References: <bug-250826-7141@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D250826 --- Comment #5 from Bill Blake <billblake2018@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. :) Howe= ver, 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.=20 Here's what's going on. When ctwm starts, it translates the key names in i= ts 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 f= ile. My ctwm config uses Page_Up to invoke a menu and, without the i915kms driv= er, 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 ev= ents 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= .=20 Start ctwm. See my menu fail. Make ctwm restart via a menu option (invoke= d 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 ti= me, 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 fil= e 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. Ei= ther 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 disappear= ance when ctwm is restarted by a ctwm menu selection. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-250826-7141-KWbcbzGCKt>