View previous topic :: View next topic |
Author |
Message |
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Tue Nov 10, 2020 2:07 am Post subject: |
|
|
OK. But I get a black vt7, no xdm chooser. |
|
Back to top |
|
|
GDH-gentoo Veteran
Joined: 20 Jul 2019 Posts: 1528 Location: South America
|
Posted: Tue Nov 10, 2020 3:10 am Post subject: |
|
|
I get the greeter and the small xconsole window. Remind me what version of OpenRC is the one you have installed. |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Tue Nov 10, 2020 3:30 am Post subject: |
|
|
GDH-gentoo wrote: | I get the greeter and the small xconsole window. Remind me what version of OpenRC is the one you have installed. |
13.7 |
|
Back to top |
|
|
GDH-gentoo Veteran
Joined: 20 Jul 2019 Posts: 1528 Location: South America
|
Posted: Tue Nov 10, 2020 4:56 pm Post subject: |
|
|
/sbin/openrc-run is a symlink to openrc in that version, right?
It looks like 13.7 didn't support error_log yet, so the service script needs a little adjustment, but the service should have started nonetheless.
/etc/init.d/xdm-debug
Code: | #!/sbin/openrc-run
description="xdm (debug mode)"
command=xdm
command_args="-debug 1"
command_background=yes
pidfile=/var/run/xdm-openrc.pid
start_stop_daemon_args="--stderr /var/log/xdm.log" |
If xdm did start, if you change to the tty that you used to start it, it should have been spammed with the debug output. Here's what I have when I start the service and log in, if you want to compare.
Code: | $ rc-service xdm-debug status
* status: started
$ ps axf
PID TTY STAT TIME COMMAND
...
2807 ? Ss 0:00 xdm -debug 1
2814 tty7 Ssl+ 0:00 \_ /usr/bin/X :0 -nolisten tcp -auth /var/lib/xdm/authdir/authfiles/...
2820 ? Ss 0:00 \_ xdm: :0
2830 ? Ss 0:00 \_ /bin/sh /etc/X11/Sessions/openbox
2907 ? S 0:00 \_ /usr/bin/openbox --startup /usr/libexec/openbox-autostart OPENBOX
2827 ? S 0:00 xconsole -geometry 480x130-0-0 -daemon -notify -verbose -fn fixed -exitOnFail |
In my case, I set up an .xsession file that starts Openbox. |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Tue Nov 10, 2020 5:39 pm Post subject: |
|
|
Thanks, GDH-gentoo. I'll try it.
I tried to switch back from openbox to mate and found that XSession is still Openbox and indeed openbox is still running.
Code: | ~ $ sudo grep XSESSION -r /etc/*
/etc/csh.env:setenv XSESSION 'mate'
/etc/env.d/90xsession:XSESSION="mate"
/etc/env.d/90xsession:#XSESSION="openbox"
/etc/env.d/90xsession:#XSESSION="gnome"
/etc/env.d/90xsession:#XSESSION="twm"
/etc/environment.d/10-gentoo-env.conf:XSESSION=mate
/etc/profile.env:export XSESSION='mate'
/etc/X11/xdm/Xsession: export XSESSION="$1"
/etc/X11/xdm/Xsession:# want this, he should override XSESSION, or at least
/etc/X11/chooser.sh:# Find a match for $XSESSION in /etc/X11/Sessions
/etc/X11/chooser.sh: = "`echo ${XSESSION} | awk '{ print toupper($1) }'`" ]; then
/etc/X11/chooser.sh:if [ -n "${XSESSION}" ]; then
/etc/X11/chooser.sh: if [ -f /etc/X11/Sessions/${XSESSION} ]; then
/etc/X11/chooser.sh: if [ -x /etc/X11/Sessions/${XSESSION} ]; then
/etc/X11/chooser.sh: GENTOO_EXEC="/etc/X11/Sessions/${XSESSION}"
/etc/X11/chooser.sh: GENTOO_EXEC="/bin/sh /etc/X11/Sessions/${XSESSION}"
/etc/X11/chooser.sh: for x in "${XSESSION}" \
/etc/X11/chooser.sh: "`echo ${XSESSION} | awk '{ print toupper($1) }'`" \
/etc/X11/chooser.sh: "`echo ${XSESSION} | awk '{ print tolower($1) }'`"
tony@Casti ~ $ echo "$XSESSION"
openbox
|
The SECOND time that I rebooted, it switched to Mate! |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
|
Back to top |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6098 Location: Dallas area
|
Posted: Tue Nov 10, 2020 6:31 pm Post subject: |
|
|
Code: | xdm info (pid 4625): executing session /usr/lib64/X11/xdm/Xsession
attempting to execve() /usr/lib64/X11/xdm/Xsession
-2
|
do you have /usr/lib64/X11/xdm/Xsession, if so what's in it?
Edit to add: is it the same as /usr/portage/x11-apps/xdm/files/Xsession _________________ PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland |
|
Back to top |
|
|
GDH-gentoo Veteran
Joined: 20 Jul 2019 Posts: 1528 Location: South America
|
Posted: Tue Nov 10, 2020 6:58 pm Post subject: |
|
|
Code: | Created chooser socket 3
creating socket to listen on port 177 of address 0.0.0.0 |
XDMCP? I don't have these lines. How do you configure it?
Program /usr/lib64/X11/xdm/chooser is running and it also logs to /var/log/xdm.log, right? |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Tue Nov 10, 2020 7:12 pm Post subject: |
|
|
Anon-E-moose wrote: | do you have /usr/lib64/X11/xdm/Xsession, if so what's in it?
Edit to add: is it the same as /usr/portage/x11-apps/xdm/files/Xsession | Yes and Yes (verified with meld, meld says "files are identical") |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Tue Nov 10, 2020 7:17 pm Post subject: |
|
|
GDH-gentoo wrote: |
XDMCP? I don't have these lines. How do you configure it?
Program /usr/lib64/X11/xdm/chooser is running and it also logs to /var/log/xdm.log, right? |
Code: | tony@Casti ~ $ ps -Al |grep chooser
tony@Casti ~ $ ls -Al /usr/lib64/X11/xdm/chooser
-rwxr-xr-x 1 root root 27448 Nov 8 18:02 /usr/lib64/X11/xdm/chooser
|
Configuration? I'm not sure.
Code: | tony@Casti ~ $ equery b /usr/lib64/X11/xdm/chooser
* Searching for /usr/lib64/X11/xdm/chooser ...
x11-apps/xdm-1.1.12 (/usr/lib64/X11/xdm/chooser)
|
|
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Tue Nov 10, 2020 7:30 pm Post subject: |
|
|
Presumably chooser is configured by Xaccess which is bone stock.
Going to try "pattern followed by hostnames" |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Tue Nov 10, 2020 9:30 pm Post subject: |
|
|
n desperation I was going to emerge consolekit to see if that fixed things and found that sys-auth/consolekit no longer exist! |
|
Back to top |
|
|
GDH-gentoo Veteran
Joined: 20 Jul 2019 Posts: 1528 Location: South America
|
Posted: Tue Nov 10, 2020 9:39 pm Post subject: |
|
|
Code: | Created chooser socket 3
creating socket to listen on port 177 of address 0.0.0.0 |
OK, I don't get these lines because the default /etc/X11/xdm/xdm-config contains:
Code: | ! SECURITY: do not listen for XDMCP or Chooser requests
! Comment out this line if you want to manage X terminals with xdm
DisplayManager.requestPort: 0 |
Tony0945, is this commented or removed in yours? |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Tue Nov 10, 2020 10:40 pm Post subject: |
|
|
GDH-gentoo wrote: | Tony0945, is this commented or removed in yours? |
Yes, it is:
Code: | ! SECURITY: do not listen for XDMCP or Chooser requests
! Comment out this line if you want to manage X terminals with xdm
! DisplayManager.requestPort: 0 |
BUT, in regard to my previous post, I altered the standard ebuild to remove the Gentoo consolekit patch that enables consolekit and re-installed xdm.
Now I am no longer getting the -2's. However I'm not getting my visual changes (background color, greeter text.
Spoke too soon the -2's are back again. Doesn't matter if I run firefox-bin or palemoon-bin.
Just can't figure out why one system does it and the other does. I'm going to try an older xdm.
xdm 1.1.11 standard init script
Code: | ~ $ cat /var/log/xdm.log
xdm info (pid 3433): Starting
xdm info (pid 3433): Starting X server on :0
X.Org X Server 1.20.9
X Protocol Version 11, Revision 0
Build Operating System: Linux 5.4.72-gentoo x86_64 Gentoo
Current Operating System: Linux Casti 5.4.72-gentoo #2 SMP PREEMPT Thu Oct 29 20:43:43 CDT 2020 x86_64
Kernel command line: net.ifnames=0 mitigations=off vga=0x346 rootfstype=ext4 root=/dev/sdb3 net.ifnames=0 mitigations=off
Build Date: 08 November 2020 08:35:08PM
Current version of pixman: 0.40.0
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Tue Nov 10 17:04:29 2020
(==) Using config directory: "/etc/X11/xorg.conf.d"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
resize called 1920 1080
xdm info (pid 3445): sourcing /etc/X11/xdm/Xsetup.custom
xdm info (pid 3445): sourcing /usr/lib64/X11/xdm/GiveConsole
xdm info (pid 3488): executing session /usr/lib64/X11/xdm/Xsession
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
|
|
|
Back to top |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6098 Location: Dallas area
|
Posted: Wed Nov 11, 2020 12:36 am Post subject: |
|
|
/usr/lib64/X11/xdm/Xsession
This guy does a few things
sets up for .xsession-errors
check if $1 arg (kdeism)
has these set
Code: | xinitdir=/usr/X11R6/lib/X11/xinit
startup=$HOME/.xsession
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=$xinitdir/.Xresources
sysmodmap=$xinitdir/.Xmodmap |
Then does this
Code: | if [ -n "`/etc/X11/chooser.sh`" ]; then
exec "`/etc/X11/chooser.sh`"
# If not defined, try the user's ~/.xsession
elif [ -s "$startup" ]; then
...
if [ -x "$startup" ]; then
exec "$startup"
else
exec /bin/sh "$startup"
fi
# Lastly, xsm as failsafe
else
if [ -r "$userresources" ]; then
xrdb -load "$userresources"
fi
exec xsm
fi |
Do you have an $HOME/.xsession file? if so what's in it, as it seems to want to execute it.
After that you see all the -2
While it's running and spewing -2 what does "ps afex" show as far as what's under pid 3488 in the case you just ran? _________________ PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Wed Nov 11, 2020 12:54 am Post subject: |
|
|
Code: | tony@Casti ~ $ cat $HOME/.xsession
cat: /home/tony/.xsession: No such file or directory
tony@Casti ~ $ cat ~/.xsession
cat: /home/tony/.xsession: No such file or directory
|
And from xdm.log
Code: | xdm info (pid 3488): executing session /usr/lib64/X11/xdm/Xsession |
How come I always have two xdm's running?
Code: | ~ $ ps -Al |grep xdm
5 S 0 3433 1 0 80 0 - 1214 - ? 00:00:00 xdm
1 S 0 3445 3433 0 80 0 - 3296 - ? 00:00:00 xdm
| one is the child of the other. |
|
Back to top |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6098 Location: Dallas area
|
Posted: Wed Nov 11, 2020 1:00 am Post subject: |
|
|
He expects to see this
startup=$HOME/.xsession
and with it not existing he
if [ -x "$startup" ]; then
exec "$startup"
else
exec /bin/sh "$startup"
tries to "exec /bin/sh" on an non-existent file, not sure what the system does in cases like that.
At least that's how I read the script.
Edit to add:
Quote: | ... If you log in in graphical mode on an X display manager (xdm, gdm, kdm, wdm, lightdm, …), traditionally, what is executed after you log in is some scripts in /etc/X11 then ~/.xsession.
~/.xsession has the role of ~/.profile and ~/.xinitrc combined: it's supposed to perform the initial startup of your session (e.g. define environment variables), then launch programs specific to the GUI (usually at least window manager).
Nowadays, most X display managers give you a choice of a session. Choosing a particular session launched a specific desktop environment, session manager, window manager. What is executed then is only that DE/SM/WM and whatever programs it chooses to start based on whatever configuration files it chooses to read. Many environments provide a “custom session” that reads the traditional ~/.xsession. |
ETA2:
if your .xinitrc file is workable, then create a symlink to .xsession and see what that does. _________________ PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Wed Nov 11, 2020 1:41 am Post subject: |
|
|
Code: | if [ -n "`/etc/X11/chooser.sh`" ]; then
exec "`/etc/X11/chooser.sh`"
# If not defined, try the user's ~/.xsession
elif [ -s "$startup" ]; then
# merge in defaults and keymaps
if [ -f $sysresources ]; then
xrdb -merge $sysresources
fi
if [ -f $sysmodmap ]; then
xmodmap $sysmodmap
fi
if [ -f $userresources ]; then
xrdb -merge $userresources
fi
if [ -f $usermodmap ]; then
xmodmap $usermodmap
fi
if [ -x "$startup" ]; then
exec "$startup"
else
exec /bin/sh "$startup"
fi
|
It actually executes /etc/X11/chooser.sh
It's very convoluted.
I actually got ut to stop emitting -2 by turning off palemoon's "NO SQUINT" add-on. then I rebooted and it's back. Same thing with turning dbus on.
I may need an hourly cronjob to clear the log. |
|
Back to top |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6098 Location: Dallas area
|
Posted: Wed Nov 11, 2020 1:51 am Post subject: |
|
|
Tony0945 wrote: |
It actually executes /etc/X11/chooser.sh
It's very convoluted. |
Yes, it runs chooser.sh (backticks) and if the output of that is a string that is non-zero, then it's executed, otherwise it goes on to $startup
Edit to add: chooser.sh looks for $XSESSION and if it finds it, it outputs some text otherwise it outputs a null string (0 bytes)
I don't know if you saw my eta, but symlink .xesssion to .xinitrc (that is if you have a valid .xinitrc) and see what it does. _________________ PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Wed Nov 11, 2020 3:37 am Post subject: |
|
|
Anon-E-moose wrote: | Tony0945 wrote: |
It actually executes /etc/X11/chooser.sh
It's very convoluted. |
Yes, it runs chooser.sh (backticks) and if the output of that is a string that is non-zero, then it's executed, otherwise it goes on to $startup
Edit to add: chooser.sh looks for $XSESSION and if it finds it, it outputs some text otherwise it outputs a null string (0 bytes)
I don't know if you saw my eta, but symlink .xesssion to .xinitrc (that is if you have a valid .xinitrc) and see what it does. |
It should emit "MATE or OPENBOX depending on the setting in /etc/env.d/90xsession. This is how I change window managers, edit that file, then env-update or reboot.
Code: | ~ $ cat /etc/env.d/90xsession
#XSESSION="mate"
XSESSION="openbox"
#XSESSION="gnome"
#XSESSION="twm"
|
BTW, did I say, it's much more stable now that I went back to the previous version of xdm. The current version is the first that patched it to support consolekit and it hit stable just in time for consolekit's removal from portage, presumably to be replaced by elogind. Maybe I should just forget it and switch to launching openbox from a script that starts openbox/mate. I suppose if one logouts then the script needs to be fired up again.
xdm is supposed to support everything including gnome and kde but they have their own managers. I should give up, but having run this for years, maybe a decade, I hate to quit over this.
EDIT: maybe it always did this, but I've just started noticing because I'm trying to straighten out syslog-ng. Thinking about going back to syslogkd there. /var/log/messages is so full of crud like logging every time I log in or sudo, which is a lot these days. Did I just make a lot of typos? I think I'll re-enable NoSquint. |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Wed Nov 11, 2020 3:14 pm Post subject: |
|
|
Anon-E-moose, I instrumented both /usr/lib64/X11/xdm/Xsession and /etc/X11/chooser.sh
When I start xdm with openrc-run, the first doesnt' even run. I think if /etc/X11/xdm/Xsession exists, it supersedes the one in /usr/lib.
Anyway, executing /usr/lib64/X11/xdm/Xsessio manually resuklts in Code: | ~ $ cat /var/log/mylog
Xsession POINT 0
chooser.sh POINT 1 GENTOO_SESSION=/etc/X11/Sessions/openbox
chooser.sh POINT 2 GENTOO_EXEC=/etc/X11/Sessions/openbox
Xsession POINT 1
chooser.sh POINT 1 GENTOO_SESSION=/etc/X11/Sessions/openbox
chooser.sh POINT 2 GENTOO_EXEC=/etc/X11/Sessions/openbox
| I will now create an .Xsession per the wiki and see what happens.
The modified code is here https://dpaste.com/CMEJGRF4M and here https://dpaste.com/GHZJ9TU77 |
|
Back to top |
|
|
GDH-gentoo Veteran
Joined: 20 Jul 2019 Posts: 1528 Location: South America
|
Posted: Wed Nov 11, 2020 5:54 pm Post subject: |
|
|
In my experience with XDM, not too many processes write to /var/log/xdm.log. One of the first things that Xsession does is redirect output to ~/.xsession-errors, so if the "-2" messages were printed by something that is being run by that script, I would expect them to appear in that file. On my own computer, with Gentoo's default /etc/X11/xdm/xdm-config, processes that write to xdm.log are:
- The xdm process launched by the init system.
- The X server spawned by xdm ("Server Started <PID>" in the debug output) as instructed by /etc/X11/xdm/Xservers, long-lived.
- A child xdm process associated with the server's display, that displays the login screen and then spawns Xsession ("pid: <PID>" in the debug output), long-lived. The setproctitle() invocation makes it appear as "xdm: <DISPLAY>" in the output of ps (with any option that displays the "COMMAND" column).
- For display :0, an xconsole process spawned by Xsetup_0 ("attempting to execve() /usr/lib64/X11/xdm/Xsetup_0" in the debug output), long-lived.
- Xsession (attempting to execve() /usr/lib64/X11/xdm/Xsession" in the debug output), long-lived, but then it redirects its output.
- An xrdb process for reading /etc/X11/xdm/Xresources ("attempting to execve() /usr/bin/xrdb" in the debug output), short-lived.
- The startup and reset scripts specified in xdm-config ("attempting to execve() <script pathname>" in the debug output), all short-lived. These are /usr/lib64/X11/xdm/{GiveConsole,TakeConsole} for display :0, and /usr/lib64/X11/xdm/{Xstartup,Xreset} otherwise. None of them print any output (directly).
- /usr/lib64/X11/xdm/chooser processes that display the "XDMCP Host Menu" window. I can't tell exactly when they are spawned, but these occurrences should be announced by a "RunChooser <display>" message in the debug output, and I don't see any messages like that in Tony0945's logs, or mine.
I'm very skeptic about the ConsoleKit patch having anything to do with the "-2" messages, because this:
Code: | + PKG_CHECK_MODULES(CK_CONNECTOR, ck-connector,
+ [USE_CONSOLEKIT=yes], [USE_CONSOLEKIT=no]) |
should simply turn off support if ConsoleKit is not installed, and debug output seems to confirm, because it never shows resource "consoleKit" being processed, even if it is present in xdm-config.
The "-2" messages also appear after Xsession has been spawned, and are not preceded by anything else in the debug output, so, although I can't discard it, it doesn't seem likely that they are being printed by xdm itself. There is a possibility that something that is not being directly or indirectly run by xdm is also appending to xdm.log. As suggested by Hu, the lsof program (emerge sys-process/lsof) could detect it if it is a long-lived process that keeps the file open. Short-lived processes that are being repeatedly spawned would be harder to catch, though. |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Wed Nov 11, 2020 6:20 pm Post subject: |
|
|
That's a very good roundup, GDH-gentoo.
It seems like I can suppress them by running the browsers in an xterm with "palemoon 2>/dev/null" or "firefox-bin 2>/dev/null".
In the documentation, it says that child processes inherit the log file. openbox is a child of xdm, and xterm is a child of openbox and palemoon would be a child of xterm.
But why has it stopped on the Ryzen system and still going on the Phenom II? And why does the redirection mostly work?
The two setups are not exactly the same. On the Ryzen system, instead of openbox being called directly, a fake seesion "menu" is presented and openbox, mate, or fluxbox are chosen from menu. |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Sun Mar 28, 2021 7:25 pm Post subject: |
|
|
SOLVED:
As to why it stopped on the Ryzen system and continues on the Phenom, the reason is that the ryzen system switched from nouveau to radeon.
The first clue cam when a portage update changed the -2 to a -2 with a message in front. The message referred to being unable to switch to some razy mode like 32x78 depth 8.
The final solution was to add parameters.
Code: | ~ $ cat /etc/modprobe.d/nouveau.conf
options nouveau tv_disable=1 ignorelid=1
|
I'm not sure which one did the trick. I don't use the TV-OUT on the card and the computer is a desktop not a laptop so their is no lid.
The logs are now clean of errors.
EDIT:
example:
"failure to allocate surface 33x16@32 (pitch 192)" |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|