Open hvbakel opened 1 year ago
Marking myself as affected by this too. For me, it seems to crop up specifically if I choose Ubuntu on Xorg
during login (which is necessary in my case because xscreensaver doesn't seem to work properly on wayland at present). I found this reddit post about an issue with firefox that I was having that seemed to be related to this, and the suggested fix there was to restart the machine after selecting the Xorg option. Sure enough, after rebooting my system, both those repeated integration error messages stopped and firefox started working again. That sort of leads me to believe that the issue isn't with this or any one particular snap, but maybe with snapd in general on Xorg displays?
Mmm... good point the Ubuntu on Xorg detail... checking it...
I'm still unable to reproduce this bug. Can you check the logs? (open a terminal and type sudo journalctl
, then go to the end -it will take a while- and check what shows when it is relaunched; or another way is to type sudo journalctl -f
, which will show in realtime the new events... see if it shows something related to snapd-desktop-integration when it relaunches).
Still happens on Ubuntu 22.04.4 LTS. This just repeat endlessly, there are no other logs between. This happens after a desktop is launched. Here are all the logs when this begins:
[code]
Jul 31 10:15:20 nsc-sidon-vm gsd-media-keys[3665]: Failed to grab accelerator for keybinding settings:screen-brightness-down
Jul 31 10:15:21 nsc-sidon-vm gsd-media-keys[3665]: Unable to inhibit keypresses: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Permission denied
Jul 31 10:15:21 nsc-sidon-vm gnome-shell[3449]: GNOME Shell started at Wed Jul 31 2024 10:15:20 GMT-0400 (EDT)
Jul 31 10:15:21 nsc-sidon-vm gnome-shell[3449]: Registering session with GDM
Jul 31 10:15:21 nsc-sidon-vm systemd[2982]: snap.snapd-desktop-integration.snapd-desktop-integration.service: Scheduled restart job, restart counter is at 1.
Jul 31 10:15:21 nsc-sidon-vm systemd[2982]: Stopped Service for snap application snapd-desktop-integration.snapd-desktop-integration.
Jul 31 10:15:21 nsc-sidon-vm systemd[2982]: Started Service for snap application snapd-desktop-integration.snapd-desktop-integration.
Jul 31 10:15:21 nsc-sidon-vm snapd-desktop-i[3929]: Failed to do gtk init. Waiting for a new session with desktop capabilities.
Jul 31 10:15:21 nsc-sidon-vm snapd-desktop-i[3929]: Checking session /org/freedesktop/login1/session/_32...
Jul 31 10:15:21 nsc-sidon-vm snapd-desktop-i[3929]: Checking session /org/freedesktop/login1/session/c1...
Jul 31 10:15:21 nsc-sidon-vm snapd-desktop-i[3929]: Checking session /org/freedesktop/login1/session/c2...
Jul 31 10:15:21 nsc-sidon-vm snapd-desktop-i[3929]: Is a desktop session! Forcing a reload.
Jul 31 10:15:21 nsc-sidon-vm snapd-desktop-i[3929]: Loop exited. Forcing reload.
Jul 31 10:15:21 nsc-sidon-vm NetworkManager[996]:
Mmm... it is failing to initialize gtk... that's odd...
Do you have the last version of snapd? (sudo snap refresh snapd
) Can you check if all the interfaces in snapd-desktop-integration are connected? (sudo snap connections snapd-desktop-integration
)
snapd says it is up-to-date.
The only one that doesn't have a plug: dbus - snapd-desktop-integration:snapd-desktop-integration -
The rest is fine (it won't format properly here)
Interface Plug Slot Notes content[gnome-42-2204] snapd-desktop-integration:gnome-42-2204 gnome-42-2204:gnome-42-2204 - content[gtk-3-themes] snapd-desktop-integration:gtk-3-themes gtk-common-themes:gtk-3-themes - content[icon-themes] snapd-desktop-integration:icon-themes gtk-common-themes:icon-themes - content[sound-themes] snapd-desktop-integration:sound-themes gtk-common-themes:sound-themes - dbus - snapd-desktop-integration:snapd-desktop-integration - desktop snapd-desktop-integration:desktop :desktop - desktop-legacy snapd-desktop-integration:desktop-legacy :desktop-legacy - gsettings snapd-desktop-integration:gsettings :gsettings - login-session-observe snapd-desktop-integration:login-session-observe :login-session-observe - opengl snapd-desktop-integration:opengl :opengl - snap-themes-control snapd-desktop-integration:snap-themes-control :snap-themes-control - system-files snapd-desktop-integration:snap :system-files - wayland snapd-desktop-integration:wayland :wayland - x11 snapd-desktop-integration:x11 :x11 -
Ok, I can reproduce it in a virtual machine... odd...
Odd... I rebooted the VM and now it does work fine...
Can you try this from a terminal?
systemctl --user stop snap.snapd-desktop-integration.snapd-desktop-integration.service
systemctl --user start snap.snapd-desktop-integration.snapd-desktop-integration.service
and see if that fixes it, at least for the current session?
Restarting doesn't do the trick for me. It seems to restart itself anyway
Aug 4 16:16:34 burdu systemd[4625]: Stopped Service for snap application snapd-desktop-integration.snapd-desktop-integration.
Aug 4 16:16:34 burdu systemd[4625]: Started Service for snap application snapd-desktop-integration.snapd-desktop-integration.
Aug 4 16:16:34 burdu chrome-remote-desktop[23063]: 2024-08-04 16:16:34,313:INFO:wait() returned (32930,256)
Aug 4 16:16:34 burdu chrome-remote-desktop[23063]: 2024-08-04 16:16:34,313:INFO:Waiting before relaunching
Aug 4 16:16:34 burdu snapd-desktop-i[32983]: Failed to do gtk init. Waiting for a new session with desktop capabilities.
Aug 4 16:16:34 burdu snapd-desktop-i[32983]: Checking session /org/freedesktop/login1/session/c5...
Aug 4 16:16:34 burdu snapd-desktop-i[32983]: Is a desktop session! Forcing a reload.
Aug 4 16:16:34 burdu snapd-desktop-i[32983]: Checking session /org/freedesktop/login1/session/_39...
Aug 4 16:16:34 burdu snapd-desktop-i[32983]: Checking session /org/freedesktop/login1/session/c2...
Aug 4 16:16:34 burdu snapd-desktop-i[32983]: Checking session /org/freedesktop/login1/session/_38...
Aug 4 16:16:34 burdu snapd-desktop-i[32983]: Checking session /org/freedesktop/login1/session/_35...
Aug 4 16:16:34 burdu snapd-desktop-i[32983]: Loop exited. Forcing reload.
I am connecting remotely to the machine and was trying to set up chrome remote desktop, which doesn't seem to work and I'm guessing the 2 issues are related.
uname -a
Linux burdu 6.5.0-45-generic #45~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Jul 15 16:40:02 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
Oh, ok... so you are connecting remotely... Can you specify how are you connecting? SSH with -X? Other...?
FYI, I see this error with Sway (I upgraded to Ubuntu 24.04.1, but I installed Sway ex novo, so it's a default Sway configuration)
For now, I'm just sticking with i3 (while I keep using Sway on Nixos)
I see the error while using XRDP (which is X + VNC) or X2Go (uses SSH). Both can be installed natively and work pretty much out of the box. Although I don’t see how that would be a problem as XRDP is just rendering the desktop locally and has nothing to do with snaps.
snapd-desktop-integration is a systemd user daemon that needs to have access to the screen (it uses Gtk). To avoid having it relaunching over and over again when a ssh connection is made, it checks if the current session is graphical. If not, it waits until the user opens a graphical session. And when there is a graphical session, it launches a child that does gtk_init(). For some reason, the daemon recognizes Sway as a graphical session, but can't launch a graphical instance on it. The same for XRDP.
On an up to date Ubuntu 22.04.3 installation the snapd-desktop-integration service reloads every 2 seconds, spamming journalctl with the following messages:
Based on forum threads I could find (e.g. https://askubuntu.com/questions/1443676/snapd-desktop-integration-syslog-spam) it looks like this issue should be solved with the version released earlier this year, but with v0.9 from the stable or candidate channel the issue seems to persist even when running in a graphical desktop session.