How to always disable extensions before poweroff / reboot, and enable upon login?

I am using a few GNOME extensions, and I am pretty sure that at least one of them is causing bugs for the whole desktop. The bad behavior I’m experiencing is the computer not finishing the shutdown process, complaining towards the end the that gnome-shell process is hanging, and that (quoting) watchdog did not stop!. The only workaround I have then that happens is to force shutdown by long-pressing the power button.

This behavior is not very reproducible, as it happens only after a few days the computer was on. I cannot reproduce this issue if I only open the desktop for a minute or two.

Another issue I’m experiencing is when I login when extensions are enabled: I login, and I don’t see the desktop, and I have to (short) press the power button in order to shutdown and start the computer again. If I try to login again afterwards, thankfully the extensions are somehow disabled, and I can enable them again manually.

I was wondering, is it possible to ask GNOME to automatically disable and enable all extensions before I logout, and after I login? In general, I’m surprised that the gnome-shell is not resilient to such issues with extensions.

One way to solve it is to run some specific gsettings commands with systemd unit files.

The GSettings commands would manually enable/disable the gnome-shell extensions, packed into systemd unit files to run the commands at the desired times.

There are maybe better solutions than this, though.

Now I noticed that sometimes the gnome-shell process is hanging even though I (manually at the moment) disable the extensions before shutdown, still forcing me to shutdown… It is really frustrating :/.

Finally, I discovered why I’m getting watchdog did not stop! on shutdown: It is due to mlterm not shutting down properly.

The above can and should be reported to mlterm but still I think that a buggy application shouldn’t halt the whole desktop from shutting down…

The issue with the extensions enabled when I login and forcing me to restart the computer with a short power button press, henceforth is orthogonal to the issue with the watchdog, and the former hence requires further investigation.

GNOME is not responsible for shutting down the system, only for presenting the command to the user. If you want to change the behaviour of the watchdog for processes not terminating, please file an issue against the init system, systemd.

1 Like

on login there is possibility to sign with fingerprint or smardcard and theoretically also with yubikey to encrypted systemd home, but thats not good key idea… and EntraID possibilities who knows what’s possible or not yet developed or behind corporate curtains…

but for example if there is login without password(or something is broken and GNOME keyring/polkit/policykit somehow not functional(like unlocked)) then browser like Chrome or Edge are somehow not in profile sync and session unlocked(maybe in future with new Chrome and Edge password policies on this space)…

And even new US/EU regulations comes in place also to make fresh air…