Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 886607 - x11-misc/lightdm-1.32.0-r1: does not start X on Nvidia GPUs unless logind-check-graphical=false
Summary: x11-misc/lightdm-1.32.0-r1: does not start X on Nvidia GPUs unless logind-che...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Marek Szuba
URL: https://github.com/canonical/lightdm/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-18 10:15 UTC by Marcus Comstedt
Modified: 2023-01-20 09:37 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcus Comstedt 2022-12-18 10:15:09 UTC
It seems that lightdm has grown a dependency on logind and therefore does
not work out of the box without systemd anymore.

The workaround is to put

logind-check-graphical=false

into /etc/lightdm/lightdm.conf

Reproducible: Always

Steps to Reproduce:
1.Install lightdm on an OpenRC system
2.Select DISPLAYMANAGER="lightdm" in /etc/conf.d/display-manager
3.Run /etc/init.d/display-manager start
Actual Results:  
lightdm starts, but no X server or greeter is started

Expected Results:  
A graphical login greeter is presented
Comment 1 Marek Szuba archtester gentoo-dev 2022-12-22 16:54:06 UTC
Thank you for your report! Have you got sys-auth/elogind installed and enabled on your system?
Comment 2 Marcus Comstedt 2022-12-22 17:07:49 UTC
sys-auth/elogind-246.10-r2 is installed as a dependency of sys-apps/dbus, sys-auth/polkit and other packages.  I don't see it enabled on any runlevel in
rc-update, but ps shows that a process "elogind-daemon" is running the command
"/lib64/elogind/elogind" anyway.
Comment 3 Marek Szuba archtester gentoo-dev 2022-12-22 17:26:57 UTC
In that case I am confused. You do have elogind active, both versions of display-manager.initd currently in the tree have "after elogind" on the dependency list, as far as I can tell lightdm does not directly link against any systemd-related libraries... Any ideas, X11 people?
Comment 4 Marek Szuba archtester gentoo-dev 2022-12-22 17:33:01 UTC
Possibly related, however if so then the problem is display driver-specific rather than OpenRC-specific. What display driver do you use? And what do you see in the logs, anyway?
Comment 5 Marcus Comstedt 2022-12-22 17:37:26 UTC
So, just to make sure I changed the logind-check-graphical=false line back and rebooted.

After looking in (non-graphically, since the X server is not started) I can see that both elogind-daemon and lightdm are indeed running.  I can run /etc/init.d/display-manager restart at this point, but it makes no difference -- the X server is still not started.  I am not allowed to run /etc/init.d/elogind restart, getting the error message "/lib64/elogind/elogind is already running".
Comment 6 Marcus Comstedt 2022-12-22 17:43:21 UTC
Display driver?  You mean in Xorg.conf?  I would imagine that doesn't matter since X is never started in the first place?  (There is no /var/log/Xorg*.  If I do the logind-check-graphical workaround and restart display-manager, _then_ X starts and I get a /var/log/Xorg.0.log.)
Comment 7 Marcus Comstedt 2022-12-22 17:57:22 UTC
So, I read the linked github issue where someone got things to work by doing modprobe nvidia and nvidia-drm.

Well, this is also NVidia hardware, Tegra TX2 to be exact, but I have the framebuffer drivers (CONFIG_FB_TEGRA, and also CONFIG_DRM_KMS_HELPER and CONFIG_DRM_KMS_FB_HELPER) compiled directly in to the kernel, so there is nothing to modprobe.
Comment 8 Marcus Comstedt 2022-12-22 18:04:00 UTC
Adding "nomodeset" to the kernel command line _does_ work though.  But as far as workarounds go I'm happier with just disabling "logind-check-graphical".  :-)
Comment 9 Marek Szuba archtester gentoo-dev 2022-12-22 18:08:00 UTC
Could you try another workaround from the aforementioned issue, i.e. temporarily add a delay to /etc/init.d/display-manager?
Comment 10 Marcus Comstedt 2022-12-22 18:13:35 UTC
What would a delay in the start script do if manually restarting lightdm with "/etc/init.d/display-manager restart" after a long time does not help?
I'm logged in now so if it is important to test this I'll have to do it later, but it seems kind of pointless to me...
Comment 11 Andrew 2023-01-19 21:48:10 UTC
I'm affected by this problem as well - having black text screen after updating and rebooting all of a sudden. Workaround mentioned by Macrus worked though.
Comment 12 Larry the Git Cow gentoo-dev 2023-01-20 09:37:13 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7f6e04a9631927951cf1b49431622dac5e70ed22

commit 7f6e04a9631927951cf1b49431622dac5e70ed22
Author:     Marek Szuba <marecki@gentoo.org>
AuthorDate: 2023-01-20 09:29:24 +0000
Commit:     Marek Szuba <marecki@gentoo.org>
CommitDate: 2023-01-20 09:37:02 +0000

    x11-misc/lightdm: tell the users experiencing the "X not started on a Nvidia GPU" problem what to do
    
    Leaving the deployed default configuration be because the issue appears
    to be a bug in Nvidia drivers rather than lightdm itself, and I see no
    point in switching this off for everyone when all that is needed is a
    one-time, one-line change.
    
    Closes: https://bugs.gentoo.org/886607
    Signed-off-by: Marek Szuba <marecki@gentoo.org>

 x11-misc/lightdm/lightdm-1.32.0-r2.ebuild | 8 ++++++++
 1 file changed, 8 insertions(+)