View previous topic :: View next topic |
Author |
Message |
pingtoo Veteran
Joined: 10 Sep 2021 Posts: 1252 Location: Richmond Hill, Canada
|
Posted: Tue Sep 10, 2024 4:32 pm Post subject: |
|
|
yuviazzz,
I have no other clue now. I can only guess the "kbd" driver is incompatible with current Xorg version.
I expect to see some messages from xf86OpenConsole(). but they did not show. And it seems did perform the switch_to() function. So I am not sure why/how Xorg pickup keyboard event.
If you want to debug further I suggest create some incorrect configuration value in the kbd configure section. So we can verify the execution code logic did follow assumed path. (It is possible I got wrong idea, I am looking wrong place)
One thing I do know is that "failed to set us as foreground pgrp" no long show in the command version that use "vt1" so the command line option "vt1" did influence the Xorg server. |
|
Back to top |
|
|
GDH-gentoo Veteran
Joined: 20 Jul 2019 Posts: 1710 Location: South America
|
Posted: Tue Sep 10, 2024 5:27 pm Post subject: |
|
|
pingtoo wrote: | I expect to see some messages from xf86OpenConsole(). but they did not show. |
Yeah, that's what puzzles me as well.
pingtoo wrote: | One thing I do know is that "failed to set us as foreground pgrp" no long show in the command version that use "vt1" so the command line option "vt1" did influence the Xorg server. |
I don't think that's the reason why the message didn't appear. It didn't because one of the tests used a "Display" entry in the InputDevice section, so a different code path that does not do the tcsetpgrp() call was executed. The one in the else clause. And I still think that Xorg (at least running as root) and the shell that runs startx shouldn't share the same virtual terminal, contrary to what happened in that test.
If fact, going with yuviazzz's information, it seems that the vt argument is actually being ignored, adding to the perception that it is as if code in xf86OpenConsole() didn't run:
yuviazzz wrote: | GDH-gentoo wrote: | Really? Does the output of ps -eo pid,pgid,sid,tname,args show the vt argument getting passed to Xorg? If yes, does the output still show Xorg grabbing /dev/tty1? |
yes & yes. |
_________________
NeddySeagoon wrote: | I'm not a witch, I'm a retired electronics engineer |
Ionen wrote: | As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though |
Last edited by GDH-gentoo on Tue Sep 10, 2024 11:45 pm; edited 2 times in total |
|
Back to top |
|
|
pingtoo Veteran
Joined: 10 Sep 2021 Posts: 1252 Location: Richmond Hill, Canada
|
Posted: Tue Sep 10, 2024 5:40 pm Post subject: |
|
|
This is why I think giving "wrong" value in configuration is a way to debug. Because otherwise we need to build the code with debug information in order to trace execution path. Now we are just guessing base on the code we see.
I read somewhere on Internet that suggest X should need to work with controlling tty. that is the reason I suggest use "vt1" as where the startx was used.
Without set in front of the screen it is very hard to guess what exactly happening, there are a lot more information required in order to really determine what was the execution environment. For example using the "ps ..." command you suggested to verify if we did not somehow missing the required argument may be due to for example ~/.xinitrc or something.
examine /proc/<pid of Xorg> would be another place to check. and there we can also check if the control tty is set correctly. There just too many thing to check and over this forum post is very inefficient. |
|
Back to top |
|
|
GDH-gentoo Veteran
Joined: 20 Jul 2019 Posts: 1710 Location: South America
|
Posted: Tue Sep 10, 2024 10:16 pm Post subject: |
|
|
yuviazzz, could you post the output of Xorg -help? I want to see if at least xf86UseMsg() from hw/xfree86/os-support/linux/lnx_init.c is called... _________________
NeddySeagoon wrote: | I'm not a witch, I'm a retired electronics engineer |
Ionen wrote: | As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though |
|
|
Back to top |
|
|
yuviazzz n00b
Joined: 06 Sep 2024 Posts: 24 Location: Sweden
|
Posted: Wed Sep 11, 2024 12:54 pm Post subject: |
|
|
GDH-gentoo wrote: | yuviazzz, could you post the output of Xorg -help? I want to see if at least xf86UseMsg() from hw/xfree86/os-support/linux/lnx_init.c is called... |
here:
Code: | use: X [:<display>] [option]
-a # default pointer acceleration (factor)
-ac disable access control restrictions
-audit int set audit trail level
-auth file select authorization file
-br create root window with black background
+bs enable any backing store support
-bs disable any backing store support
+byteswappedclients Allow clients with endianess different to that of the server
-byteswappedclients Prohibit clients with endianess different to that of the server
-c turns off key-click
c # key-click volume (0-100)
-cc int default color visual class
-nocursor disable the cursor
-core generate core dump on fatal error
-displayfd fd file descriptor to write display number to when ready to connect
-dpi int screen resolution in dots per inch
-dpms disables VESA DPMS monitor control
-deferglyphs [none|all|16] defer loading of [no|all|16-bit] glyphs
-f # bell base (0-100)
-fakescreenfps # fake screen default fps (1-600)
-fp string default font path
-help prints message with these options
+iglx Allow creating indirect GLX contexts
-iglx Prohibit creating indirect GLX contexts (default)
-I ignore all remaining arguments
-ld int limit data space to N Kb
-lf int limit number of open files to N
-ls int limit stack space to N Kb
-nolock disable the locking mechanism
-maxclients n set maximum number of clients (power of two)
-nolisten string don't listen on protocol
-listen string listen on protocol
-noreset don't reset after last client exists
-background [none] create root window with no background
-reset reset after last client exists
-p # screen-saver pattern duration (minutes)
-pn accept failure to listen on all ports
-nopn reject failure to listen on all ports
-r turns off auto-repeat
r turns on auto-repeat
-render [default|mono|gray|color] set render color alloc policy
-retro start with classic stipple and cursor
-s # screen-saver timeout (minutes)
-seat string seat to run on
-t # default pointer threshold (pixels/t)
-terminate [delay] terminate at server reset (optional delay in sec)
-tst disable testing extensions
ttyxx server started from init on /dev/ttyxx
v video blanking for screen-saver
-v screen-saver without video blanking
-wr create root window with white background
-maxbigreqsize set maximal bigrequest size
+xinerama Enable XINERAMA extension
-xinerama Disable XINERAMA extension
-dumbSched Disable smart scheduling and threaded input, enable old behavior
-schedInterval int Set scheduler interval in msec
-sigstop Enable SIGSTOP based startup
+extension name Enable extension
-extension name Disable extension
Only the following extensions can be run-time enabled/disabled:
Generic Event Extension
MIT-SHM
XTEST
XINERAMA
XFIXES
RENDER
RANDR
COMPOSITE
DAMAGE
MIT-SCREEN-SAVER
DOUBLE-BUFFER
RECORD
DPMS
X-Resource
XVideo
XVideo-MotionCompensation
GLX
-query host-name contact named host for XDMCP
-broadcast broadcast for XDMCP
-multicast [addr [hops]] IPv6 multicast for XDMCP
-indirect host-name contact named host for indirect XDMCP
-port port-num UDP port number to send messages to
-from local-address specify the local address to connect from
-once Terminate server after one session
-class display-class specify display class to send in manage
-cookie xdm-auth-bits specify the magic cookie for XDMCP
-displayID display-id manufacturer display ID for request
[+-]accessx [ timeout [ timeout_mask [ feedback [ options_mask] ] ] ]
enable/disable accessx key sequences
-ardelay set XKB autorepeat delay
-arinterval set XKB autorepeat interval
Device Dependent Usage
-config file specify a configuration file, relative to the
xorg.conf search path, only root can use absolute
-configdir dir specify a configuration directory, relative to the
xorg.conf.d search path, only root can use absolute
-verbose [n] verbose startup messages
-logverbose [n] verbose log messages
-quiet minimal startup messages
-fbbpp n set bpp for the framebuffer. Default: 8
-depth n set colour depth. Default: 8
-gamma f set gamma value (0.1 < f < 10.0) Default: 1.0
-rgamma f set gamma value for red phase
-ggamma f set gamma value for green phase
-bgamma f set gamma value for blue phase
-weight nnn set RGB weighting at 16 bpp. Default: 565
-layout name specify the ServerLayout section name
-screen name specify the Screen section name
-keyboard name specify the core keyboard InputDevice name
-pointer name specify the core pointer InputDevice name
-nosilk disable Silken Mouse
-disableVidMode disable mode adjustments with xvidtune
-allowNonLocalXvidtune allow xvidtune to be run as a non-local client
-allowMouseOpenFail start server even if the mouse can't be initialized
-ignoreABI make module ABI mismatches non-fatal
-isolateDevice bus_id restrict device resets to bus_id (PCI only)
-version show the server version
-showDefaultModulePath show the server default module path
-showDefaultLibPath show the server default library path
-novtswitch don't automatically switch VT at reset & exit
-sharevts share VTs with another X server
vtXX use the specified VT number
-keeptty don't detach controlling tty (for debugging only)
-masterfd <fd> use the specified fd as the DRM master fd (not if setuid/gid) |
|
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54578 Location: 56N 3W
|
Posted: Wed Sep 11, 2024 3:04 pm Post subject: |
|
|
yuviazzz,
There are two parts to the evdev driver
You need the kernel part, not the Xorg part,
In xorg.conf I have
Code: | Section "InputDevice"
Identifier "Keyboard1"
Driver "kbd"
Option "AutoRepeat" "500 30"
# Specify which keyboard LEDs can be user-controlled (eg, with xset(1))
# Option "Xleds" "1 2 3"
# Option "LeftAlt" "Meta"
# Option "RightAlt" "ModeShift"
# To customise the XKB settings to suit your keyboard, modify the
# lines below (which are the defaults). For example, for a non-U.S.
# keyboard, you will probably want to use:
# Option "XkbModel" "pc105"
# If you have a US Microsoft Natural keyboard, you can use:
# Option "XkbModel" "microsoft"
#
# Then to change the language, change the Layout setting.
# For example, a german layout can be obtained with:
# Option "XkbLayout" "de"
# or:
# Option "XkbLayout" "de"
# Option "XkbVariant" "nodeadkeys"
#
# If you'd like to switch the positions of your capslock and
# control keys, use:
# Option "XkbOptions" "ctrl:swapcaps"
# These are the default XKB settings for Xorg
# Option "XkbRules" "xorg"
# Option "XkbModel" "pc105"
# Option "XkbLayout" "us"
# Option "XkbVariant" ""
# Option "XkbDisable"
Option "xkblayout" "gb"
# comment out the next line if you don't have a dvorak keyboard
Option "xkbvariant" "dvorak"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
# why "pc102"
Option "XkbOptions" "ctrl:swapcaps"
EndSection |
The whole file will be there for a day or so. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
yuviazzz n00b
Joined: 06 Sep 2024 Posts: 24 Location: Sweden
|
Posted: Wed Sep 11, 2024 7:49 pm Post subject: |
|
|
with:
Code: | Section "InputDevice"
Identifier "Keyboard0"
Driver "evdev"
Option "Device" "/dev/input/event5"
Option "AutoRepeat" "500 30"
Option "xkblayout" "se"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "XkbOptions" "ctrl:nocaps"
Option "GrabDevice" "true"
EndSection | in xorg.conf and server flag to disable AutoAddDevices, i can get keyboard working like this with evdev.
replace "evdev" with "kbd" and remove GrabDevice option, i see it complaining it cant grab keyboard in tty, and keyboard does not work in X.
with GrabDevice option removed and driver still set to "evdev", keyboard works in X but also in tty, letting me ctrl+c out of X. very annoying |
|
Back to top |
|
|
yuviazzz n00b
Joined: 06 Sep 2024 Posts: 24 Location: Sweden
|
Posted: Wed Sep 11, 2024 10:32 pm Post subject: |
|
|
yuviazzz wrote: | with GrabDevice option removed and driver still set to "evdev", keyboard works in X but also in tty, letting me ctrl+c out of X. very annoying |
"small" system changes... well, i no longer need GrabDevice option with evdev, and i can now actually "use the keyboard" with kbd driver (input i get is not correct at all, full of interference, only with device specified!) so im satisfied |
|
Back to top |
|
|
yuviazzz n00b
Joined: 06 Sep 2024 Posts: 24 Location: Sweden
|
Posted: Wed Sep 11, 2024 10:36 pm Post subject: |
|
|
long story short:
problems with my /dev...
typing this with kbd driver!!!
thanks for helping!!!!!
updating OP to reflect this |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 22695
|
Posted: Wed Sep 11, 2024 11:05 pm Post subject: |
|
|
Please give us the long story instead, for the benefit of anyone else who has this problem. What was wrong with your /dev, how did you determine that, and what did you do to fix it? |
|
Back to top |
|
|
pingtoo Veteran
Joined: 10 Sep 2021 Posts: 1252 Location: Richmond Hill, Canada
|
Posted: Wed Sep 11, 2024 11:15 pm Post subject: |
|
|
yuviazzz wrote: | long story short:
problems with my /dev...
typing this with kbd driver!!!
thanks for helping!!!!!
updating OP to reflect this | My guess, You miss /dev/tty0? |
|
Back to top |
|
|
yuviazzz n00b
Joined: 06 Sep 2024 Posts: 24 Location: Sweden
|
Posted: Wed Sep 11, 2024 11:46 pm Post subject: |
|
|
pingtoo wrote: | My guess, You miss /dev/tty0? |
yes
i hacked the setup together late at night, thats the side effect of that
lesson learnt i hope |
|
Back to top |
|
|
pingtoo Veteran
Joined: 10 Sep 2021 Posts: 1252 Location: Richmond Hill, Canada
|
Posted: Thu Sep 12, 2024 12:14 am Post subject: |
|
|
I knew it. I should'vs capture it last time when I ask for the /dev/tty listing. I had a feeling then something was missing in the static configuration. But I was too much of reading the source code, just miss the big picture.
I think also the disable AutoAddDevices helped. Should have read the man page.
man xorg.conf(5) INPUTDEVICE SECTION wrote: | The config file may have multiple InputDevice sections. Recent X servers employ HAL or udev backends for input device enumeration and input hotplugging. It is usually not necessary to provide InputDevice sections in the xorg.conf if hotplugging is in use (i.e. AutoAddDevices is enabled). If hotplugging is enabled, InputDevice sections using the mouse, kbd and vmmouse driver will be ignored. |
|
|
Back to top |
|
|
stefan11111 l33t
Joined: 29 Jan 2023 Posts: 934 Location: Romania
|
Posted: Sun Sep 15, 2024 8:40 pm Post subject: |
|
|
GDH-gentoo wrote: | pingtoo wrote: | I think you should switch use xf86-input-evdev. |
yuviazzz is using a static /dev setup, so x11-drivers/xf86-input-keyboard is the only option here. And only the last version that still had the code for Linux. |
Late to the party, but I wanted to mention that this is not exactly correct.
You can use evdev too, but you need to use libudev-zero with it.
libudev-zero is code unrelated to udev and systemd.
It's a couple of functions that are needed by some programs and libs, like evdev.
I have an ebuild for libudev-zero in my overlay.
I have tested evdev running like this on my static /dev machine, and it worked with no issue. _________________ My overlay: https://github.com/stefan11111/stefan_overlay
INSTALL_MASK="/etc/systemd /lib/systemd /usr/lib/systemd /usr/lib/modules-load.d *udev* /usr/lib/tmpfiles.d *tmpfiles* /var/lib/dbus /usr/bin/gdbus /lib/udev" |
|
Back to top |
|
|
GDH-gentoo Veteran
Joined: 20 Jul 2019 Posts: 1710 Location: South America
|
Posted: Tue Sep 17, 2024 3:41 pm Post subject: |
|
|
stefan11111 wrote: | You can use evdev too, but you need to use libudev-zero with it. |
I want to say that xf86-input-evdev + libudev-zero does look IMO like a better alternative for X11 + static /dev users than xf86-input-keyboard + xf86-input-mouse. At least while libudev-zero is maintained.
evdev_drv.so uses only these functions from libudev:
Code: | U udev_device_get_devpath@LIBUDEV_183
U udev_device_new_from_devnum@LIBUDEV_183
U udev_device_unref@LIBUDEV_183
U udev_new@LIBUDEV_183
U udev_unref@LIBUDEV_183 |
All of them are implemented in libudev-zero's replacement library, and all appear to do actual work, i. e. they are not just stubs.
This of course puts the system in unsupported territory —libudev-zero is not, and probably will not be (likely conflicts with sys-apps/systemd-utils[udev]), in Gentoo's official repository—, but so does using old, unmaintained (for Linux) X11 input drivers _________________
NeddySeagoon wrote: | I'm not a witch, I'm a retired electronics engineer |
Ionen wrote: | As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though |
|
|
Back to top |
|
|
|