You are not logged in.

#1 2023-10-15 21:54:40

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

[SOLVED] applications slow to open in Gnome with Wayland

I am using Gnome. If I start a Wayland session using:

XDG_SESSION_TYPE=wayland dbus-run-session gnome-session

then I get this warning:

$ XDG_SESSION_TYPE=wayland dbus-run-session gnome-session
dbus-daemon[673]: [session uid=1000 pid=673] Activating service name='org.freedesktop.systemd1' requested by ' :1.4' (uid=1000 pid=674 comm="/usr/lib/gnome-session-binary")
dbus-daemon[673]: [session uid=1000 pid=673] Activated service 'org.freedesktop.systemd1' failed: Process org.freedesktop.systemd1 exited with status 1
dbus-daemon[673]: [session uid=1000 pid=673] Activating service name ='org.gtk.vfs.Daemon' requested by ' :1.5' (uid=1000 pid=726 comm="/usr/bin/gnome-shell")
dbus-daemon[673]: [session uid=1000 pid=673] Successfully activated service 'org.gtk.vfs.Daemon'

Then the GUI comes up and if I try to open an application (console (kgx), file browser (nautilus), chromium, etc.) it takes about 20 seconds for the application to start.

Some insights:

  • I do not have this problem with X11.

  • There is a similar issue here but to the best of my understanding that issue was due to the .xinitrc.

  • Based on some other similar issues online, I also tried uninstalling xdg-desktop-portal-gnome but that didn't seem to fix the problem.

Last edited by tda (2023-10-23 18:07:58)

Offline

#2 2023-10-16 07:11:24

seth
Member
Registered: 2012-09-03
Posts: 61,169

Online

#3 2023-10-21 18:46:15

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

Re: [SOLVED] applications slow to open in Gnome with Wayland

I have looked through that topic, and other topics linked from that topic, but I still can't figure out what is wrong. I also tried using Gnome and Wayland on my laptop, and I got the same behavior. Also, sometimes the system hangs after the XDG_SESSION_TYPE command and I am not taken to the GUI, and I have to force restart. I have also noticed that the slow open time is is limited to only some applications:

Open slow (about 20 seconds):

  • firefox

  • chromium

  • console (kgx)

  • file browser (nautilus)


Open fast (about 1 second):

  • okular

  • gimp

  • gnumeric

Offline

#4 2023-10-21 19:34:06

seth
Member
Registered: 2012-09-03
Posts: 61,169

Re: [SOLVED] applications slow to open in Gnome with Wayland

https://bbs.archlinux.org/viewtopic.php … 0#p2126740
Your approach to start gnome (which is in the wiki, I know) leads to a broken session bus and therefore dbus timeouts.

Online

#5 2023-10-21 20:54:32

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

Re: [SOLVED] applications slow to open in Gnome with Wayland

Thanks for the help, but I still can't get it to work. I've tried:

1) Uninstalling xdg-desktop-portal-gnome and installing xdg-desktop-portal-gtk

2) Creating

~/.local/share/applications/org.gnome.Shell-Wayland.desktop
~/.config/gnome-session/sessions/gnome-wayland.session

as described here and then running

$ gnome-session --session=gnome-wayland

That command completes but does not take me to the GUI. Note that I did not have a ~/.config/gnome-session/sessions/ directory so I had to create it.

3) Using the bash_profile you mention here

Offline

#6 2023-10-21 21:06:35

seth
Member
Registered: 2012-09-03
Posts: 61,169

Re: [SOLVED] applications slow to open in Gnome with Wayland

That command completes but does not take me to the GUI.

What do the files you created look like ?
You're supposed to copy and alter the existing global versions.

Online

#7 2023-10-21 21:21:00

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

Re: [SOLVED] applications slow to open in Gnome with Wayland

Yup I copied the files and modified them as described in the post. Here are their full versions:

http://0x0.st/HJtr.txt
http://0x0.st/HJti.txt

Offline

#8 2023-10-21 21:37:50

seth
Member
Registered: 2012-09-03
Posts: 61,169

Re: [SOLVED] applications slow to open in Gnome with Wayland

Don't try the bash_profile from that thread.

Does "gnome-session --session=gnome-wayland" cause any errors/messages/warnings to show up in the system journal?
What's the output of "ps aux | grep gnome" after attempting it?

Online

#9 2023-10-21 22:00:31

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

Re: [SOLVED] applications slow to open in Gnome with Wayland

Yes I believe these are the relevant errors from journalctl (the full output is here: http://0x0.st/HJtP.bin ):

Oct 21 17:46:49 trevorsdesktop systemd[649]: Starting D-Bus User Message Bus...
Oct 21 17:46:49 trevorsdesktop systemd[649]: Started D-Bus User Message Bus.
Oct 21 17:46:49 trevorsdesktop dbus-daemon[691]: [session uid=1000 pid=691] Successfully activated service 'org.freedesktop.systemd1'
Oct 21 17:46:49 trevorsdesktop gnome-session[684]: gnome-session-binary[684]: WARNING: Falling back to non-systemd startup procedure due to error: GDBus.Error:org.freedesktop.systemd1.NoSuchUnit: Unit gnome-session-tty@gnome-wayland.target not found.
Oct 21 17:46:49 trevorsdesktop gnome-session-binary[684]: WARNING: Falling back to non-systemd startup procedure due to error: GDBus.Error:org.freedesktop.systemd1.NoSuchUnit: Unit gnome-session-tty@gnome-wayland.target not found.
Oct 21 17:46:49 trevorsdesktop gnome-session[684]: gnome-session-binary[684]: WARNING: Could not get session id for session. Check that logind is properly installed and pam_systemd is getting used at login.
Oct 21 17:46:49 trevorsdesktop gnome-session-binary[684]: WARNING: Could not get session id for session. Check that logind is properly installed and pam_systemd is getting used at login.
Oct 21 17:46:49 trevorsdesktop gnome-session[684]: gnome-session-binary[684]: WARNING: Unable to find required component 'gnome-settings-daemon'
Oct 21 17:46:49 trevorsdesktop gnome-session-binary[684]: WARNING: Unable to find required component 'gnome-settings-daemon'
Oct 21 17:46:49 trevorsdesktop gnome-session-binary[684]: Entering running state
Oct 21 17:46:49 trevorsdesktop gnome-session-f[695]: Cannot open display:

The ps command output is:

$ ps aux | grep gnome
trevor       701  0.0  0.0   6548  2432 tty1     S+   17:52   0:00 grep gnome

Offline

#10 2023-10-21 22:24:33

seth
Member
Registered: 2012-09-03
Posts: 61,169

Re: [SOLVED] applications slow to open in Gnome with Wayland

Do you set any XDG environment variables that would lead away from ~/.config and ~/.local?

Edit:

# Must be in sync with gnome-session@gnome.target.d/gnome.session.conf drop-in
cat /usr/lib/systemd/user/gnome-session@gnome.target.d/gnome.session.conf

Last edited by seth (2023-10-21 22:29:11)

Online

#11 2023-10-21 23:14:40

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

Re: [SOLVED] applications slow to open in Gnome with Wayland

I didn't set any environment variables in my personal dot files or anything like that.

$ cat /usr/lib/systemd/user/gnome-session@gnome.target.d/gnome.session.conf
[Unit]
# Must be in sync with gnome.session
Wants=org.gnome.SettingsDaemon.A11ySettings.target
Wants=org.gnome.SettingsDaemon.Color.target
Wants=org.gnome.SettingsDaemon.Datetime.target
Wants=org.gnome.SettingsDaemon.Housekeeping.target
Wants=org.gnome.SettingsDaemon.Keyboard.target
Wants=org.gnome.SettingsDaemon.MediaKeys.target
Wants=org.gnome.SettingsDaemon.Power.target
Wants=org.gnome.SettingsDaemon.PrintNotifications.target
Wants=org.gnome.SettingsDaemon.Rfkill.target
Wants=org.gnome.SettingsDaemon.ScreensaverProxy.target
Wants=org.gnome.SettingsDaemon.Sharing.target
Wants=org.gnome.SettingsDaemon.Smartcard.target
Wants=org.gnome.SettingsDaemon.Sound.target
Wants=org.gnome.SettingsDaemon.UsbProtection.target
Wants=org.gnome.SettingsDaemon.Wacom.target
Wants=org.gnome.SettingsDaemon.XSettings.target

Requires=org.gnome.Shell.target

and

$ printenv
SHELL=/bin/bash
CREDENTIALS_DIRECTORY=/run/credentials/getty@tty1.service
MEMORY_PRESSURE_WRITE=c29tZSAyMDAwMDAgMjAwMDAwMAA=
XDG_SEAT=seat0
PWD=/home/trevor
LOGNAME=trevor
XDG_SESSION_TYPE=tty
SYSTEMD_EXEC_PID=591
MOTD_SHOWN=pam
HOME=/home/trevor
LANG=en_US.UTF-8
MEMORY_PRESSURE_WATCH=/sys/fs/cgroup/system.slice/system-getty.slice/getty@tty1.service/memory.pressure
INVOCATION_ID=ca10f606499949e1886bd73013febadf
XDG_SESSION_CLASS=user
TERM=linux
USER=trevor
SHLVL=0
XDG_VTNR=1
XDG_SESSION_ID=1
XDG_RUNTIME_DIR=/run/user/1000
DEBUGINFOD_URLS=https://debuginfod.archlinux.org 
XDG_DATA_DIRS=/home/trevor/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share/:/usr/share/
PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
MAIL=/var/spool/mail/trevor
_=/usr/bin/printenv

Offline

#12 2023-10-22 07:37:54

seth
Member
Registered: 2012-09-03
Posts: 61,169

Re: [SOLVED] applications slow to open in Gnome with Wayland

Time for the broadsword then:

strace -f -o /tmp/gnomesucks.strace gnome-session --session=gnome-wayland

/tmp/gnomesucks.strace is probably gonna end up being HUGE, 0x0.st has a limit of 512MB

Online

#13 2023-10-22 17:06:03

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

Re: [SOLVED] applications slow to open in Gnome with Wayland

Offline

#14 2023-10-22 18:00:41

seth
Member
Registered: 2012-09-03
Posts: 61,169

Re: [SOLVED] applications slow to open in Gnome with Wayland

685   openat(AT_FDCWD, "/home/trevor/.config/gnome-session/sessions/gnome-wayland.session", O_RDONLY|O_CLOEXEC) = 13
…
685   openat(AT_FDCWD, "/home/trevor/.local/share/applications/org.gnome.Shell-Wayland.desktop", O_RDONLY|O_CLOEXEC) = 13
…
685   openat(AT_FDCWD, "/home/trevor/.config/autostart/gnome-settings-daemon.desktop", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
…
685   openat(AT_FDCWD, "/usr/share/applications/gnome/gnome/settings/daemon.desktop", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
…
685   write(2, "gnome-session-binary[685]: WARNI"..., 94) = 94
…
696   execve("/usr/lib/gnome-session-failed", ["/usr/lib/gnome-session-failed", "--allow-logout"], 0x55630d245440 /* 51 vars */ <unfinished ...>

Really seems to freak out about gnome-settings.
What happens if you remove that from the RequiredComponents ?

Online

#15 2023-10-22 18:25:41

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

Re: [SOLVED] applications slow to open in Gnome with Wayland

If I remove it, then the command runs as before - it completes without error but does not open the GUI. Here is the strace output:

https://0x0.st/HJYg.txt

Offline

#16 2023-10-22 21:06:42

seth
Member
Registered: 2012-09-03
Posts: 61,169

Re: [SOLVED] applications slow to open in Gnome with Wayland

It now skips on org.gnome.Shell-Wayland.desktop but insists on some form of gnome-gnome-settings-daemon.desktop ?
The line now looks like

RequiredComponents=org.gnome.Shell-Wayland;

?

Online

#17 2023-10-22 21:32:19

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

Re: [SOLVED] applications slow to open in Gnome with Wayland

My mistake, I removed the wrong entry. It seems to work now!

Offline

#18 2023-10-22 21:37:19

seth
Member
Registered: 2012-09-03
Posts: 61,169

Re: [SOLVED] applications slow to open in Gnome with Wayland

ooc:

pacman -Qikk gnome-settings-daemon

Online

#19 2023-10-22 22:01:22

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

Re: [SOLVED] applications slow to open in Gnome with Wayland

$ pacman -Qikk gnome-settings-daemon
Name            : gnome-settings-daemon
Version         : 45.0-1
Description     : GNOME Settings Daemon
Architecture    : x86_64
URL             : https://gitlab.gnome.org/GNOME/gnome-settings-daemon
Licenses        : GPL
Groups          : gnome
Provides        : None
Depends On      : dconf  gcr-4  geoclue  geocode-glib-2  gnome-desktop  gsettings-desktop-schemas  gtk3  libcanberra-pulse  libgudev  libgweather-4  libnm  libnotify
                  librsvg  libwacom  nss  pulseaudio  pulseaudio-alsa  systemd  upower
Optional Deps   : usbguard: USB protection support
Required By     : gnome-control-center  gnome-shell  gnome-tweaks  mutter
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 5.68 MiB
Packager        : Jan Alexander Steffens (heftig) <heftig@archlinux.org>
Build Date      : Tue 03 Oct 2023 10:58:26 AM EDT
Install Date    : Fri 13 Oct 2023 12:22:59 PM EDT
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature

gnome-settings-daemon: 414 total files, 0 altered files

Offline

#20 2023-10-23 06:07:51

seth
Member
Registered: 2012-09-03
Posts: 61,169

Re: [SOLVED] applications slow to open in Gnome with Wayland

That's fine - no idea why the gnome settings daemon is acting up for you.

If anyone stumbles over this, it would be good to know what the canonical path for the gnome-settings-daemon.desktop (or similarily named) would be.

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Online

#21 2023-10-23 18:07:29

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

Re: [SOLVED] applications slow to open in Gnome with Wayland

Solution Summary

1) I had to uninstall xdg-desktop-portal-gnome. I had success using either xdg-desktop-portal-gtk or just xdg-desktop-portal.

2) I followed the steps originally described here (with one modification): https://bbs.archlinux.org/viewtopic.php … 7#p1620177

First I did this:

$ cp /usr/share/applications/org.gnome.Shell.desktop ~/.local/share/applications/org.gnome.Shell-Wayland.desktop

and then changed the Exec line as follows:

$ less ~/.local/share/applications/org.gnome.Shell-Wayland.desktop
...
Exec=/usr/bin/gnome-shell --wayland
...

Then I did this (which required creating the ~/.config/gnome-session/sessions/ directory):

$ cp /usr/share/gnome-session/sessions/gnome.session ~/.config/gnome-session/sessions/gnome-wayland.session

and changed the RequiredComponents line as follows:

$ less ~/.config/gnome-session/sessions/gnome-wayland.session
...
RequiredComponents=org.gnome.Shell-Wayland;
...

Note that I did not include the gnome-settings-daemon; parameter from the original instructions.

3) I then started Gnome as follows:

$ gnome-session --session=gnome-wayland

Offline

Board footer

Powered by FluxBB