You are not logged in.

#1 2025-09-27 19:49:00

tda
Member
Registered: 2020-06-27
Posts: 51

[SOLVED] Gnome/Wayland won't start with dbus-run-session gnome-session

I've been using the command below to start Gnome on Wayland, and it has worked for a couple of years:

XDG_SESSION_TYPE=wayland dbus-run-session gnome-session

However, since updates a few days ago, that command gives me this error, and Gnome does not start:

*** Message: 15:21:50.930: Starting GNOME session target: gnome-session-wayland@wayland.target

** (process:965): WARNING **: 15:21:51.010: Could not get unit for graphical-session-pre.target: GDBus.Error:org.freedesktop.systemd1.NoSuchUnit: Unit graphical-session-pre.target not loaded.

My journalctl shows this:

Sep 27 15:34:50 trevorsdesktop systemd[765]: Starting D-Bus User Message Bus...
Sep 27 15:34:50 trevorsdesktop dbus-broker-launch[1198]: Policy to allow eavesdropping in /usr/share/dbus-1/session.conf +31: Eavesdropping is deprecated and ignored
Sep 27 15:34:50 trevorsdesktop dbus-broker-launch[1198]: Policy to allow eavesdropping in /usr/share/dbus-1/session.conf +33: Eavesdropping is deprecated and ignored
Sep 27 15:34:50 trevorsdesktop systemd[765]: Started D-Bus User Message Bus.
Sep 27 15:34:50 trevorsdesktop dbus-broker-launch[1198]: Ready
Sep 27 15:34:50 trevorsdesktop systemd[765]: Reached target GNOME Wayland Session.
Sep 27 15:34:50 trevorsdesktop systemd[765]: Reached target Session services which should run early before the graphical session is brought up.
Sep 27 15:34:50 trevorsdesktop systemd[765]: Starting Monitor Session leader for GNOME Session...
Sep 27 15:34:50 trevorsdesktop systemd[765]: Started Monitor Session leader for GNOME Session.
Sep 27 15:34:50 trevorsdesktop systemd[765]: Reached target Tasks to be run before GNOME Session starts.
Sep 27 15:34:50 trevorsdesktop systemd[765]: Starting GNOME Session Manager (session: wayland)...
Sep 27 15:34:50 trevorsdesktop gnome-session-service[1206]: Could not get session id for session. Check that logind is properly installed and pam_systemd is getting used at login.
Sep 27 15:34:50 trevorsdesktop gnome-session-s[1206]: Failed to fill session
Sep 27 15:34:50 trevorsdesktop systemd[765]: gnome-session-manager@wayland.service: Failed with result 'protocol'.
Sep 27 15:34:50 trevorsdesktop systemd[765]: Stopped GNOME Session Manager (session: wayland).
Sep 27 15:34:50 trevorsdesktop systemd[765]: gnome-session-manager@wayland.service: Triggering OnFailure= dependencies.
Sep 27 15:34:50 trevorsdesktop systemd[765]: Stopped target GNOME Wayland Session.
Sep 27 15:34:50 trevorsdesktop systemd[765]: Stopped target Tasks to be run before GNOME Session starts.
Sep 27 15:34:50 trevorsdesktop systemd[765]: Stopped target Session services which should run early before the graphical session is brought up.
Sep 27 15:34:50 trevorsdesktop systemd[765]: Reached target Shutdown running GNOME Session.
Sep 27 15:34:50 trevorsdesktop systemd[765]: Stopping Monitor Session leader for GNOME Session...
Sep 27 15:34:50 trevorsdesktop systemd[765]: Starting Restart DBus after GNOME Session shutdown...
Sep 27 15:34:50 trevorsdesktop systemd[765]: Stopped target Shutdown running GNOME Session.
Sep 27 15:34:50 trevorsdesktop systemd[765]: Stopped Monitor Session leader for GNOME Session.
Sep 27 15:34:50 trevorsdesktop systemd[765]: Started Restart DBus after GNOME Session shutdown.
Sep 27 15:34:50 trevorsdesktop dbus-broker[1199]: Dispatched 366 messages @ 2(±3)μs / message.
Sep 27 15:34:50 trevorsdesktop systemd[765]: Stopping D-Bus User Message Bus...
Sep 27 15:34:50 trevorsdesktop systemd[765]: Stopped D-Bus User Message Bus.

Recently, there have been some similar problems mentioned in this forum, but none of the fixes for those problems have worked for me. Here are some notes:

  • My /etc/nsswitch.conf is up-to-date

  • My /etc/gdm/custom.conf has #WaylandEnable=False

  • I can start gnome with gnome-shell --wayland (which I know is not recommended)

Last edited by tda (2025-10-31 03:07:49)

Offline

#2 2025-10-20 08:30:19

leonshaw
Member
Registered: 2012-01-11
Posts: 21

Re: [SOLVED] Gnome/Wayland won't start with dbus-run-session gnome-session

I encountered similar issue after upgrading to gnome-session 49, and solved by setting environment with systemd:

Create a drop-in confinguration /etc/systemd/system/getty@tty1.service.d/wayland.conf:

[Service]
Environment=XDG_SESSION_TYPE=wayland

Reload systemd, restart getty@tty1.service, login and simply run

gnome-session

.

Offline

#3 2025-10-20 08:38:40

onkehh
Member
Registered: 2014-10-03
Posts: 17

Re: [SOLVED] Gnome/Wayland won't start with dbus-run-session gnome-session

edit: ignore, the above fixed it. Great timing, thanks leonshaw ! (how on earth did you figure that out!?)

Same here (and yes I checked those above files too!). Was using x11 without a problem and trying to migrate to wayland but it's not making things easy!

gnome-shell --wayland works, but as the Gnome wiki entry points out, this lacks session management so it cannot be cleanly exited. Any ideas would be most appreciated!

Console output:

Failed to upload environment to systemd: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Name "org.freedesktop.systemd1" does not exist
Failed to check if unit gnome-session-wayland@gnome.target is active: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Name "org.freedesktop.systemd1" does not exist
Failed to reset failed state of units: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Name "org.freedesktop.systemd1" does not exist
GNOME session target: gnome-session-wayland@gnome.target
Failed to start unit gnome-session-wayland@gnome.target: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Name "org.freedesktop.systemd1" does not exist

journalctl:

Oct 20 16:38:50 xps13 systemd[614]: Created slice User Core Session Slice.
Oct 20 16:38:50 xps13 systemd[614]: Starting D-Bus User Message Bus...
Oct 20 16:38:50 xps13 dbus-broker-launch[714]: Policy to allow eavesdropping in /usr/share/dbus-1/session.conf +31: Eavesdropping is deprecated and ignored
Oct 20 16:38:50 xps13 dbus-broker-launch[714]: Policy to allow eavesdropping in /usr/share/dbus-1/session.conf +33: Eavesdropping is deprecated and ignored
Oct 20 16:38:50 xps13 systemd[614]: Started D-Bus User Message Bus.
Oct 20 16:38:50 xps13 dbus-broker-launch[714]: Ready
Oct 20 16:38:50 xps13 kernel: traps: gnome-session-i[710] trap int3 ip:78cfe987eb8c sp:7ffe12d00aa0 error:0 in libglib-2.0.so.0.8600.0[64b8c,78cfe9838000+a7000]
Oct 20 16:38:50 xps13 systemd-coredump[720]: Process 710 (gnome-session-i) of user 1000 terminated abnormally with signal 5/TRAP, processing...
Oct 20 16:38:50 xps13 systemd[1]: Created slice Slice /system/systemd-coredump.
Oct 20 16:38:50 xps13 systemd[1]: Started Process Core Dump (PID 720/UID 0).
Oct 20 16:38:51 xps13 systemd-coredump[721]: Process 710 (gnome-session-i) of user 1000 dumped core.
                                             
                                             Stack trace of thread 710:
                                             #0  0x000078cfe987eb8c g_log_structured_array (libglib-2.0.so.0 + 0x64b8c)
                                             #1  0x000078cfe987f2e0 g_log_default_handler (libglib-2.0.so.0 + 0x652e0)
                                             #2  0x000078cfe987f57a g_logv (libglib-2.0.so.0 + 0x6557a)
                                             #3  0x000078cfe987f904 g_log (libglib-2.0.so.0 + 0x65904)
                                             #4  0x000055865d805686 n/a (/usr/lib/gnome-session-init-worker + 0x2686)
                                             #5  0x000078cfe9427675 n/a (libc.so.6 + 0x27675)
                                             #6  0x000078cfe9427729 __libc_start_main (libc.so.6 + 0x27729)
                                             #7  0x000055865d805c95 n/a (/usr/lib/gnome-session-init-worker + 0x2c95)
                                             
                                             Stack trace of thread 719:
                                             #0  0x000078cfe949f042 n/a (libc.so.6 + 0x9f042)
                                             #1  0x000078cfe94931ac n/a (libc.so.6 + 0x931ac)
                                             #2  0x000078cfe94931f4 n/a (libc.so.6 + 0x931f4)
                                             #3  0x000078cfe950da36 ppoll (libc.so.6 + 0x10da36)
                                             #4  0x000078cfe987a744 n/a (libglib-2.0.so.0 + 0x60744)
                                             #5  0x000078cfe987a9d7 g_main_loop_run (libglib-2.0.so.0 + 0x609d7)
                                             #6  0x000078cfe9aeb264 n/a (libgio-2.0.so.0 + 0x11a264)
                                             #7  0x000078cfe98b187c n/a (libglib-2.0.so.0 + 0x9787c)
                                             #8  0x000078cfe94969cb n/a (libc.so.6 + 0x969cb)
                                             #9  0x000078cfe951aa0c n/a (libc.so.6 + 0x11aa0c)
                                             
                                             Stack trace of thread 717:
                                             #0  0x000078cfe951876d syscall (libc.so.6 + 0x11876d)
                                             #1  0x000078cfe98a97ee g_cond_wait (libglib-2.0.so.0 + 0x8f7ee)
                                             #2  0x000078cfe98401cd n/a (libglib-2.0.so.0 + 0x261cd)
                                             #3  0x000078cfe98b2447 n/a (libglib-2.0.so.0 + 0x98447)
                                             #4  0x000078cfe98b187c n/a (libglib-2.0.so.0 + 0x9787c)
                                             #5  0x000078cfe94969cb n/a (libc.so.6 + 0x969cb)
                                             #6  0x000078cfe951aa0c n/a (libc.so.6 + 0x11aa0c)
                                             
                                             Stack trace of thread 718:
                                             #0  0x000078cfe949f042 n/a (libc.so.6 + 0x9f042)
                                             #1  0x000078cfe94931ac n/a (libc.so.6 + 0x931ac)
                                             #2  0x000078cfe94931f4 n/a (libc.so.6 + 0x931f4)
                                             #3  0x000078cfe950da36 ppoll (libc.so.6 + 0x10da36)
                                             #4  0x000078cfe987a744 n/a (libglib-2.0.so.0 + 0x60744)
                                             #5  0x000078cfe987a825 g_main_context_iteration (libglib-2.0.so.0 + 0x60825)
                                             #6  0x000078cfe987a872 n/a (libglib-2.0.so.0 + 0x60872)
                                             #7  0x000078cfe98b187c n/a (libglib-2.0.so.0 + 0x9787c)
                                             #8  0x000078cfe94969cb n/a (libc.so.6 + 0x969cb)
                                             #9  0x000078cfe951aa0c n/a (libc.so.6 + 0x11aa0c)
                                             ELF object binary architecture: AMD x86-64
Oct 20 16:38:51 xps13 systemd[1]: systemd-coredump@0-1-720_1020-0.service: Deactivated successfully.

Last edited by onkehh (2025-10-20 08:49:26)

Offline

#4 2025-10-20 14:50:17

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 70,964

Re: [SOLVED] Gnome/Wayland won't start with dbus-run-session gnome-session

Also see https://wiki.archlinux.org/title/Talk:G … nd_session
Somebody (actually running gnome and this way, ie. not me) might want to update the wiki itr…

Offline

#5 2025-10-29 06:04:05

tda
Member
Registered: 2020-06-27
Posts: 51

Re: [SOLVED] Gnome/Wayland won't start with dbus-run-session gnome-session

Thanks everyone, leonshaw's solution worked for me.

Offline

#6 2025-10-31 00:25:11

tda
Member
Registered: 2020-06-27
Posts: 51

Re: [SOLVED] Gnome/Wayland won't start with dbus-run-session gnome-session

Actually...one last thing. The gnome-session command works when I run it manually, but I'd like to set it up so that command is run automatically at login. Before I ran into this problem, I had this in my ~/.zprofile which worked:

if [[ -z $DISPLAY && $(tty) == /dev/tty1 && $XDG_SESSION_TYPE == tty ]]; then
    MOZ_ENABLE_WAYLAND=1 QT_QPA_PLATFORM=wayland XDG_SESSION_TYPE=wayland exec dbus-run-session gnome-session
fi

But now I have to change it to work with the gnome-session command. I've tried this:

if [[ -z $DISPLAY && $(tty) == /dev/tty1 && $XDG_SESSION_TYPE == wayland ]]; then
    MOZ_ENABLE_WAYLAND=1 QT_QPA_PLATFORM=wayland exec gnome-session
fi

and this:

if [[ -z $DISPLAY && $(tty) == /dev/tty1 && $XDG_SESSION_TYPE == wayland ]]; then
    MOZ_ENABLE_WAYLAND=1 QT_QPA_PLATFORM=wayland gnome-session
fi

but they both hang in the console with a blinking underscore, and I'm never taken into the Gnome GUI.

Last edited by tda (2025-10-31 00:25:51)

Offline

#7 2025-10-31 02:25:06

leonshaw
Member
Registered: 2012-01-11
Posts: 21

Re: [SOLVED] Gnome/Wayland won't start with dbus-run-session gnome-session

edit: just change to

gnome-session --no-reexec

which disables re-exec.

---

tda wrote:

I've tried this:

if [[ -z $DISPLAY && $(tty) == /dev/tty1 && $XDG_SESSION_TYPE == wayland ]]; then
    MOZ_ENABLE_WAYLAND=1 QT_QPA_PLATFORM=wayland exec gnome-session
fi

gnome-session internally re-executes with a login shell, which sources .profile again and loops. Try adding a guard like this

[[ $- == *i* ]]

to make sure gnome-session is only executed in interactive shell.

Last edited by leonshaw (2025-10-31 02:30:26)

Offline

#8 2025-10-31 03:07:36

tda
Member
Registered: 2020-06-27
Posts: 51

Re: [SOLVED] Gnome/Wayland won't start with dbus-run-session gnome-session

Easy enough, thanks!

Offline

Board footer

Powered by FluxBB