Programs launch slow on boot and with wrong gnome theme

Version

Ubuntu 24.04.2 LTS

Desktop Environment

Gnome 46

Problem Description

After updating to Ubuntu 24.04 I’ve been having issues opening some programs, for example, I have Thunderbird set to launch on boot and it works, but when I open Firefox it shows a frozen screen for a while until it shows with the session lost (Don’t know if relevant for the case)

The console refuses to launch until it passes some time, gnome programs like registry will wait to launch some time and then they will show with the wrong theme, and the software installer “software” will launch the fist time with the wrong theme always.

I think I found the problem and some possible solutions, but I’m not sure if it is safe to do so.

Relevant Information

I’ve been searching about it and I suspect that the problem is that it fails to start xdg-desktop-portal.service or the xdg-desktop-portal.service.gnome, it has given me similar warnings on the registry at the time I try to launch something on boot.

Bellow are two links that I think that they have the same issue but I’m not sure if I should follow them, the first one says that uninstalling xdg-desktop-portal.service.gnome fixes the issue, which I don’t know how safe it is to do that.

The second one says something about masking the same program (Honestly I don’t exactly know what that does, I think it means that it ignores the program, but I’m not sure)

https://bbs.archlinux.org/viewtopic.php?id=285590

The journalctl --priority=3 info of the last boot

-- Boot 0ea1350cec13406abba82e4fc66c4a35 --
may 12 10:01:48 santi-pc-orion kernel: usb 3-5: device descriptor read/64, error -71
may 12 10:01:49 santi-pc-orion kernel: 
may 12 10:01:52 santi-pc-orion (uidsynth)[1953]: fluidsynth.service: Failed to drop capabilities: Operation not permitted
may 12 10:01:52 santi-pc-orion systemd[1926]: Failed to start fluidsynth.service - FluidSynth Daemon.
may 12 10:02:02 santi-pc-orion gdm-password][2519]: gkr-pam: unable to locate daemon control file
may 12 10:02:02 santi-pc-orion (uidsynth)[2552]: fluidsynth.service: Failed to drop capabilities: Operation not permitted
may 12 10:02:02 santi-pc-orion systemd[2530]: Failed to start fluidsynth.service - FluidSynth Daemon.
may 12 10:02:03 santi-pc-orion gdm3[1870]: Gdm: on_display_added: assertion 'GDM_IS_REMOTE_DISPLAY (display)' failed
may 12 10:02:06 santi-pc-orion systemd[2530]: Failed to start app-gnome-gnome\x2dkeyring\x2dpkcs11-2967.scope - Application launched by gnome-session-binary.
may 12 10:02:06 santi-pc-orion systemd[2530]: Failed to start app-gnome-gnome\x2dkeyring\x2dsecrets-2969.scope - Application launched by gnome-session-binary.
may 12 10:02:07 santi-pc-orion systemd[2530]: Failed to start app-gnome-user\x2ddirs\x2dupdate\x2dgtk-3162.scope - Application launched by gnome-session-binary.
may 12 10:02:10 santi-pc-orion kernel: [drm:nv_drm_master_set [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to grab modeset ownership
may 12 10:02:10 santi-pc-orion kernel: [drm:nv_drm_master_set [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to grab modeset ownership
may 12 10:02:10 santi-pc-orion kernel: [drm:nv_drm_master_set [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to grab modeset ownership
may 12 10:02:10 santi-pc-orion kernel: [drm:nv_drm_master_set [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to grab modeset ownership
may 12 10:02:10 santi-pc-orion kernel: [drm:nv_drm_master_set [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to grab modeset ownership
may 12 10:02:10 santi-pc-orion kernel: [drm:nv_drm_master_set [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to grab modeset ownership
may 12 10:02:10 santi-pc-orion kernel: [drm:nv_drm_master_set [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to grab modeset ownership
may 12 10:02:10 santi-pc-orion kernel: [drm:nv_drm_master_set [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to grab modeset ownership
may 12 10:02:10 santi-pc-orion kernel: [drm:nv_drm_master_set [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to grab modeset ownership
may 12 10:02:10 santi-pc-orion kernel: [drm:nv_drm_master_set [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to grab modeset ownership
may 12 10:02:10 santi-pc-orion kernel: [drm:nv_drm_master_set [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to grab modeset ownership
may 12 10:02:10 santi-pc-orion kernel: [drm:nv_drm_master_set [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to grab modeset ownership
may 12 10:02:10 santi-pc-orion gdm3[1870]: Gdm: on_display_removed: assertion 'GDM_IS_REMOTE_DISPLAY (display)' failed
may 12 10:03:36 santi-pc-orion systemd[2530]: Failed to start xdg-desktop-portal.service - Portal service.

Thank you for your help!

The portal not launching is very likely just fallout of a different problem on a lower level, what other non-standard changes doe your system have (or did have before the upgrade), i.e. do you use any PPAs, are you using an unsupported kernel, did you make any changes to your desktop session startup…

It could also be “upgrade pain”, i.e. some issue that would not be there if you would have done a fresh install.

uninstalling xdg-desktop-portal.service.gnome fixes the issue, which I don’t know how safe it is to do that.

In principle, as long as you install/uninstall with the package manager, it is safe. It may mostly affect containerized applications. If you have (other) issues, you can always reinstall. And, who knows, an apt remove --purge of that package followed by a reinstall may eventually cure the issue.

Such issues only happen when there are unusual or unexpected modifications, standard upgrades are tested very heavily throughout the development cycle, this is why I asked about any non-standard things the OP had done prior to upgrading the system.

PPA that I have added are:

  • solaar: A logitech driver program
  • inkscape
  • love: a small game engine
  • fish-shell

I think inkscape is the only one that I added before the 24.04 update.

I have only upgraded manually iBus packages and it’s dependencies because the version in the 24.04 had a bug with some programs when typing accents, but if I remember well, I had this issue before that change.

For the rest it’s practically like default, I only have a script to change VSync at start and launch on start programs, but nothing weird, all done in the on start applications program of gnome (The name may differ because of using another language)

If you know some way to check just in case, if I have some low level change that I don’t know/remember tell me how and I’ll send you the info asap.

I’m trying to get more info on the error logs, so I opened the search, I don’t know if it won’t be useful, but just in case here it is.

From what I can see from ignorance, it looks like xdg-desktop-portal fails to call StartSereviceByName for org.freedesktop.impl.portal.desktop.gnome so then it terminates itself.

may 13 11:16:55 santi-pc-orion systemd[1]: Cannot find unit for notify message of PID 4987, ignoring.
may 13 11:16:56 santi-pc-orion systemd[1]: Cannot find unit for notify message of PID 4994, ignoring.
may 13 11:16:58 santi-pc-orion xdg-desktop-por[2968]: Failed to create settings proxy: Error al llamar StartSereviceByName para org.freedesktop.impl.portal.desktop.gnome: Se alcanzó el tiempo de expiración
may 13 11:17:16 santi-pc-orion firefox[5072]: Theme parsing error: gtk.css:2:117: Failed to import: Error al abrir el archivo /home/santi/.local/share/gnome-shell/extensions/unite@hardpixel.eu/styles/gtk3/buttons-right/both.css: Permission denied
may 13 11:17:16 santi-pc-orion firefox[5072]: GTK+ module /snap/firefox/6103/gnome-platform/usr/lib/gtk-2.0/modules/libcanberra-gtk-module.so cannot be loaded.
                                              GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported.
may 13 11:17:16 santi-pc-orion firefox[5072]: GTK+ module /snap/firefox/6103/gnome-platform/usr/lib/gtk-2.0/modules/libcanberra-gtk-module.so cannot be loaded.
                                              GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported.
may 13 11:17:20 santi-pc-orion gnome-shell[3038]: Can't update stage views actor dashtodockContainer [Gjs_ubuntu-dock_ubuntu_com_docking_DashToDock] is on because it needs an allocation.
may 13 11:17:20 santi-pc-orion gnome-shell[3038]: Can't update stage views actor unnamed [Gjs_ubuntu-dock_ubuntu_com_docking_DashSlideContainer] is on because it needs an allocation.
may 13 11:17:20 santi-pc-orion gnome-shell[3038]: Can't update stage views actor dashtodockBox [StBoxLayout] is on because it needs an allocation.
may 13 11:17:20 santi-pc-orion gnome-shell[3038]: Can't update stage views actor bms-dash-backgroundgroup [MetaBackgroundGroup] is on because it needs an allocation.
may 13 11:17:20 santi-pc-orion gnome-shell[3038]: Can't update stage views actor bms-dash-blurred-widget [StWidget] is on because it needs an allocation.
may 13 11:17:24 santi-pc-orion xdg-desktop-por[2968]: Failed to create file chooser proxy: Error al llamar StartSereviceByName para org.freedesktop.impl.portal.desktop.gnome: Se alcanzó el tiempo de expiración
may 13 11:17:24 santi-pc-orion xdg-desktop-por[2968]: No skeleton to export
may 13 11:17:39 santi-pc-orion systemd[2584]: xdg-desktop-portal.service: start operation timed out. Terminating.
may 13 11:17:39 santi-pc-orion systemd[2584]: xdg-desktop-portal.service: Failed with result 'timeout'.
may 13 11:17:39 santi-pc-orion systemd[2584]: Failed to start xdg-desktop-portal.service - Portal service.
may 13 11:17:43 santi-pc-orion firefox[5072]: Failed to create proxy: Error al llamar StartSereviceByName para org.freedesktop.portal.Desktop: Se alcanzó el tiempo de expiración
may 13 11:17:55 santi-pc-orion gnome-shell[3038]: Can't update stage views actor dashtodockContainer [Gjs_ubuntu-dock_ubuntu_com_docking_DashToDock] is on because it needs an allocation.

I’ve been searching a bit more, and I found on gnome forums that changing dbus-daemon to dbus-broker should fix the issue too.

For this should I just remove dbus-daemon and install dbus-broker or there is something I’m missing?

https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/3037

And it seems that this same issue was happening for people using non gnome desktops with xdg.desktop.portal.gnome, which it isn’t my case, and those cases says it should be solved between Gnome 44 and 45

https://gitlab.gnome.org/GNOME/xdg-desktop-portal-gnome/-/issues/74

https://gitlab.gnome.org/GNOME/xdg-desktop-portal-gnome/-/issues/86

The issue seems to be solved by switching to dbus-broker, I have rebooted and didn’t have the error nor the apps delay or wrong theme.

I just had to:

sudo apt install dbus-broker
systemctl enable dbus-broker.service
sudo systemctl --global enable dbus-broker.service

And then reboot Ubuntu.

I assume that it’s safe to remove then dbus-daemon, but I haven’t done it just in case.

Well., just be aware that dbus-broker is completely untested and unsupported in Ubuntu, it just gets synced from debian (where it is not used either) into universe as-is during a development cycle, so you might hit other issues (i.e. it might have open security holes that wont get fixed unless you use Ubuntu Pro, also not sure if dbus-broker and dbus-daemon can actually co-exist on a system without harming each other either (they are technically the same thing doing the exact same job), but you will likely find out if you keep it like this :slight_smile: )

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.