With the update to GNOME 3.38, the buttons of gnome-shell to shutdown or restart stopped working. They used to work perfectly.
I am using GDM with gdm-runit, and I have the service enabled along with dbus and elogind, and gnome-shell.
Any idea why this could be happening? Thanks in advance!
This is something that is currently being talked about and trying to find a solution for it.
I see, thanks for the insight!
As an update, I've come to notice that when one of the said restart or poweroff buttons is pressed, some apps of mine start not launching with
ICE default IO error handler doing an exit(), pid = ..., errno = 0
errors, and deleting
.ICEAuthority
in the home directory serves as a fix, that is until the restart or poweroff buttons are pressed again, when the issue reproduces. Maybe this issues and the buttons malfunctioning can have a root cause?
We could possibly just delete that file on shutdown in the init scripts as a workaround. Nice find.
That is if you can reproduce, I've checked it on a friend's system and it doesnt seem to work, while the errors after pressing the button still have to do with ICE, deleting the file doesnt fix it.
I will keep digging on it, but it seems that .ICEAuthority is not necessarily what's wrong
This is all the digging I've done so far:
The exit operations on GNOME3 are carried out by
gnome-session-quit
This command when called with `--restart` or `--power-off` loops forever, eventually timing out, this is what makes GNOME not able to reboot or shutdown.
Doing some GDB and setting a breakpoint on
poll
which was the looping part I've come to the conclusion the issue is a
g_bus_get_sync
call, if we check in the repository of gnome-session all the calls to this function happen to be one of
g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &error);
g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, &error);
If I have to guess, I would say its https://gitlab.gnome.org/GNOME/gnome-session/-/blob/master/tools/gnome-session-quit.c#L70
I do not know why such call would fail as I am not familiar with GIO.
Probably, the permissions of commands execution (polkit case?), are to be blamed, because the above code is common to Arch, where such an issue has not been reported yet.
Thanks, I figured out what the issue is here. gnome-session 3.38 switched to a meson build and some of the old build options we were using had to be changed. This lead to disabling several systemd-related build options. However, the disabling of these features is also what caused shutdown/restart to stop working (probably because gnome-session isn't using logind). If you install gnome-session from extra (Arch's repo), it works fine. Most likely, the "systemd-session" option needs to be patched with elogind support. I actually had to do something similar for GDM so I'll write up a patch for Artix real quick. Thanks for investigating!
I wrote a small/dirty patch for building against elogind, tested it on my machine and it worked as expected. I went ahead and pushed a new version of gnome-session to the repos. It should resolve the issue. I'll coordinate with upstream and see if we can get this feature accepted.
Edit: Haha, I just realized that an elogind MR request for gnome-session already existed. Oh well, wasted some extra time going through gnome-session code.
Yeah, the update of gnome-session fixed it for me, I will mark this as solved. Thanks to everyone for the help. I love communities like this.
Turns out I cannot mark it as solved myself, welp.
Well, keep it up then, for the next releases
@Dudemanguy :D