linuxmint/mintdesktop

Mint 20 Mate slow after Login

munzelthecat opened this issue · 9 comments

xdg-desktop-portal.service causes a long wait after login (in my case about 25 sec) until the desktop and its icons appear.

systemctl --user status xdg-desktop-portal.service generates the following error message:xdg-desktop-por[1464]: Failed to get application states: GDBus.Error:org.freedesktop.portal.Error.Failed: Could not get window list

The effect can be reproduced by reinstalling Mint 20. The system startup is then still ok and after login the desktop appears quickly.
After running all offered updates and rebooting, the desktop appears heavily delayed.

Does this help?

systemctl --user stop xdg-desktop-portal{,-gtk}
systemctl --user disable xdg-desktop-portal{,-gtk}

Can you paste/attach your ~/.xsession-errors?

After ~$ systemctl --user stop xdg-desktop-portal{,-gtk} the service is stopped.
`~$ systemctl status --user xdg-desktop-portal.service
● xdg-desktop-portal.service - Portal service
Loaded: loaded (/usr/lib/systemd/user/xdg-desktop-portal.service; static; >
Active: inactive (dead)

Jan 27 16:37:18 HP-PC systemd[902]: Starting Portal service...
Jan 27 16:37:44 HP-PC systemd[902]: Started Portal service.
Jan 27 16:38:14 HP-PC xdg-desktop-por[1323]: Failed to get application states: >
Jan 27 16:41:09 HP-PC systemd[902]: Stopping Portal service...
Jan 27 16:41:09 HP-PC systemd[902]: xdg-desktop-portal.service: Succeeded.
Jan 27 16:41:09 HP-PC systemd[902]: Stopped Portal service.
`

After ~$ systemctl --user disable xdg-desktop-portal{,-gtk} the service seems not to be disabled. The same message appears.
`~$ systemctl status --user xdg-desktop-portal.service
● xdg-desktop-portal.service - Portal service
Loaded: loaded (/usr/lib/systemd/user/xdg-desktop-portal.service; static; >
Active: inactive (dead)

Jan 27 16:37:18 HP-PC systemd[902]: Starting Portal service...
Jan 27 16:37:44 HP-PC systemd[902]: Started Portal service.
Jan 27 16:38:14 HP-PC xdg-desktop-por[1323]: Failed to get application states: >
Jan 27 16:41:09 HP-PC systemd[902]: Stopping Portal service...
Jan 27 16:41:09 HP-PC systemd[902]: xdg-desktop-portal.service: Succeeded.
Jan 27 16:41:09 HP-PC systemd[902]: Stopped Portal service.
`

Do you have any flatpak apps installed? If so, which?

flatpak list

No, I have not installed any Flatpak because they take up too much space and the principle does not convince me.

flatpak list
does not return any output.

There's something that's using the xdg-portal interface to request background operation at startup. Do you have any additional programs starting when you login (often they provide a system tray icon as well). You could try disabling these things to maybe narrow down the culprit.

This background interface is provided by xdg-desktop-portal-gtk in Mint 20, though it is attempting to communicate with Gnome-Shell which obviously isn't running. Fortunately, in Mint 21/Ubuntu 22.04 the gtk package no longer does this (there's an xdg-desktop-portal-gnome package that provides this only when shell is running.

Since you're not using flatpaks anyhow you can uninstall both xdg-desktop-portal and xdg-desktop-portal-gtk, and this issue should go away.

flatpak/xdg-desktop-portal#336
https://docs.flatpak.org/en/latest/portal-api-reference.html#gdbus-org.freedesktop.portal.Background

All right, thank you very much. Then I will also uninstall xdg-desktop-portal.