After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 774774 - wayland: no log out, no reboot
wayland: no log out, no reboot
Status: RESOLVED NOTABUG
Product: gnome-shell
Classification: Core
Component: general
3.23.x
Other Linux
: Normal blocker
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2016-11-21 07:14 UTC by soloturn
Modified: 2016-12-26 05:39 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description soloturn 2016-11-21 07:14:31 UTC
when starting gnome shell like described on arch wiki with
  dbus-run-session -- gnome-session --display-server --wayland
i cannot terminate it in another way but kill it.i mark it as blocker for wayland adoption, but of course it is not a blocker in general.

references:
https://wiki.archlinux.org/index.php/Wayland#Gnome
Comment 1 Florian Müllner 2016-11-21 11:29:53 UTC
(In reply to soloturn from comment #0)
> when starting gnome shell like described on arch wiki with
>   dbus-run-session -- gnome-session --display-server --wayland
> i cannot terminate it in another way but kill it.

Yes, that is expected when running a gnome-session outside a consolekit/logind session - starting an X11 gnome-session via xinitrc/startx will have the exact same issue.

So no, this is not a blocker at all, it's the expected result of running GNOME outside a graphical login session (there's other functionality that won't be there, like screen locking or suspend)
Comment 2 soloturn 2016-11-21 23:39:59 UTC
florian, starting an X11 on the command line with a gnome session works perfectly fine, with the follwoing in .xinitrc 
    gnome             ) exec gnome-session;;

all the buttons work, including log-out, shut down. i'd reall appreciate if the same functionality is there with wayland. start from the command line and the buttons work.

btw, the above command line to start wayland mixed up "gnome-session" with "gnome-shell", so i use:
  dbus-run-session -- gnome-shell --display-server --wayland

references:
https://wiki.archlinux.org/index.php/Xinit#Autostart_X_at_login
Comment 3 Florian Müllner 2016-11-22 12:39:34 UTC
(In reply to soloturn from comment #2)
> florian, starting an X11 on the command line with a gnome session works
> perfectly fine, with the follwoing in .xinitrc 
>     gnome             ) exec gnome-session;;
> 
> all the buttons work, including log-out, shut down.

Mmh, interesting - not sure what is starting a graphical login session, but apparently something does :-)



> btw, the above command line to start wayland mixed up "gnome-session" with
> "gnome-shell", so i use:
>   dbus-run-session -- gnome-shell --display-server --wayland

Well, in that case no wonder stuff isn't working for you. Among other things, gnome-session exposes a DBus API for shutdown/reboot as well as a method call to determine whether that functionality is available. If that DBus service isn't available because gnome-session isn't even running, then it obviously won't work.
Comment 4 soloturn 2016-11-26 02:37:47 UTC
(In reply to Florian Müllner from comment #3)
> (In reply to soloturn from comment #2)
> > florian, starting an X11 on the command line with a gnome session works
> > perfectly fine, with the follwoing in .xinitrc 
> >     gnome             ) exec gnome-session;;
> > 
> > all the buttons work, including log-out, shut down.
> 
> Mmh, interesting - not sure what is starting a graphical login session, but
> apparently something does :-)
there is no graphical login session, if you mean a display manager. x is started and the first program run is gnome-session when you "startx". last is then the window manager.

> 
> 
> > btw, the above command line to start wayland mixed up "gnome-session" with
> > "gnome-shell", so i use:
> >   dbus-run-session -- gnome-shell --display-server --wayland
> 
> Well, in that case no wonder stuff isn't working for you. Among other
> things, gnome-session exposes a DBus API for shutdown/reboot as well as a
> method call to determine whether that functionality is available. If that
> DBus service isn't available because gnome-session isn't even running, then
> it obviously won't work.
ooohh ... that was it. starting gnome-session makes the media buttons work, makes clipit start. how to auto start gnome-session when gnome-shell comes up? i tried tweak-tool but gnome-session does not show up. 

i entered "terminal" so i get an idea what happens. this creates a file in .config/autostart with the name translated in 200 languages, and at the bottom it has:
TryExec=gnome-terminal
Exec=gnome-terminal 
Icon=utilities-terminal
Type=Application
X-GNOME-DocPath=gnome-terminal/index.html
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=gnome-terminal
X-GNOME-Bugzilla-Component=BugBuddyBugs
X-GNOME-Bugzilla-Version=3.22.1
Categories=GNOME;GTK;System;TerminalEmulator;
StartupNotify=true
X-GNOME-SingleWindow=false
Comment 5 soloturn 2016-11-26 02:42:50 UTC
no ... i was wrong :( logout does not work after gnome-session is started. and, autostart is done by gnome-session, haha :) katze beisst sich in den schwanz.

i am wondering where one could find out what command GDM runs after successful logging in.
Comment 6 Florian Müllner 2016-11-26 10:55:30 UTC
(In reply to soloturn from comment #5)
> i am wondering where one could find out what command GDM runs

That depends on the selected session in /usr/share/xsessions or /usr/share/wayland-sessions. For GNOME, it's gnome-session (which will then start required components like gnome-shell)
Comment 7 soloturn 2016-11-26 12:29:37 UTC
> (In reply to soloturn from comment #5)
> > i am wondering where one could find out what command GDM runs
> 
> That depends on the selected session in /usr/share/xsessions or
> /usr/share/wayland-sessions. For GNOME, it's gnome-session (which will then
> start required components like gnome-shell)

  ok. now i installed gdm and i have it running 2 times, as user gdm and my user.
sudo pacman -S gdm 
sudo systemctl enable gdm

ps -ef | grep wayland
gdm 7824  7820  tty1  /usr/lib/gdm/gdm-wayland-session gnome-session --autostart /usr/share/gdm/greeter/autostart
gdm 7841  7835  tty1  /usr/bin/Xwayland :1024 -rootless -noreset -listen 4 -listen 5 -displayfd 6
st  7891  7880  tty4  /usr/lib/gdm/gdm-wayland-session gnome-session
st  7915  7910  tty4  /usr/bin/Xwayland :0 -rootless -noreset -listen 4 -listen 5 -displayfd 6

everything works, including logout and shutdown. the boot time is increased until it displays this graphical login mojo. on a technical level i do not fully understand it now. can i type the same into a terminal window what gdm does so it would work? i tried without gdm again, typed "gnome-shell" and it said "terminated".
Comment 8 soloturn 2016-12-09 22:15:45 UTC
florian, i find it confusing that:

dbus-run-session -- gnome-shell --display-server --wayland

is starting something correctly (gnome-shell) using dbus, and something else would be necessary to talk to dbus (gnome-session). gnome-shell should offer something to terminate itself, other than open a terminal and enter "pkill gnome-shell".

i read the original purpose of session management in gnome:
https://mail.gnome.org/archives/desktop-devel-list/2006-September/msg00084.html

and it is really centered around X-windows. which makes a lot of sense the way it is written. there is the x-server running, and then comes gnome, displaying something on it. the session management is man in the middle. but now with wayland? gnome itself is the compositor and there is no place anymore for "something in the middle". am i wrong that the start order should be the other way round now? gnome-shell starting gnome-session, as well as a screen-saver in case necessary?
Comment 9 Florian Müllner 2016-12-09 23:02:36 UTC
(In reply to soloturn from comment #8)
> florian, i find it confusing that:
> 
> dbus-run-session -- gnome-shell --display-server --wayland
> 
> is starting something correctly (gnome-shell) using dbus, and something else
> would be necessary to talk to dbus (gnome-session).

Probably because what you say is not quite complete - *nothing* else is necessary to talk to D-Bus, but gnome-session is necessary to talk to *gnome-session* via D-Bus.



> gnome-shell should offer something to terminate itself, other than open a 
> terminal and enter "pkill gnome-shell".

Or you could use

$ XDG_SESSION_TYPE=wayland dbus-run-session gnome-session

instead to actually run gnome-shell under gnome-session. Running mutter or gnome-shell stand-alone is a helpful developer tool, but not a supported configuration for users. 


> i read the original purpose of session management in gnome:
> https://mail.gnome.org/archives/desktop-devel-list/2006-September/msg00084.
> html

No, that's about XSMP which is a protocol for clients to be restored on session startup. But it's not used for the required components that make up a GNOME session (gnome-shell and gnome-settings-daemon's services) - those are defined in the selected session file from /usr/share/gnome-session/sessions and explicitly started by gnome-session.
Comment 10 soloturn 2016-12-26 05:39:05 UTC
many thanks florian, XDG_SESSION_TYPE=wayland dbus-run-session gnome-session does what xinit was doing for X. i added it to 
https://wiki.archlinux.org/index.php/GNOME#Wayland_sessions

a late merry christmas!