You are not logged in.

#1 2021-12-05 10:48:08

AndrewSmart
Member
Registered: 2019-06-10
Posts: 66

[SOLVED] [Bullseye] LightDM doesn't launch - missing dbus .conf file

upgraded from buster->bullseye `apt dist-upgrade`
lightdm non-functioning, I have no desktop!

startx works, but only for autologin'd user who owns the tty, but that is an admin account, I use a different, limited account for the desktop.

So on to this lightdm problem:

$ service lightdm start
Job for lightdm.service failed because the control process exited with error code.
See "systemctl status lightdm.service" and "journalctl -xe" for details.
$ systemctl status lightdm.service
● lightdm.service - Light Display Manager
     Loaded: loaded (/lib/systemd/system/lightdm.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Sat 2021-12-04 22:27:23 MST; 4h 19min ago
       Docs: man:lightdm(1)
    Process: 6022 ExecStart=/usr/sbin/lightdm (code=exited, status=1/FAILURE)
   Main PID: 6022 (code=exited, status=1/FAILURE)
        CPU: 28ms

Dec 04 22:27:23  systemd[1]: lightdm.service: Scheduled restart job, restart counter is at 5.
Dec 04 22:27:23  systemd[1]: Stopped Light Display Manager.
Dec 04 22:27:23  systemd[1]: lightdm.service: Start request repeated too quickly.
Dec 04 22:27:23  systemd[1]: lightdm.service: Failed with result 'exit-code'.

Dec 04 22:27:23  systemd[1]: Failed to start Light Display Manager.
Dec 04 22:27:23  systemd[1]: lightdm.service: Triggering OnFailure= dependencies.

I guess the exit-code from lightdm is "1". Not too informative. The /var/log/lightdm/lightdm.log:

[+0.00s] DEBUG: Logging to /var/log/lightdm/lightdm.log
[+0.00s] DEBUG: Starting Light Display Manager 1.26.0, UID=0 PID=31842
[+0.00s] DEBUG: Loading configuration dirs from /usr/share/lightdm/lightdm.conf.d
[+0.00s] DEBUG: Loading configuration from /usr/share/lightdm/lightdm.conf.d/01_debian.conf
[+0.00s] DEBUG: Loading configuration from /usr/share/lightdm/lightdm.conf.d/50_bunsen.conf
[+0.00s] DEBUG: Loading configuration dirs from /usr/local/share/lightdm/lightdm.conf.d
[+0.00s] DEBUG: Loading configuration dirs from /etc/xdg/lightdm/lightdm.conf.d
[+0.00s] DEBUG: Loading configuration from /etc/lightdm/lightdm.conf
[+0.00s] DEBUG: Registered seat module local
[+0.00s] DEBUG: Registered seat module xremote
[+0.00s] DEBUG: Registered seat module unity
[+0.00s] DEBUG: Using D-Bus name org.freedesktop.DisplayManager
[+0.00s] DEBUG: _g_io_module_get_default: Found default implementation local (GLocalVfs) for ‘gio-vfs’
[+0.01s] DEBUG: Monitoring logind for seats
[+0.01s] DEBUG: New seat added from logind: seat0
[+0.01s] DEBUG: Seat seat0: Loading properties from config section Seat:*
[+0.01s] DEBUG: Seat seat0 has property CanMultiSession=no
[+0.01s] DEBUG: Seat seat0: Starting
[+0.01s] DEBUG: Seat seat0: Creating user session
[+0.01s] DEBUG: Loading users from org.freedesktop.Accounts
[+0.01s] DEBUG: User /org/freedesktop/Accounts/User1004 added
[+0.01s] DEBUG: User /org/freedesktop/Accounts/User1000 added
[+0.01s] DEBUG: User /org/freedesktop/Accounts/User1001 added
[+0.02s] DEBUG: User /org/freedesktop/Accounts/User1002 added
[+0.02s] DEBUG: User /org/freedesktop/Accounts/User1003 added
[+0.03s] DEBUG: Seat seat0: Creating display server of type x
[+0.03s] DEBUG: Using VT 7
[+0.03s] DEBUG: Seat seat0: Starting local X display on VT 7
[+0.03s] DEBUG: XServer 0: Logging to /var/log/lightdm/x-0.log
[+0.03s] DEBUG: XServer 0: Writing X server authority to /var/run/lightdm/root/:0
[+0.03s] DEBUG: XServer 0: Launching X Server
[+0.03s] DEBUG: Launching process 31848: /usr/bin/X :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
[+0.03s] DEBUG: XServer 0: Waiting for ready signal from X server :0
[+0.03s] DEBUG: Acquired bus name org.freedesktop.DisplayManager
[+0.03s] DEBUG: Registering seat with bus path /org/freedesktop/DisplayManager/Seat0

The X server should log to `/var/log/lightdm/x-0.log` but it always has 0 size.

So I looked in `journalctl -xe` and found this line:

"Failed to use bus name org.freedesktop.DisplayManager, do you have
   appropriate permissions?"

First search result on that error is good, not much else better: https://archived.forum.manjaro.org/t/li … ager/22398

Which pointed me to expert analysis: https://bugzilla.redhat.com/show_bug.cgi?id=1428379

The proposed fix in comment #8 didn't work. In next comments it led me to start inspecting dbus stuff he talks about in /etc/dbus-1/system.d/, and I noticed that a conf file from lightdm install is missing:

$ dpkg -L lightdm | grep /etc/dbus
/etc/dbus-1
/etc/dbus-1/system.d
/etc/dbus-1/system.d/org.freedesktop.DisplayManager.conf
$ ll /etc/dbus-1/system.d/
total 18
-rw-r--r-- 1 root root 1261 Sep 16  2020 bluetooth.conf
-rw-r--r-- 1 root root  555 Oct 25  2020 org.blueman.Mechanism.conf
-rw-r--r-- 1 root root  443 Jan  6  2019 org.kde.kf5auth.conf
-rw-r--r-- 1 root root 1084 Aug 15  2019 pulseaudio-system.conf
-rw-r--r-- 1 root root 1160 Feb 25  2021 wpa_supplicant.conf

I thought that was weird, wondered what could have led to its accidental removal. So... --reinstall:

$ sudo apt-get --reinstall install lightdm
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0 B/172 kB of archives.
After this operation, 0 B of additional disk space will be used.
Preconfiguring packages ...
(Reading database ... 205066 files and directories currently installed.)
Preparing to unpack .../lightdm_1.26.0-7_amd64.deb ...
Unpacking lightdm (1.26.0-7) over (1.26.0-7) ...
Setting up lightdm (1.26.0-7) ...
Processing triggers for dbus (1.12.20-2) ...
Processing triggers for man-db (2.9.4-2) ...

And... sanity check:

$ ll /etc/dbus-1/system.d/
total 18
-rw-r--r-- 1 root root 1261 Sep 16  2020 bluetooth.conf
-rw-r--r-- 1 root root  555 Oct 25  2020 org.blueman.Mechanism.conf
-rw-r--r-- 1 root root  443 Jan  6  2019 org.kde.kf5auth.conf
-rw-r--r-- 1 root root 1084 Aug 15  2019 pulseaudio-system.conf
-rw-r--r-- 1 root root 1160 Feb 25  2021 wpa_supplicant.conf

What on earth?! --reinstall did not result in the missing org.freedesktop.DesktopManager.conf as expected. User error? Wrong command? apt-get bug? I can write that file manually.

Also will try a `dpkg --audit` `dpkg --verify` to see if anything else important looking is missing.

Mabye something interferes with the install, like localepurge or firejail, a bug in them? Those are only two possibilities off the top of my head, but... they shouldn't be interfering like that. Will try disabling/removing them.

Been stuck on this for nearly a week and finally have a lead on part of what causes the problem, this missing dbus org.freedesktop.DesktopManager.conf file.

--------------------

Observations on the buster->bullseye upgrade I think not relevant to the lightdm problem but will mention:

Had to remove NVIDIA 340xx proprietary drivers (for 9800GTX card) as NVIDIA dropped support for those 340xx debian packages, not available in Bullseye. I have to use nouveau now. Spent days assuming this was somehow the problem.

Another odd thing I noticed when inspecting changed packages in the upgrade is that fuse replaced gvfs-fuse, but `apt show` indicates that gvfs-fuse is a newer/better replacement.

When I first `shutdown -hP now` after the `apt dist-upgrade` I noticed it appeared to be an immediate power-off, and no wall of systemd text shutting down services and cleanly unmounting disks. But that was probably a one time thing, in the dist-upgrade it said something about it didn't load an important service (systemd/dbus? I forget) and to reboot as soon as possible.

I already did a `fsck.ext4 -p` on seeing that abrupt power-off, but will again as Bullseye seems to shutdown much quicker than Buster and I'm concerned it isn't shutting down services and cleanly unmounting disks (doing a sync) like before with Buster. Seems to hang for a split second on a red "[FAILED] Unmount /run/live/medium" line I don't remember seeing before. Well, I think I remember that line from before Buster and thought Buster fixed that, so maybe a regression in live-boot/systemd stuff? *shrugs*

EDIT: Well now on the 3rd shutdown systemd appears to be shutting down orderly like it should.

Last edited by AndrewSmart (2021-12-06 03:32:39)

Offline

#2 2021-12-05 14:00:41

rbh
Moderator
From: South of Lapplands inland
Registered: 2016-08-11
Posts: 1,921

Re: [SOLVED] [Bullseye] LightDM doesn't launch - missing dbus .conf file

AndrewSmart wrote:

upgraded from buster->bullseye `apt dist-upgrade`
lightdm non-functioning, I have no desktop!

startx works, but only for autologin'd user who owns the tty, but that is an admin account, I use a different, limited account for the desktop.

Did you on your upgrade path realy jumped over "apt upgrade", before "apt dist-upgrade"?

Link to upgrade path for helium > Lithium: https://forums.bunsenlabs.org/viewtopic.php?id=6913
And for Buster > Bullseye: https://www.debian.org/releases/stable/ … ading.html

So, your admin user is auto logged in both on tty1 and in graphical desktop? Can you log out admin-user from tty1 and log in user and restart x?

What on earth?! --reinstall did not result in the missing org.freedesktop.DesktopManager.conf as expected.

Yes, it is realy broken. So, continue debugging or reinstall?

When I first `shutdown -hP now`

"shutdown -h 0", is the same as "shutdown -HP 0"...

I already did a `fsck.ext4 -p`

Do you mean "fsck.ext4 -P"? Not together with -A?


// Regards rbh

Please read before requesting help: "Guide to getting help", "Introduction to the Bunsenlabs Lithium Desktop" and other help topics under "Help & Resources" on the BunsenLabs menu

Offline

#3 2021-12-06 03:01:22

AndrewSmart
Member
Registered: 2019-06-10
Posts: 66

Re: [SOLVED] [Bullseye] LightDM doesn't launch - missing dbus .conf file

rbh wrote:
AndrewSmart wrote:

upgraded from buster->bullseye `apt dist-upgrade`
lightdm non-functioning, I have no desktop!

startx works, but only for autologin'd user who owns the tty, but that is an admin account, I use a different, limited account for the desktop.

Did you on your upgrade path realy jumped over "apt upgrade", before "apt dist-upgrade"?

Link to upgrade path for helium > Lithium: https://forums.bunsenlabs.org/viewtopic.php?id=6913
And for Buster > Bullseye: https://www.debian.org/releases/stable/ … ading.html

I removed a bunch of old packages, then did `apt upgrade` before the `dist-upgrade`. I didn't do exactly what those guides say in removing the backports and buster repositories before the dist-upgrade. I suppose I could have rebooted into the new kernel linux-image-4.19.0-18-amd64 before doing the dist-upgrade. Also sholud have purged the old packages config files like those guides said to but I assumed they'd be fine.

While maybe 20 buster packages were left over after the dist-upgrade I'd since removed them in my earlier troubleshooting, now just a few, one from bunsenlabs, the other two don't matter:

$ apt list ?obsolete
bunsen-configs-live/now 10.4.3-1 all [installed,local]
ctags/now 5.9.0-1 amd64 [installed,local]
packages-microsoft-prod/now 1.0-debian10.1 all [installed,local]
rbh wrote:

So, your admin user is auto logged in both on tty1 and in graphical desktop? Can you log out admin-user from tty1 and log in user and restart x?

Oh well my setup is my admin user autologs into the ttys. And the browser account, without sudo access, autologs into the graphical deskop. Couldn't log out of the admin account cause it'd just autolog back in :o) Odd situation I guess.

rbh wrote:

What on earth?! --reinstall did not result in the missing org.freedesktop.DesktopManager.conf as expected.

Yes, it is realy broken. So, continue debugging or reinstall?

Debugging I guess. Or reinstall if I clearly see a landmine. Thought maybe someone else would/did experience this oddness.

I manually put that org.freedesktop.DesktopManager.conf where it should go and lightdm works now. apt-get did put it there, org.freedesktop.DesktopManager.conf.Dpkg-new during the unpacking stage but then during the installation stage it deleted it. Not something I'd seen before.

Some other config files missing when inspecting `dpkg --verify`, like /etc/UPower/Upower.conf, and lightdm also didn't install/update its config files in /etc/apparmor.d/ /etc/lightdm/ and /etc/pam.d/. Seems like something to do with the lightdm package.

localepurge wasn't the problem. Figuring out firejail now, and using dpkg debugging to get insight.

rbh wrote:

I already did a `fsck.ext4 -p`

Do you mean "fsck.ext4 -P"? Not together with -A?

I don't see either -P or -A config options on fsck.ext4, just -p. I don't understand. Joke that went over my head?

Last edited by AndrewSmart (2021-12-06 03:18:22)

Offline

Board footer

Powered by FluxBB