I stumbled over this a few times already: contacts or calendar silently not being synchronized.
When I’ve been getting aware of the problem by missing out on something or not having a number I left in my Nextcloud from a different device I look at gnome-control-center to find this situation:
I tap Sign In
and have to provide the credentials to log in to my Nextcloud anew. After that the account works again for an unknown time before I stumble over that problem again.
I searched for the problem and found a somewhat old posting describing some background.
Thinking back with this knowledge I remember having restarted phosh.service several times on my Librem5.
Also, my desktop running the same version of PureOS has its gnome-shell crashing from time to time and I stay logged in to the system on a tty to restart the desktop by restarting gdm.service if the crash happened.
The situation is comparable except that the phone is running Phosh and the desktop Gnome.
On both systems there is the same systemd setting that might be related to the probem:
$ systemd-analyze cat-config systemd/logind.conf | grep -i killuserprocesses
#KillUserProcesses=no
Working hypothesis:
- after restarting the gui on the phone gnome-online-accounts has problems talking to the running gnome-keyring
Does that make sense? And if so, why I’m not running into the same situation on my notebook (or do I not remember correctly the circumstances of the last crash of gnome)?
Any help to solve this would be very much appreciated. Having an up-to-date calendar and phone book is one of the few services on the Librem5 I really need to rely on.
Update:
- checked the status of my Nextcloud account in gnome-control-center: o.k.
- logged in to my Librem5 via ssh
- ran
systemctl restart phosh
- checked again my Nextcloud account in gcc: broken as described above
- via ssh
sudo systemctl stop phosh
sudo systemctl stop user@1000.service
sudo systemctl stop user-1000.slice
- got disconnected, because systemd shut down my login
- after reconnect via ssh:
- checked that neither goa-daemons nor a keyring is running anymore
- started phosh without having an active login (to avoid anything systemd might have left over for my actual user session) by
root@pureos:~# echo /usr/bin/systemctl start phosh | at now+2m
and then logging out before the job would start
- checked again in gcc: Nextcloud account works again
This seems to support the hypothesis that the Nextcould gnome online account stops working when restarting phosh.
purism@pureos:~$ systemctl status `pgrep gnome-keyring`
Failed to get unit for PID 107225: PID 107225 does not belong to any loaded unit.
purism@pureos:~$ systemctl status `pgrep goa-daemon`
● dbus.service - D-Bus User Message Bus
Loaded: loaded (/usr/lib/systemd/user/dbus.service; static)
Active: active (running) since Fri 2023-04-21 10:09:01 CEST; 32min ago
TriggeredBy: ● dbus.socket
[...]
gnome-keyring doesn’t run under control of systemd, goa-daemon does run under control of systemd. goa-daemon needs to be able to communicate with gome-keyring to get the credentials of an account.
After restarting phosh.service gnome-kearing-daemon is running with a new PID while goa-daemon is still running with the same PID.
The phosh.service unit seems to stop and start gnome-keyring-daemon also. The keyring daemon being stopped and started seems to breakt goa-daemon.
Update:
gnome-keyring-daemon
seems to be started from /etc/xdg/autostart/gnome-keyring-ssh.desktop
when phosh is started via phosh.service (changed the exec=
line to test and after restarting phosh the running daemon reflected that change).
Other installations start gnome-keyring-daemon via systemd user service (arch) or via pam (gdm).