LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Display managers are looping in runlevel 4 (https://www.linuxquestions.org/questions/slackware-14/display-managers-are-looping-in-runlevel-4-a-4175585095/)

LoveMetal 07-20-2016 04:19 AM

Display managers are looping in runlevel 4
 
Although in runlevel 3, I can login within a tty and startx, when I enable runlevel 4, the display manager asks me for login and password and when I enter them and press enter it asks for them again.
It loops and never stops.

I tried two different display managers: xdm and SLiM.

The strange thing is that xdm logs don't show any errors or warnings:

Code:

xdm info (pid 1275): Starting
xdm info (pid 1275): Starting X server on :0

X.Org X Server 1.18.3
Release Date: 2016-04-04
X Protocol Version 11, Revision 0
Build Operating System: Slackware 14.2 Slackware Linux Project
Current Operating System: Linux darkstar 4.4.14 #1 SMP Fri Jun 24 13:30:15 CDT 2016 x86_64
Kernel command line: BOOT_IMAGE=Linux-Generic ro root=805 vt.default_utf8=0
Build Date: 15 April 2016  11:05:21AM
 
Current version of pixman: 0.34.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: Wed Jul 20 01:21:21 2016
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
xdm info (pid 1295): sourcing /usr/lib64/X11/xdm/Xsetup_0
xdm info (pid 1295): sourcing /usr/lib64/X11/xdm/GiveConsole
xdm info (pid 1311): executing session /usr/lib64/X11/xdm/Xsession
xdm info (pid 1295): sourcing /usr/lib64/X11/xdm/TakeConsole
xdm info (pid 1275): Starting X server on :0
xdm info (pid 1352): sourcing /usr/lib64/X11/xdm/Xsetup_0
(II) AIGLX: Suspending AIGLX clients for VT switch
(II) AIGLX: Suspending AIGLX clients for VT switch
xdm info (pid 1275): Shutting down
xdm info (pid 1275): display :0 is being disabled
(II) Server terminated successfully (0). Closing log file.
xdm info (pid 1275): Exiting

What is this sorcery again? Any help would be appreciated, thank you in advance!

rtmistler 07-20-2016 07:05 AM

For starters runlevel4 is undefined, use runlevel5

EDIT: Sorry. Did not know that Slackware does use runlevel4!

Alien Bob 07-20-2016 07:11 AM

Quote:

Originally Posted by rtmistler (Post 5578722)
For starters runlevel4 is undefined, use runlevel5

For starters, this is a Slackware forum. Slackware does not use runlevel 5. The graphical session manager runs in level 4.

Alien Bob 07-20-2016 07:15 AM

Quote:

Originally Posted by LoveMetal (Post 5578660)
Although in runlevel 3, I can login within a tty and startx, when I enable runlevel 4, the display manager asks me for login and password and when I enter them and press enter it asks for them again.
It loops and never stops.

I tried two different display managers: xdm and SLiM.

The strange thing is that xdm logs don't show any errors or warnings:

Code:

xdm info (pid 1275): Starting
xdm info (pid 1275): Starting X server on :0

X.Org X Server 1.18.3
Release Date: 2016-04-04
X Protocol Version 11, Revision 0
Build Operating System: Slackware 14.2 Slackware Linux Project
Current Operating System: Linux darkstar 4.4.14 #1 SMP Fri Jun 24 13:30:15 CDT 2016 x86_64
Kernel command line: BOOT_IMAGE=Linux-Generic ro root=805 vt.default_utf8=0
Build Date: 15 April 2016  11:05:21AM
 
Current version of pixman: 0.34.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: Wed Jul 20 01:21:21 2016
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
xdm info (pid 1295): sourcing /usr/lib64/X11/xdm/Xsetup_0
xdm info (pid 1295): sourcing /usr/lib64/X11/xdm/GiveConsole
xdm info (pid 1311): executing session /usr/lib64/X11/xdm/Xsession
xdm info (pid 1295): sourcing /usr/lib64/X11/xdm/TakeConsole
xdm info (pid 1275): Starting X server on :0
xdm info (pid 1352): sourcing /usr/lib64/X11/xdm/Xsetup_0
(II) AIGLX: Suspending AIGLX clients for VT switch
(II) AIGLX: Suspending AIGLX clients for VT switch
xdm info (pid 1275): Shutting down
xdm info (pid 1275): display :0 is being disabled
(II) Server terminated successfully (0). Closing log file.
xdm info (pid 1275): Exiting

What is this sorcery again? Any help would be appreciated, thank you in advance!

Slackware does not come with SLIM. How did you install it? Are you perhaps running a Slackware derivative or a stripped-down version of Slackware?
If you can successfully start an X session in runlevel 3 then the issue is likely with the graphical session managers. In runlevel 4, the logging of your session is done in the file "~/.xsession-errors". Anything relevant in there? Also, X.Org logs into "/var/log/Xorg.0.log". Anything in there that sheds light on your issue?

Skaendo 07-20-2016 07:22 AM

Can you login as root from runlevel 4? If so;

In runlevel 3 issue this command:
Code:

cp /root/.xinitrc /home/*username*
Replacing *username* with your username of course, and try runlevel 4 again.

It could be that you are just missing that file in your user profile.

Didier Spaier 07-20-2016 07:33 AM

Quote:

Originally Posted by rtmistler (Post 5578722)
For starters runlevel4 is undefined, use runlevel5

This is not true for Slackware, as already pointed out by Alien Bob and as show these excerpts of /etc/inittab
Code:

# These are the default runlevels in Slackware:
#  0 = halt
#  1 = single user mode
#  2 = unused (but configured the same as runlevel 3)
#  3 = multiuser mode (default Slackware runlevel)
#  4 = X11 with KDM/GDM/XDM (session managers)
#  5 = unused (but configured the same as runlevel 3)
#  6 = reboot
<snip>
# Script to run when going multi user.
rc:2345:wait:/etc/rc.d/rc.M
<snip>
# Runlevel 4 also starts /etc/rc.d/rc.4 to run a display manager for X.
# Display managers are preferred in this order:  gdm, kdm, xdm
x1:4:respawn:/etc/rc.d/rc.4

So what happens is that rc.4 fails to start the X server for some reason (through execution of "exec /usr/bin/xdm -nodaemon" line 38, probably), thus is respawned by init.

So what we really need to know is why X fails to start.

To investigate further, please LoveMetal save two states of /var/log/Xorg.0.log: after a failed attempt to start X (in runlevel 4) and after a successful one (in runlevel 3) and post them here.

Also, do you have a genuine xdm package as found in Slackware? Be also aware that using another desktop starter session manager that xdm gdm or kdm needs to edit /etc/rc.d/rc.4.

Anyway after having posted this I will try here to see if my log looks like yours

rtmistler 07-20-2016 07:52 AM

Quote:

Originally Posted by Didier Spaier (Post 5578746)
This is not true for Slackware, as already pointed out by Alien Bob and as show these excerpts of /etc/inittab...

I've realized that and edited and struck out my text. Sorry, didn't know that about Slackware.

Didier Spaier 07-20-2016 08:06 AM

@rtmistler: no problem, don't worry.

@LoveMetal: I just tried and here is the content of /var/log/xdm.log:
Code:

xdm info (pid 1450): Starting
xdm info (pid 1450): Starting X server on :0

X.Org X Server 1.18.3
Release Date: 2016-04-04
X Protocol Version 11, Revision 0
Build Operating System: Slackware 14.2 Slackware Linux Project
Current Operating System: Linux didier 4.4.14 #2 SMP Fri Jun 24 13:38:27 CDT 2016 x86_64
Kernel command line: BOOT_IMAGE=slint64-14.2 ro root=806 nox2apic
Build Date: 15 April 2016  11:05:21AM
 
Current version of pixman: 0.34.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: Wed Jul 20 14:51:46 2016
(==) Using config directory: "/etc/X11/xorg.conf.d"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Type "ONE_LEVEL" has 1 levels, but <RALT> has 2 symbols
>                  Ignoring extra symbols
Errors from xkbcomp are not fatal to the X server
xdm info (pid 1462): sourcing /usr/lib64/X11/xdm/Xsetup_0
xdm info (pid 1462): sourcing /usr/lib64/X11/xdm/GiveConsole
xdm info (pid 1470): executing session /usr/lib64/X11/xdm/Xsession

As you can see, xdm becomes mute just after having started a session.

In your log instead I see that the same process that sourced GiveConsole then sources TakeConsole and that another process sources Xsetup_0 again.

I have no idea why and what are the actual consequences, but that looks weird.

Alien Bob 07-20-2016 08:22 AM

Quote:

Originally Posted by rtmistler (Post 5578752)
I've realized that and edited and struck out my text. Sorry, didn't know that about Slackware.

You learn something new every day. When that stops, you realize you are too old for this business :-)

LoveMetal 07-20-2016 08:48 AM

Quote:

Originally Posted by Alien Bob (Post 5578729)
Slackware does not come with SLIM. How did you install it? Are you perhaps running a Slackware derivative or a stripped-down version of Slackware?
If you can successfully start an X session in runlevel 3 then the issue is likely with the graphical session managers. In runlevel 4, the logging of your session is done in the file "~/.xsession-errors". Anything relevant in there? Also, X.Org logs into "/var/log/Xorg.0.log". Anything in there that sheds light on your issue?

I have a genuine Slackware64 14.2, and I installed SLiM with your very own slackbuild. :)
I have of course edited /etc/inittab accordingly.

The only things I did before trying to change that damn runlevel, are adding multilib support, adding bumblebee (I've got a laptop with both nvidia and intel gfx), installing awesomewm.

The interesting thing in Xorg.0.log in runlevel 4, is that there is absolutely no errors... it seems like Xorg starts and stops perfectly fine: http://pastebin.com/CmEpKMNv

As you said, there is something interesting in xsession-errors:
Code:

XDM authorization key matches an existing client!E: awesome: main:413: cannot open display (error 1)
However, awesomewm website seems to be down for now so I can't check the sources. But I tried with twm... and it works fine so it's probably somewhat tied to awesome.


@Skaendo, about the .xinitrc:
It appears that not me nor root have a .xinitrc, so I created one empty both for me and root, but... It doesn't work in runlevel4, as before, but now it doesn't even work in runlevel3 with manual startx!
And in Xorg.0.log, there are still no errors... It just start, then stop..: http://pastebin.com/NWkUbD5W

@Didier Spaier
I have the original xdm package. Here is the Xorg.0.log with a successful startup in runlevel 3: http://pastebin.com/VRNFYht8
And yes, I agree, that looks weird. :p

Quote:

Originally Posted by Alien Bob
You learn something new every day. When that stops, you realize you are too old for this business :-)

So as you are still here, I assume you are still learning new things from Slackware every day? I don't trust you. :p

Last thing, maybe it's tied, sometimes lilo is checking BIOS data in around 5 seconds, and sometimes it takes around one minute.

rtmistler 07-20-2016 08:50 AM

Quote:

Originally Posted by Alien Bob (Post 5578771)
You learn something new every day. When that stops, you realize you are too old for this business :-)

I agree :D

I'm also in an really awkward position here ...

I didn't notice the forum, I answered from the Zero Reply thread list, hence my involvement where I'm less experienced with Slack.

The other part of this is, "yes" I tried Slackware earlier this year. I hated it. I realize that TONS of people love it and have loved it for years. It's just not for me, or at least not right now. :(

Alien Bob 07-20-2016 09:16 AM

Quote:

Originally Posted by LoveMetal (Post 5578792)
I have a genuine Slackware64 14.2, and I installed SLiM with your very own slackbuild. :)
I have of course edited /etc/inittab accordingly.

The only things I did before trying to change that damn runlevel, are adding multilib support, adding bumblebee (I've got a laptop with both nvidia and intel gfx), installing awesomewm.

The interesting thing in Xorg.0.log in runlevel 4, is that there is absolutely no errors... it seems like Xorg starts and stops perfectly fine: http://pastebin.com/CmEpKMNv

As you said, there is something interesting in xsession-errors:
Code:

XDM authorization key matches an existing client!E: awesome: main:413: cannot open display (error 1)
However, awesomewm website seems to be down for now so I can't check the sources. But I tried with twm... and it works fine so it's probably somewhat tied to awesome.


@Skaendo, about the .xinitrc:
It appears that not me nor root have a .xinitrc, so I created one empty both for me and root, but... It doesn't work in runlevel4, as before, but now it doesn't even work in runlevel3 with manual startx!
And in Xorg.0.log, there are still no errors... It just start, then stop..: http://pastebin.com/NWkUbD5W

A proper ~/.xinitrc file will be created by the program "xwmconfig". Try running that (under your own user account), it will allow you to select a Window Manager.

Quote:


@Didier Spaier
I have the original xdm package. Here is the Xorg.0.log with a successful startup in runlevel 3: http://pastebin.com/VRNFYht8
And yes, I agree, that looks weird. :p
I did not see weird things in there but I just skimmed the content.

Quote:

So as you are still here, I assume you are still learning new things from Slackware every day? I don't trust you. :p
Well, the questions in the forum teach me new things, when I have to search for answers. And this topic is related to hybrid graphics, an area I know nothing about because I do not own the hardware. So there's something to be learnt about making that work.
On the topic of bumblebee, is it not so that your user account needs to be in a specific group for it to work? Group membership works a bit differently when you are logging in through runlevel 4: the only groups you are a member of are those that have been configured for you in /etc/group . Whereas in runlevel 3 (console login) your account will be dynamically added to several groups for the duration of your login. From "/etc/login.defs":
Code:

CONSOLE_GROUPS        floppy:audio:cdrom:video:lp:scanner
The "video" group may be required for your bumblebee (just guessing)? Does "grep video /etc/group" show your user account? If not, try adding it.

LoveMetal 07-20-2016 10:07 AM

With xwmconfig to choose my window manager, it still doesn't work in runlevel 4 but at least the generated .xinitrc doesn't block Xorg from starting in runlevel 3.
And yes, my user is in the video group (and also in the bumblebee group needed for hybrid graphics).


All times are GMT -5. The time now is 11:30 PM.