You are not logged in.

#1 2012-10-20 23:09:26

bullno1
Member
Registered: 2012-10-20
Posts: 6

xfce4+slim+systemd very slow shutdown

I just recently updated my system to boot using systemd and shutdown takes very long. The weird part is reboot is as fast as usual, only shutdown takes very very long to finish.

I followed the instruction at http://freedesktop.org/wiki/Software/sy … Eventually to create a shutdown log file. Here's the log:
http://pastebin.com/hyjtT5J5

Interesting part of the log:

[  275.984080] systemd[1]: slim.service stopping timed out. Killing.
[  275.984125] systemd[1]: slim.service changed stop-sigterm -> stop-sigkill

I use the provided slim.service without modification:


/var/log/slim.log is not very useful:

slim: waiting for X server to begin accepting connections.


slim: waiting for X server to begin accepting connections.

/etc/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 ~/.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

# Available sessions (first one is the default).
# The current chosen session name is replaced in the login_cmd
# above, so your login command can handle different sessions.
# see the xinitrc.sample file shipped with slim sources
sessions            xfce4,icewm-session,wmaker,blackbox

# 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        bullno1

# 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       slim-archlinux-simple

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

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

My .xinitrc:

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

if [ -d /etc/X11/xinit/xinitrc.d ]; then
  for f in /etc/X11/xinit/xinitrc.d/*; do
    [ -x "$f" ] && . "$f"
  done
  unset f
fi

[ -f ~/.xprofile ] && . ~/.xprofile

/etc/X11/Xsession
# exec gnome-session
# exec startkde
#exec startlxde
emerald &
exec startxfce4
# ...or the Window Manager of your choice

How to solve this problem? Thanks in advance.

Last edited by bullno1 (2012-10-21 05:47:39)

Offline

#2 2012-10-21 00:04:35

nomorewindows
Member
Registered: 2010-04-03
Posts: 3,015

Re: xfce4+slim+systemd very slow shutdown

I'm using xdm-archlinux, and it's still slow, but xfce saves the state you left it at.


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

#3 2012-10-31 16:27:16

madmack
Member
Registered: 2012-05-06
Posts: 13

Re: xfce4+slim+systemd very slow shutdown

same issue here.. did you find a solution? restarting and shutting down is terribly slow due to slim.service hanging somewhere

Offline

#4 2012-10-31 16:38:49

bullno1
Member
Registered: 2012-10-20
Posts: 6

Re: xfce4+slim+systemd very slow shutdown

madmack wrote:

same issue here.. did you find a solution? restarting and shutting down is terribly slow due to slim.service hanging somewhere

No sad.
The problem seems to be random. Sometimes, I can shutdown normally, sometimes, it takes forever.

Offline

#5 2012-10-31 21:47:56

Mindstormscreator
Member
Registered: 2012-07-01
Posts: 166

Re: xfce4+slim+systemd very slow shutdown

Same problem here, although sometimes when shutting down I think it completely freezes (or I'm just not patient enough) and my fans start spinning very fast indicating that there is a lot of cpu activity.

I've ignored this bug for a while now, but I think it's time it gets fixed.

Offline

#6 2012-10-31 22:00:48

madmack
Member
Registered: 2012-05-06
Posts: 13

Re: xfce4+slim+systemd very slow shutdown

Same exact setup of xfce4+slim+systemd leads to a graceful shuts down. This is only happening on my laptop for some reason.

Offline

#7 2012-10-31 22:24:58

madmack
Member
Registered: 2012-05-06
Posts: 13

Re: xfce4+slim+systemd very slow shutdown

some progress:

do "systemctl disable slim"

then after restarting, start slim manually: systemctl start slim (don't enable it)

shut down.. profit.

I'm not sure what the cause is here. Possibly a race condition? My desktop is ridiculously slow compared to my laptop's ssd. My laptop literally boots up into slim in an instant, maybe that's why it's having a problem shutting down.


here is a temporary workaround:


edit /usr/lib/systemd/system/slim.service by adding "KillSignal=SIGKILL" right after the ExecStart command.

[Unit]
Description=SLiM Simple Login Manager
After=systemd-user-sessions.service

[Service]
ExecStart=/usr/bin/slim -nodaemon
KillSignal=SIGKILL

[Install]
Alias=display-manager.service

Last edited by madmack (2012-10-31 22:58:01)

Offline

#8 2012-10-31 23:08:14

nomorewindows
Member
Registered: 2010-04-03
Posts: 3,015

Re: xfce4+slim+systemd very slow shutdown

If you're having to use the kill signal, then something's definitely up.
There's a locked resource somewhere, try using lsof or lslk maybe even top (maybe put it in a ExecStop=)


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

#9 2012-12-10 17:32:55

I-sty
Member
From: Romania
Registered: 2012-11-30
Posts: 60
Website

Re: xfce4+slim+systemd very slow shutdown

Same problem.
Sometimes, I can shutdown normally, sometimes, it takes a minutes.

Offline

#10 2012-12-10 17:39:38

10PinkPanther
Member
From: Croatia
Registered: 2012-11-10
Posts: 333

Re: xfce4+slim+systemd very slow shutdown

Hi!

I use xfce but with lxdm and speed is normal.Could it be a slim problem?

Offline

#11 2012-12-10 17:58:01

I-sty
Member
From: Romania
Registered: 2012-11-30
Posts: 60
Website

Re: xfce4+slim+systemd very slow shutdown

10PinkPanther wrote:

Hi!

I use xfce but with lxdm and speed is normal.Could it be a slim problem?

I do not know. Possible. How to can I see a log file to slim?

Offline

#12 2012-12-10 22:56:55

bisam
Member
From: Vienna
Registered: 2012-10-31
Posts: 16

Re: xfce4+slim+systemd very slow shutdown

I-sty wrote:
10PinkPanther wrote:

Hi!

I use xfce but with lxdm and speed is normal.Could it be a slim problem?

I do not know. Possible. How to can I see a log file to slim?

less /var/log/slim.log

see first post

Offline

#13 2012-12-11 06:38:30

Joel
Member
From: Tijuana, BC, México
Registered: 2011-12-21
Posts: 84

Re: xfce4+slim+systemd very slow shutdown

I have slim+xfce4+systemd and I haven't see a slow shutdown|reboot...

maybe you have other daemons pending to closed...

That happen to me with Debian a while a go with wicd...the systems waited until wicd dieded.

Try to list your services, with "systemctl -a", see if you find something that is not to meant run


* PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with xfce4.
* Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with xfce4.
* AUR contributor.

Offline

#14 2012-12-11 14:55:13

I-sty
Member
From: Romania
Registered: 2012-11-30
Posts: 60
Website

Re: xfce4+slim+systemd very slow shutdown

bisam wrote:

less /var/log/slim.log

see first post

slim: waiting for X server to begin accepting connections.

slim: waiting for X server to shut down



slim: waiting for X server to begin accepting connections.
slim: pam_end(): System error

slim: waiting for X server to shut down



slim: waiting for X server to begin accepting connections.

slim: waiting for X server to shut down



slim: waiting for X server to begin accepting connections.
slim: unexpected signal 15

slim: waiting for X server to shut down



slim: waiting for X server to begin accepting connections.

slim: waiting for X server to shut down



slim: waiting for X server to begin accepting connections.
slim: unexpected signal 15

Offline

#15 2012-12-11 15:02:20

I-sty
Member
From: Romania
Registered: 2012-11-30
Posts: 60
Website

Re: xfce4+slim+systemd very slow shutdown

Joel wrote:

I have slim+xfce4+systemd and I haven't see a slow shutdown|reboot...

maybe you have other daemons pending to closed...

That happen to me with Debian a while a go with wicd...the systems waited until wicd dieded.

Try to list your services, with "systemctl -a", see if you find something that is not to meant run

systemctl --all
....
auditd.service             error  inactive dead      auditd.service
laptop-mode.service        error  inactive dead      laptop-mode.service
plymouth-quit-wait.service error  inactive dead      plymouth-quit-wait.service
plymouth-start.service     error  inactive dead      plymouth-start.service
rc-local.service           error  inactive dead      rc-local.service
syslog.service             error  inactive dead      syslog.service

For these services I get error.

Offline

#16 2012-12-12 01:03:52

Joel
Member
From: Tijuana, BC, México
Registered: 2011-12-21
Posts: 84

Re: xfce4+slim+systemd very slow shutdown

Did you try "systemctl [poweroff|reboot]" from terminal? See if you have the same delay shutdown


* PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with xfce4.
* Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with xfce4.
* AUR contributor.

Offline

#17 2012-12-12 15:13:36

rene
Member
From: the Netherlands
Registered: 2010-08-18
Posts: 31

Re: xfce4+slim+systemd very slow shutdown

Hey guys,

please note: https://bugs.archlinux.org/task/32380

That is, it's a known problem and the hack of simply sending it the TERM signal multiple times works to mitigate it. Also note though -- I arrived at this thread due to experiencing the reboot-hang once again, meaning that it's not a good solution even in a practical sense.

I'll try staring at the slim sources to see if anything stands out, so keep an eye on that bug-report... but it may be useful to just install the hack that's proposed at the above bug-report in the mean time:

https://bugs.archlinux.org/task/32380#comment103128

Last edited by rene (2012-12-12 15:15:20)

Offline

#18 2012-12-15 12:34:15

I-sty
Member
From: Romania
Registered: 2012-11-30
Posts: 60
Website

Re: xfce4+slim+systemd very slow shutdown

Joel wrote:

Did you try "systemctl [poweroff|reboot]" from terminal? See if you have the same delay shutdown

No, I haven't delay with these commands, but with these the Arch don't save the sticky notes datas.

Offline

#19 2012-12-29 02:30:02

bullno1
Member
Registered: 2012-10-20
Posts: 6

Re: xfce4+slim+systemd very slow shutdown

rene wrote:

Hey guys,

please note: https://bugs.archlinux.org/task/32380

That is, it's a known problem and the hack of simply sending it the TERM signal multiple times works to mitigate it. Also note though -- I arrived at this thread due to experiencing the reboot-hang once again, meaning that it's not a good solution even in a practical sense.

I'll try staring at the slim sources to see if anything stands out, so keep an eye on that bug-report... but it may be useful to just install the hack that's proposed at the above bug-report in the mean time:

https://bugs.archlinux.org/task/32380#comment103128

Thanks. I'll try that. ArchLinux has been super stable before the switch to systemd. I guess that's the price for living on the bleeding edge.

Offline

#20 2013-01-02 18:31:32

ph34rb0t
Member
From: GER
Registered: 2012-09-28
Posts: 5

Re: xfce4+slim+systemd very slow shutdown

The followup to René's comment (see above) worked for me.

https://bugs.archlinux.org/task/32380#comment103886

However, I've added the "ExecStop=..." line to slim.service in /usr/lib/systemd/system and did the "systemctl disable slim && systemctl enable slim" dance.
I'm not sure whether René's "/etc/systemd/" approach is valid as well...


In any case, the following shutdown has been fast, so I guess the problem has been fixed for now.
Thanks, René!


- Edit:

A few shutdowns and reboots (on AC and battery) later, I can confirm that the long lag is (most probably) eliminated.
Thanks again!

Last edited by ph34rb0t (2013-01-02 19:19:18)

Offline

Board footer

Powered by FluxBB