Xfce Forum

Sub domains
 

You are not logged in.

#1 2015-07-24 15:45:37

Red_Cedar77
Member
Registered: 2015-04-19
Posts: 8

"Session manager must be in idle state when requesting a shutdown"

I am running xfce4 on a OpenRC Mangaro install. I just finished with an upgrade and I get this error when I try to shutdown, restart, or logout. I have done some searching and not able to find anything that works. Any idea what I can do to fix it? If I run the "halt" command from the terminal it will shurdown.

Thanks

Offline

#2 2015-07-24 17:14:14

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 7,650

Re: "Session manager must be in idle state when requesting a shutdown"

Try clearing your saved sessions cache (Settings Manager >> Session and Startup >> Session tab >> "Clear saved sessions", logging out and back in again (Make sure that you don't save the session when logging out).
See if that helps.

If not, can you provide some more info about what was upgraded and the results of the following command:

ps -ef | grep session

Offline

#3 2015-07-24 17:45:19

sixsixfive
Member
From: behind you
Registered: 2012-04-08
Posts: 579
Website

Re: "Session manager must be in idle state when requesting a shutdown"

depends on what display manager you use eg: with slim i need to put: "exec ck-launch-session dbus-launch --exit-with-session startxfce4" into my ~/.xinitrc to make xfce shutdown/reboot work

Offline

#4 2015-07-25 01:28:38

Red_Cedar77
Member
Registered: 2015-04-19
Posts: 8

Re: "Session manager must be in idle state when requesting a shutdown"

ToZ wrote:

Try clearing your saved sessions cache (Settings Manager >> Session and Startup >> Session tab >> "Clear saved sessions", logging out and back in again (Make sure that you don't save the session when logging out).
See if that helps.

If not, can you provide some more info about what was upgraded and the results of the following command:

ps -ef | grep session

Okay, I cleared the saved sessions cache and it did not work. I made sure that the option to save this session was also not checked. Here is the list of what I upgraded. Everything was just fine before this upgrade.

[2015-07-21 12:39] [PACMAN] Running 'pacman -Syyu'
[2015-07-21 12:39] [PACMAN] synchronizing package lists
[2015-07-21 12:42] [PACMAN] starting full system upgrade
[2015-07-21 12:44] [ALPM] transaction started
[2015-07-21 12:44] [ALPM] upgraded btrfs-progs (4.1.1-1 -> 4.1.2-1)
[2015-07-21 12:44] [ALPM] upgraded conky (1.10.0-3 -> 1.10.0-4)
[2015-07-21 12:44] [ALPM] upgraded dhclient (4.3.2-1 -> 4.3.2-2)
[2015-07-21 12:44] [ALPM] upgraded gtk-update-icon-cache (3.16.5-1 -> 3.16.5-2)
[2015-07-21 12:44] [ALPM] upgraded elementary-icon-theme (3.2.1-1 -> 3.2.1-2)
[2015-07-21 12:44] [ALPM] installed libwebp (0.4.3-1)
[2015-07-21 12:44] [ALPM] upgraded libssh (0.7.0-2 -> 0.7.1-1)
[2015-07-21 12:44] [ALPM] upgraded libx264 (2:144.20150223-1 -> 2:148.20150717-1)
[2015-07-21 12:44] [ALPM] upgraded llvm-libs (3.6.1-1 -> 3.6.2-1)
[2015-07-21 12:44] [ALPM] upgraded ffmpeg (1:2.7.1-1 -> 1:2.7.1-3)
[2015-07-21 12:44] [ALPM] upgraded file (5.23-2 -> 5.24-1)
[2015-07-21 12:44] [ALPM] upgraded gtk3 (3.16.5-1 -> 3.16.5-2)
[2015-07-21 12:44] [ALPM] upgraded lib32-llvm-libs (3.6.1-1 -> 3.6.2-1)
[2015-07-21 12:44] [ALPM] upgraded libmm-glib (1.4.8-2 -> 1.4.10-2)
[2015-07-21 12:44] [ALPM] upgraded libnm-glib (1.0.2-4 -> 1.0.4-1)
[2015-07-21 12:44] [ALPM] upgraded lsof (4.88-2 -> 4.89-1)
[2015-07-21 12:44] [ALPM] upgraded modemmanager (1.4.8-2 -> 1.4.10-2)
[2015-07-21 12:44] [ALPM] upgraded mono (4.0.1.44-1 -> 4.0.2.5-1)
[2015-07-21 12:44] [ALPM] installed libinput (0.20.0-1)
[2015-07-21 12:44] [ALPM] upgraded qt5-base (5.4.2-1 -> 5.5.0-1)
[2015-07-21 12:44] [ALPM] upgraded qt5-xmlpatterns (5.4.2-1 -> 5.5.0-1)
[2015-07-21 12:44] [ALPM] upgraded qt5-declarative (5.4.2-1 -> 5.5.0-1)
[2015-07-21 12:44] [ALPM] upgraded octopi (0.7.0-3 -> 0.7.0-4)
[2015-07-21 12:44] [ALPM] upgraded octopi-cachecleaner (0.7.0-3 -> 0.7.0-4)
[2015-07-21 12:44] [ALPM] upgraded octopi-pacmanhelper (0.7.0-3 -> 0.7.0-4)
[2015-07-21 12:44] [ALPM] upgraded octopi-notifier-qt5 (0.7.0-3 -> 0.7.0-4)
[2015-07-21 12:44] [ALPM] upgraded perl-http-message (6.08-1 -> 6.10-1)
[2015-07-21 12:44] [ALPM] upgraded python2-ipaddress (1.0.10-1 -> 1.0.14-1)
[2015-07-21 12:44] [ALPM] upgraded soundtouch (1.8.0-1 -> 1.9.0-1)
[2015-07-21 12:44] [ALPM] warning: /etc/sudoers installed as /etc/sudoers.pacnew
[2015-07-21 12:44] [ALPM] upgraded sudo (1.8.13-1 -> 1.8.14.p1-1)
[2015-07-21 12:44] [ALPM] upgraded usb_modeswitch (2.2.3-1 -> 2.2.5-1)
[2015-07-21 12:44] [ALPM] upgraded xfdesktop (4.12.2-1 -> 4.12.3-1)
[2015-07-21 12:44] [ALPM] upgraded xorg-server-common (1.17.2-2 -> 1.17.2-4)
[2015-07-21 12:44] [ALPM] upgraded xorg-server (1.17.2-2 -> 1.17.2-4)
[2015-07-21 12:44] [ALPM] upgraded xscreensaver (5.32-1 -> 5.33-1)
[2015-07-21 12:45] [ALPM] transaction completed

And here is the results of the other command:

lightdm   1660     1  0 20:20 ?        00:00:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
root      1679  1523  0 20:20 ?        00:00:00 lightdm --session-child 13 20
jeremy    1960     1  0 20:24 ?        00:00:00 dbus-launch --sh-syntax --exit-with-session
jeremy    1961     1  0 20:24 ?        00:00:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
jeremy    1968  1951  0 20:24 ?        00:00:00 xfce4-session
jeremy    2021     1  0 20:24 ?        00:00:00 /usr/lib/at-spi2-core/at-spi2-registryd --use-gnome-session
jeremy    4325  2590  0 21:05 pts/0    00:00:00 grep --colour=auto session

Offline

#5 2015-07-25 01:42:19

Red_Cedar77
Member
Registered: 2015-04-19
Posts: 8

Re: "Session manager must be in idle state when requesting a shutdown"

sixsixfive wrote:

depends on what display manager you use eg: with slim i need to put: "exec ck-launch-session dbus-launch --exit-with-session startxfce4" into my ~/.xinitrc to make xfce shutdown/reboot work

I was running lightdm when this problem started and while doing some searching came across the problem with the display manager. I decided to try and install slim thinking that maybe this would fix it. I followed the Manjaro Slim wiki page and set up the ~/.xinitrc file according to what it said. Here is the page: https://wiki.manjaro.org/index.php/SLiM_Configuration.

I was not able to get slim to work and it seems like lightdm is still the default display manager on my computer.

Here is what my ~/.xinitrc file looks like:

#!/bin/sh

#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)
#

export GTK2_RC_FILES="$HOME/.gtkrc-2.0"

exec $1

I thought I had saved what was there previously with lightdm in a office file but seem to have lost it. So, I am not able to go back to what I had previously. Lightdm is the defualt display manager and was working fine for the last 4 months that I had Manajaro installed until just this last week. So, I am not sure what is really going on here.

Last edited by Red_Cedar77 (2015-07-25 01:45:24)

Offline

#6 2015-07-25 08:04:04

sixsixfive
Member
From: behind you
Registered: 2012-04-08
Posts: 579
Website

Re: "Session manager must be in idle state when requesting a shutdown"

I was not able to get slim to work and it seems like lightdm is still the default display manager on my computer.

you need at least a session cmd in your xinitrc eg add:

exec ck-launch-session dbus-launch --exit-with-session startxfce4

there is also the other way to replace the sessioncmd in your slim.conf to ensure that consolekit is running

login_cmd           exec /bin/bash -login ck-launch-session dbus-launch ~/.xinitrc %session

also did you change your xdm conf?

https://wiki.gentoo.org/wiki/SLiM#OpenRC

Offline

#7 2015-07-25 23:14:47

Red_Cedar77
Member
Registered: 2015-04-19
Posts: 8

Re: "Session manager must be in idle state when requesting a shutdown"

sixsixfive wrote:

I was not able to get slim to work and it seems like lightdm is still the default display manager on my computer.

you need at least a session cmd in your xinitrc eg add:

exec ck-launch-session dbus-launch --exit-with-session startxfce4

there is also the other way to replace the sessioncmd in your slim.conf to ensure that consolekit is running

login_cmd           exec /bin/bash -login ck-launch-session dbus-launch ~/.xinitrc %session

also did you change your xdm conf?

https://wiki.gentoo.org/wiki/SLiM#OpenRC


Okay, I followed your instructions and got slim configured. However, when I restarted my computer and tried to login I got an error that says "Failed to execute login command". I am also not able to get to a terminal. If I try and go to tty1 I get a screen of text with the last line saying "(II) AIGX: Suspending AIGX clients for VT switch". If I try tty2-6 all I get is a black screen with a blinking cursor in the top left corner.

So, what happened and what should I do?

Offline

#8 2015-07-26 09:58:41

sixsixfive
Member
From: behind you
Registered: 2012-04-08
Posts: 579
Website

Re: "Session manager must be in idle state when requesting a shutdown"

if you can't currently edit a file due the black ttys and a missing xterm hit [e] at GRUB and add single to your kernel line (the line beginning with linux) to run in recovery mode. Log in as root and comment the DISPLAYMANAGER line in /etc/conf.d/xdm with nano or vi(this will disable the display manager). After the reboot login and try to launch xfce with

ck-launch-session dbus-launch --exit-with-session startxfce4

can you reboot and shutdown now?

-------------
>Failed to execute login command". I am also not able to get to a terminal

if you added the startxfce4 command to your xinitrc you need to comment the sessiondir line

also could you please post your slim.conf and your ~/.xinitrc?

@back ttys/no text

probably a xorg driver bug:

http://askubuntu.com/questions/3667/bla … -6-screens

Last edited by sixsixfive (2015-07-26 10:20:49)

Offline

#9 2015-07-26 23:53:02

Red_Cedar77
Member
Registered: 2015-04-19
Posts: 8

Re: "Session manager must be in idle state when requesting a shutdown"

sixsixfive wrote:

if you can't currently edit a file due the black ttys and a missing xterm hit [e] at GRUB and add single to your kernel line (the line beginning with linux) to run in recovery mode. Log in as root and comment the DISPLAYMANAGER line in /etc/conf.d/xdm with nano or vi(this will disable the display manager). After the reboot login and try to launch xfce with

ck-launch-session dbus-launch --exit-with-session startxfce4

can you reboot and shutdown now?

I did this but was not able to get xfce to start. I also tried to use the "startx" command but same result. I got some error that it could not run startx becuase the /tmp directory had no space availible. I have looked in the Xorg log file but nothing seems to explain why this is not working.

I was able to get XFCE running again by going back to using lightdm but I am still not able to shutdown or reboot with out using the terminal.

sixsixfive wrote:

if you added the startxfce4 command to your xinitrc you need to comment the sessiondir line

also could you please post your slim.conf and your ~/.xinitrc?

@back ttys/no text

probably a xorg driver bug:

http://askubuntu.com/questions/3667/bla … -6-screens

Here are the files you wanted to see.

slim.conf:

# Path, X server and arguments (if needed)
# Note: -xauth $authfile is automatically appended
default_path        /bin:/usr/bin:/usr/local/bin
default_xserver     /usr/bin/X
xserver_arguments -nolisten tcp vt07

# Commands for halt, login, etc.
halt_cmd            /sbin/shutdown -h now
reboot_cmd          /sbin/shutdown -r now
console_cmd         /usr/bin/xterm -C -fg white -bg black +sb -T "Console login" -e /bin/sh -c "/bin/cat /etc/issue; exec /bin/login"
#suspend_cmd        /usr/sbin/suspend

# Full path to the xauth binary
xauth_path         /usr/bin/xauth

# Xauth file for server
authfile           /var/run/slim.auth


# Activate numlock when slim starts. Valid values: on|off
# numlock             on
# Hide the mouse cursor (note: does not work with some WMs).
# Valid values: true|false
# hidecursor          false

# This command is executed after a succesful login.
# you can place the %session and %theme variables
# to handle launching of specific commands in .xinitrc
# depending of chosen session and slim theme
#
# NOTE: if your system does not have bash you need
# to adjust the command according to your preferred shell,
# i.e. for freebsd use:
# login_cmd           exec /bin/sh - ~/.xinitrc %session
login_cmd           exec /bin/bash -login ck-launch-session dbus-launch ~/.xinitrc %session

# Commands executed when starting and exiting a session.
# They can be used for registering a X11 session with
# sessreg. You can use the %user variable
#
# sessionstart_cmd      some command
# sessionstop_cmd       some command

# Start in daemon mode. Valid values: yes | no
# Note that this can be overriden by the command line
# options "-d" and "-nodaemon"
# daemon        yes

# Set directory that contains the xsessions.
# slim reads xsesion from this directory, and be able to select.
sessiondir            /usr/share/xsessions/

# Executed when pressing F11 (requires imagemagick)
screenshot_cmd      import -window root /slim.png

# welcome message. Available variables: %host, %domain
welcome_msg         Welcome to %host

# Session message. Prepended to the session name when pressing F1
# session_msg         Session: 

# shutdown / reboot messages
shutdown_msg       The system is halting...
reboot_msg         The system is rebooting...

# default user, leave blank or remove this line
# for avoid pre-loading the username.
#default_user        simone

# Focus the password field on start when default_user is set
# Set to "yes" to enable this feature
#focus_password      no

# Automatically login the default user (without entering
# the password. Set to "yes" to enable this feature
#auto_login          no


# current theme, use comma separated list to specify a set to 
# randomly choose from
current_theme       default

# Lock file
lockfile            /var/lock/slim.lock

# Log file
logfile             /var/log/slim.log

xinitrc:

#!/bin/sh

#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)
#

export GTK2_RC_FILES="$HOME/.gtkrc-2.0"

#exec ck-launch-session dbus-launch --exit-with-session startxfce4

exec $1

I have the "exec" line commented out in order to run lightdm.

Thanks for all your help!

Offline

#10 2015-07-27 19:18:00

sixsixfive
Member
From: behind you
Registered: 2012-04-08
Posts: 579
Website

Re: "Session manager must be in idle state when requesting a shutdown"

oops i guess you mixed a bit

there are two ways to get an x server from slim:

#1: with an xinitrc (SLiM launches only the xserver and will then execute xinitrc)

thats what i use

to use this you need an xinitrc with a command to launch a session you also need to uncomment the session_dir in slim conf for example my files(they are a bit customized so don't blind copy):

slim.conf:

# Path, X server and arguments (if needed)
# Note: -xauth $authfile is automatically appended
default_path        /bin:/usr/bin:/usr/local/bin
default_xserver     /usr/bin/X
xserver_arguments -nolisten tcp vt07

# Commands for halt, login, etc.
halt_cmd            /sbin/shutdown -h now
reboot_cmd          /sbin/shutdown -r now
#console_cmd         /usr/bin/xterm -C -fg white -bg black +sb -T "Console login" -e /bin/sh -c "/bin/cat /etc/issue; exec /bin/login"
console_cmd	/usr/bin/xfce4-terminal -e '/bin/bash -c "/bin/cat /etc/issue; exec /bin/login"'
#suspend_cmd        /usr/sbin/suspend

# Full path to the xauth binary
xauth_path         /usr/bin/xauth 

# Xauth file for server
authfile           /var/run/slim.auth

# Activate numlock when slim starts. Valid values: on|off
numlock             off

# Hide the mouse cursor (note: does not work with some WMs).
# Valid values: true|false
hidecursor          false

# This command is executed after a succesful login.
# you can place the %session and %theme variables
# to handle launching of specific commands in .xinitrc
# depending of chosen session and slim theme
#
# NOTE: if your system does not have bash you need
# to adjust the command according to your preferred shell,
# i.e. for freebsd use:
# login_cmd           exec /bin/sh - ~/.xinitrc %session
#login_cmd           exec /bin/bash -login ck-launch-session dbus-launch ~/.xinitrc %session
login_cmd           exec /bin/bash -login ~/.xinitrc %session
# Commands executed when starting and exiting a session.
# They can be used for registering a X11 session with
# sessreg. You can use the %user variable
#
# sessionstart_cmd	some command
# sessionstop_cmd	some command

# Start in daemon mode. Valid values: yes | no
# Note that this can be overriden by the command line
# options "-d" and "-nodaemon"
# daemon	no
# Set directory that contains the xsessions.
# slim reads xsesion from this directory, and be able to select.
#sessiondir            /usr/share/xsessions/

# Executed when pressing F11 (requires imagemagick)
screenshot_cmd      import -window root /slim.png

# welcome message. Available variables: %host, %domain
welcome_msg         You again!

# Session message. Prepended to the session name when pressing F1
#session_msg         Session: 

# shutdown / reboot messages
shutdown_msg       The system is halting...
reboot_msg         The system is rebooting...

# default user, leave blank or remove this line
# for avoid pre-loading the username.
#default_user        ssf

# Focus the password field on start when default_user is set
# Set to "yes" to enable this feature
#focus_password      yes

# Automatically login the default user (without entering
# the password. Set to "yes" to enable this feature
#auto_login          no

# current theme, use comma separated list to specify a set to 
# randomly choose from
#current_theme	default
current_theme       GlareSimple

# Lock file
lockfile            /var/lock/slim.lock

# Log file
logfile             /var/log/slim.log

~/.xinitrc

exec ck-launch-session dbus-launch --exit-with-session startxfce4

#2 with preconfigured sessions(eg if you have 2 or more sessions available eg openbox/xfce)

don't uncomment the "sessiondir", make sure "session_msg" is set to make session selection(F1) available - you usually don't need a ~/.xinitrc here since it will execute the *.desktop files /usr/share/xsessions but some people are unable to to logout/reboot which can be fixed by launching consolekit or dbus before your session command wink eg:

login_cmd           exec /bin/bash -login ck-launch-session dbus-launch ~/.xinitrc %session

also as you can see the desktop file for an xfce-session includes just the startxfce4 command:

[ssf@localhost xsessions]$ cat /usr/share/xsessions/xfce.desktop
[Desktop Entry]
Version=1.0
Name=Xfce Session
...
Comment=Use this session to run Xfce as your desktop environment
...
Exec=startxfce4
Icon=
Type=Application
DesktopNames=XFCE

Offline

#11 2015-07-28 02:45:11

Red_Cedar77
Member
Registered: 2015-04-19
Posts: 8

Re: "Session manager must be in idle state when requesting a shutdown"

Hey sixsixfive:
Good news. I got Slim working and I can now shutdown and restart my computer from the desktop. I actually got the computer to shutdown before I got Slim working. The problems seems to have been Virtualbox. The last update seems to have brocken Virtualbox. So, once I uninstalled Virtualbox and did a update of my system, everything seems to work like normal.

Thanks for your help. I learned somethings that I did not know before (like starting in recovery mode) that will help me in the future.

Offline

Board footer

Powered by FluxBB