You are not logged in.

#1 2013-06-15 16:17:55

colinkeenan
Member
From: Kansas City, MO USA
Registered: 2013-06-13
Posts: 213
Website

[Solved] Display Manager crashes on 2nd log out

I'm running SDDM for the display manager and Xfce for the desktop environment. I'm just finished my Arch install yesterday, but I had the same problem when I was running Manjaro. I know this problem is not related to SDDM because in Manjaro I tried other display managers and had the same problem. The problem is not specific to my computer because I had this problem on my older computer too. I built this computer I'm using now just last month.

However, I didn't have this problem when I first completed my Arch install, so the problem must be caused by an application I installed. Since I don't log out multiple times after installing each package, I would have know idea when this problem started.

Has anyone else experienced this problem? I know a lot of Manjaro users have experienced it. Maybe if we all post what applications we're using, we can narrow the issue down.

pacman -Qe:

abiword 2.8.6-9
alsa-utils 1.0.27.1-2
arj 3.10.22-7
autoconf 2.69-1
automake 1.13.2-1
bash 4.2.045-4
bash-completion 2.1-2
binutils 2.23.2-2
bison 2.7.1-1
blueman 1.23-10
brother-hl2140 2.0.2-7
bzip2 1.0.6-4
chrony 1.27-4
coreutils 8.21-2
cronie 1.4.9-4
cryptsetup 1.6.1-2
deb2targz 0.1-6
device-mapper 2.02.98-4
dhcpcd 5.6.8-3
diffutils 3.3-1
dnsmasq 2.66-1
e2fsprogs 1.42.7-2
exo 0.10.2-1
fakeroot 1.19-1
file 5.14-1
file-roller 3.8.2-1
filesystem 2013.05-2
findutils 4.4.2-5
firefox 21.0-1
flashplugin 11.2.202.291-1
flex 2.5.37-1
font-manager 0.5.7-4
gamin 0.1.10-7
garcon 0.2.1-1
gawk 4.1.0-1
gcc 4.8.1-1
gcc-libs 4.8.1-1
gettext 0.18.2.1-1
gimp 2.8.4-2
gksu 2.0.2-4
glibc 2.17-6
gnome-disk-utility 3.8.2-1
gnote 3.8.1-1
gnucash 2.4.13-1
gnumeric 1.12.2-2
google-chrome 27.0.1453.110-1
google-talkplugin 4.0.1.0-1
grep 2.14-2
grub-efi-x86_64 2.00-1
gtk2-xfce-engine 3.0.1-1
gtk3-xfce-engine 3.0.1-1
guake 0.4.4-2
gucharmap 3.8.2-1
gzip 1.5-3
heirloom-mailx 12.5-3
hplip 3.13.5-2
hpoj 0.91-20
html2text 1.3.2a-9
inetutils 1.9.1-6
iproute2 3.9.0-2
iputils 20121221-2
jack 0.121.3-7
jfsutils 1.1.15-4
less 458-1
lib32-alsa-plugins 1.0.27-1
lib32-flashplugin 11.2.202.285-1
lib32-gstreamer0.10-base 0.10.36-4
lib32-intel-dri 9.1.3-2
lib32-jack 0.121.3-1
lib32-libpulse 4.0-2
lib32-libsamplerate 0.1.8-1
lib32-speex 1.2rc1-4
libtool 2.4.2-9
licenses 20130203-1
linux 3.9.5-1
lirc-utils 1:0.9.0-46
logrotate 3.8.4-2
lvm2 2.02.98-4
m4 1.4.16-3
make 3.82-5
man-db 2.6.3-3
man-pages 3.51-1
mdadm 3.2.6-4
mousepad 0.3.0-2
nano 2.2.6-2
netctl 1.1-1
notification-daemon 0.7.6-2
orage 4.8.4-2
p7zip 9.20.1-6
package-query 1.2-2
pacman 4.1.1-1
pacmatic 20121112-1
patch 2.7.1-2
pciutils 3.2.0-3
pcmciautils 018-7
perl 5.18.0-1
pkg-config 0.28-1
poppler-glib 0.22.4-1
procps-ng 3.3.8-1
psmisc 22.20-1
pulseaudio 4.0-2
pulseaudio-alsa 2-2
python2-pyqt 4.10.1-1
qbittorrent 3.0.9-2
reflector 2013-1
reiserfsprogs 3.6.22-2
ristretto 0.6.3-3
sddm 0.1.0-1
sed 4.2.2-3
shadow 4.1.5.1-6
simple-scan 3.8.0-1
sudo 1.8.6.p8-2
sysfsutils 2.1.0-8
systemd-sysvcompat 204-3
tar 1.26-4
texinfo 5.1-1
thunar 1.6.3-1
thunar-archive-plugin 0.3.1-1
thunar-media-tags-plugin 0.2.1-1
thunar-volman 0.8.0-1
ttf-google-fonts-git 20130609-1
tumbler 0.1.29-1
unace 2.5-7
unrar 1:4.2.4-1
usbutils 006-1
util-linux 2.23.1-2
vi 1:050325-3
vim 7.3.918-2
vlc 2.0.7-2
webkitgtk2 1.10.2-7
which 2.20-6
xf86-video-intel 2.21.9-1
xfburn 0.4.3-6
xfce4-appfinder 4.10.1-1
xfce4-artwork 0.1.1a_git20110420-2
xfce4-battery-plugin 1.0.5-1
xfce4-clipman-plugin 1.2.3-2
xfce4-cpufreq-plugin 1.0.0-3
xfce4-cpugraph-plugin 1.0.5-1
xfce4-datetime-plugin 0.6.2-1
xfce4-dict 0.7.0-1
xfce4-diskperf-plugin 2.5.4-1
xfce4-eyes-plugin 4.4.2-1
xfce4-fsguard-plugin 1.0.1-1
xfce4-genmon-plugin 3.4.0-1
xfce4-mailwatch-plugin 1.1.0-5
xfce4-mixer 4.10.0-2
xfce4-mount-plugin 0.6.4-1
xfce4-mpc-plugin 0.4.4-1
xfce4-netload-plugin 1.2.0-1
xfce4-notes-plugin 1.7.7-4
xfce4-notifyd 0.2.4-1
xfce4-panel 4.10.1-1
xfce4-power-manager 1.2.0-4
xfce4-quicklauncher-plugin 1.9.4-7
xfce4-screenshooter 1.8.1-1
xfce4-sensors-plugin 1.2.5-1
xfce4-session 4.10.1-1
xfce4-settings 4.10.1-1
xfce4-smartbookmark-plugin 0.4.5-1
xfce4-systemload-plugin 1.1.1-1
xfce4-taskmanager 1.0.0-3
xfce4-terminal 0.6.2-1
xfce4-time-out-plugin 1.0.1-2
xfce4-timer-plugin 1.0.0-1
xfce4-verve-plugin 1.0.0-3
xfce4-wavelan-plugin 0.5.11-1
xfce4-weather-plugin 0.8.3-3
xfce4-xkb-plugin 0.5.5-1
xfconf 4.10.0-3
xfdesktop 4.10.2-1
xfsprogs 3.1.11-1
xfwm4 4.10.1-1
xfwm4-themes 4.10.0-1
xorg-bdftopcf 1.0.4-1
xorg-iceauth 1.0.5-1
xorg-luit 1.1.1-1
xorg-mkfontdir 1.0.7-1
xorg-mkfontscale 1.1.0-1
xorg-server 1.14.1-1
xorg-sessreg 1.0.8-1
xorg-setxkbmap 1.3.0-1
xorg-smproxy 1.0.5-1
xorg-x11perf 1.5.4-1
xorg-xauth 1.0.7-1
xorg-xbacklight 1.2.0-1
xorg-xcmsdb 1.0.4-1
xorg-xcursorgen 1.0.5-2
xorg-xdpyinfo 1.3.1-1
xorg-xdriinfo 1.0.4-3
xorg-xev 1.2.1-1
xorg-xgamma 1.0.5-1
xorg-xhost 1.0.5-1
xorg-xinput 1.6.0-1
xorg-xkbcomp 1.2.4-1
xorg-xkbevd 1.1.3-1
xorg-xkbutils 1.0.4-1
xorg-xkill 1.0.3-3
xorg-xlsatoms 1.1.1-1
xorg-xlsclients 1.1.2-2
xorg-xmodmap 1.0.7-1
xorg-xpr 1.0.4-1
xorg-xprop 1.2.1-1
xorg-xrandr 1.4.0-1
xorg-xrdb 1.0.9-2
xorg-xrefresh 1.0.5-1
xorg-xset 1.2.2-2
xorg-xsetroot 1.1.1-1
xorg-xvinfo 1.1.2-1
xorg-xwd 1.0.5-2
xorg-xwininfo 1.1.3-1
xorg-xwud 1.0.4-1
xscreensaver 5.21-1
yaourt 1.3-1
zip 3.0-3

I also installed Steam, but not from repositories because the key was invalid. I installed steam by downloading http://repo.steampowered.com/steam/arch … est.tar.gz and doing make install and running steam from command line the first time.

If I had to guess, I would say either Steam or Chrony is the culprit. If anyone reading this is using either of those packages, please double check that you can log out of your desktop environment more than twice without crashing your display manager and let me know.

Of course, if anyone already knows how to solve this or how I can diagnose the problem let me know. I haven't been able to find anything from searching the wiki or forums or google.

Last edited by colinkeenan (2013-08-07 22:46:16)

Offline

#2 2013-06-17 02:44:51

colinkeenan
Member
From: Kansas City, MO USA
Registered: 2013-06-13
Posts: 213
Website

Re: [Solved] Display Manager crashes on 2nd log out

OK, nobody is replying. I've been more diligent in searching the forums, although I promise I really tried the first time. This time though, I've found a relevant thread:
https://bbs.archlinux.org/viewtopic.php?id=159958

I will update this thread with a solution if I find it for SDDM. That thread (so far as I've read) doesn't mention SDDM, but there are answers for LXDM and possibly Slim. I'm hoping to understand what's really causing the problem though and if I do, I'll post a general solution here.

Offline

#3 2013-06-17 04:10:29

colinkeenan
Member
From: Kansas City, MO USA
Registered: 2013-06-13
Posts: 213
Website

Re: [Solved] Display Manager crashes on 2nd log out

I was hoping that by studying the configuration posted by one member in that thread who says he doesn't have this issue, I would be able to see a general solution. I don't see one. I still think it could be the result of something all of us having this issue have installed rather than configuration. Or, it could have something to do with when we did the initial install; so that maybe really old installs continue to work without this issue even though they keep their system up to date while newer installs (perhaps after systemd went into effect) do have this issue eventually.

I don't know, but the only hack that would work regardless of what display manager is used would be to setup automatic login to the virtual terminal and then have it automatically force logout users and then restart the display manager. That's the solution in that thread but it only applies to display managers that have a way initiate commands after they crash.

I'm not interested in any hack like this. I'm perfectly capable of just logging into the terminal and restarting the display manager. Or, since I'm using an ssd on a fast computer now, I can just reboot since it's quick anyway.

In general usage, I rarely logout at all. I'm guessing that's true of many users or many aren't even using a display manager, and that's why this issue is never getting solved.

Offline

#4 2013-06-17 21:39:44

colinkeenan
Member
From: Kansas City, MO USA
Registered: 2013-06-13
Posts: 213
Website

Re: [Solved] Display Manager crashes on 2nd log out

Even though I said I wasn't interested in a hack solution, I've gone ahead and figured out a general hack that will work with any window manager but not as cleanly as the specific hacks mentioned in that Arch wiki for LXDM or Slim. I'm using SDDM, so this is the best I can come up with.

It involves https://aur.archlinux.org/packages/cdm-git/ and https://wiki.archlinux.org/index.php/Au … al_console

First, I realized it's possible to skip the menu that cdm (Console Display Manager) provides if there's only one option. You can define what options are listed on the menu by editing /etc/cdmrc.

My /etc/cdmrc (only showing sections I changed)

binlist=(
  'sudo systemctl restart sddm'
)
namelist=('Simple Desktop Display Manager')
flaglist=(C)
...
consolekit=no
...

Second, I followed the Arch Wiki on getting automatic login to virtual console so that when SDDM crashes to the console, I don't have to login to it: https://wiki.archlinux.org/index.php/Au … al_console. This is one of the shortest Arch Wiki articles I've seen and very easy to follow.

With these two steps, when SDDM crashes to the console, I don't have to login and it automatically runs sudo systemctl restart sddm. Unfortunately, it still shows me the console as it waits for me to enter my sudo password so it can execute that command.

There is still another issue though. Sometimes instead of crashing to the console, XFCE gets stuck on logout. It will still display the mouse pointer. The background may just be black, or it may be my wallpaper, or it may be an application that still works but can't be closed. To fix this I've created an alias command that I call forcelogout. Alias commands are generally entered into .bashrc.

Part of my .bashrc showing forcelogout

#
# ~/.bashrc
#

# If not running interactively, don't do anything
[[ $- != *i* ]] && return
...
alias forcelogout='sudo loginctl kill-user colin'
...

At first I was using terminate-user as recommended in a related thread, but it didn't always work; kill-user is more reliable.

Then, if Xfce refuses to fully logout, I do Ctrl-Alt-f2, login to that console, and run forcelogout. The automatic login and cdm script only happen on console 1. You have to use console 2 (or 3, 4, 5, 6) if you are using cdm on console 1.

Even if the CDM thing is too much trouble, the forcelogout alias is easy and useful if you ever notice that the desktop gets stuck on logout sometimes.

Last edited by colinkeenan (2013-06-18 09:35:42)

Offline

#5 2013-06-23 19:46:38

colinkeenan
Member
From: Kansas City, MO USA
Registered: 2013-06-13
Posts: 213
Website

Re: [Solved] Display Manager crashes on 2nd log out

My solution above is OK if you end up crashing to the command line or if the desktop crashes, but it's better to avoid crashing altogether. Here is a better solution I adapted from https://bbs.archlinux.org/viewtopic.php?id=159932.

0) Install zenity which lets you popup dialogue windows from shell scripts. Make sure you've already setup sudo (read wiki on sudo if not).

1) Create /usr/local/bin/restartsddm and don't forget to sudo chmod +x /usr/local/bin/restartsddm

zenity --question --title "Alert"  --text "Logout by Restarting Simple Desktop Display Manager?"
if [[ $? == 0 ]] ; then
	sudo systemctl restart sddm
fi

2) Copy and modify the system logout.desktop file from /usr/share/applications to ~/.local/share/applications

cp /usr/share/applications/*logout* ~/.local/share/applications/
cd ~/.local/share/applications/
ls *logout*

Use your favorite editor to modify whatever that *logout* file is in ~/.local/share/applications.
For example, ~/.local/share/applications/xfce4-session-logout.desktop

Version=1.0
Type=Application
Exec=xfce4-session-logout
...

Would become

Version=1.0
Type=Application
Exec=sudo restartsddm

3) Make it so you don't have to type your password to logout by editing the sudoers file:

sudo visudo

Or, if you don't know how to use the vi editor, use nano instead with

export VISUAL=nano
su
visudo
exit

Make the part of the sudoers file having to do with sudo look as follows:

%sudo	ALL=(ALL) ALL
%sudo	ALL=(ALL) NOPASSWD: /usr/local/bin/restartsddm

Finally, put a launcher on your panel in the spot where you normally invoke logout and point that launcher to your logout.desktop.

Modifying and putting the launcher on the panel in Xfce can be done without directly copying and editing the .desktop file, so here's an alternative step 2) In Application Finder search on log. Right click on Log Out and choose Edit. Change the command to sudo restartsddm. Then to put the launcher on the panel, right-click the panel -> Panel -> Add New Items and choose Launcher. Right-click the Launcher and click plus button, type log and choose Log Out which will be the new one you defined.

Offline

#6 2013-06-24 01:22:07

colinkeenan
Member
From: Kansas City, MO USA
Registered: 2013-06-13
Posts: 213
Website

Re: [Solved] Display Manager crashes on 2nd log out

As a further refinement, install wmctrl and create a close_windows script at follows:

/usr/local/bin/close_windows and don't forget to sudo chmod+x /usr/local/bin/close_windows

# close all open windows gracefully without closing the Desktop environment
WIN_IDs=$(wmctrl -l | grep -vwE "Desktop$|xfce4-panel$" | cut -f1 -d' ')
for i in $WIN_IDs; do wmctrl -ic "$i"; done

Then call it from the restartsddm script as follows:

/usr/local/bin/restartsddm

close_windows
zenity --question --width=200 --text "
<span color=\"red\">Answer after all windows close.</span>
<span color=\"gray\">Proceed with logout?</span>"
if test $? == 0 ; then
	sudo systemctl restart sddm
fi

The reason for warning about waiting for all windows to close before proceeding is that the user needs to find out why all the windows didn't close. There's probably a "Save?" dialogue open somewhere.

Offline

#7 2013-06-24 20:18:50

colinkeenan
Member
From: Kansas City, MO USA
Registered: 2013-06-13
Posts: 213
Website

Re: [Solved] Display Manager crashes on 2nd log out

OK. This will be my last post on this subject unless the problem is properly fixed. I decided to expand the restartsddm script (and rename it to alt_logout, making it a replacement for the usual logout menu in Xfce.

/usr/local/bin/alt_logout

close_windows
to_do=`zenity --list --text "<span color=\"red\">After all windows close</span>" \
--column="What Next?" Shutdown Restart Logout Nothing`
case $to_do in 
Shutdown) shutdown now
	;;
Restart) shutdown -r now
	;;
Logout) sudo systemctl restart sddm
	;;
Nothing)
	;;
esac

If you use this, update the ...logout.desktop file to run sudo alt_logout, and also update the panel launcher. In Xfce anyway, when you change a .desktop file, that change is not automatically picked up by a launcher on the panel. You have to go into the properties of the launcher, remove the command, then add the command back again.

Don't forget to visudo again to allow running sudo alt_logout without password. If it asks for a password, you won't see that it's asking so it would appear nothing happened when you choose logout.

Last edited by colinkeenan (2013-06-25 04:30:50)

Offline

#8 2013-06-25 22:14:26

colinkeenan
Member
From: Kansas City, MO USA
Registered: 2013-06-13
Posts: 213
Website

Re: [Solved] Display Manager crashes on 2nd log out

FINALLY HAVE A REAL SOLUTION thanks to http://forum.manjaro.org/index.php?topi … 2#msg46072

Forget all the complicated stuff above. All you have to do is add a single line to the end of a conf file as follows:

/etc/pam.d/sddm

...
session 	required 	pam_systemd.so

This works for lxdm too where you add that line to /etc/pam.d/lxdm. I'm sure it would work for other display managers.

I have updated the Display Manager wiki with this information.

Last edited by colinkeenan (2013-06-25 22:38:08)

Offline

#9 2013-06-25 22:17:19

colinkeenan
Member
From: Kansas City, MO USA
Registered: 2013-06-13
Posts: 213
Website

Re: [Solved] Display Manager crashes on 2nd log out

How do I mark this thread as solved?

Offline

#10 2013-07-03 01:55:36

ajbibb
Member
Registered: 2012-02-12
Posts: 142

Re: [Solved] Display Manager crashes on 2nd log out

I was having a crash on second logout using SLIM.  Don't actually do it all that often so more of a minor annoyance, but an annoyance just the same.  Making your suggested change to /etc/pam.d/slim appears to have solved the problem.  Seems to support your suggestion that it would work for other display managers as well.

Thank you.

Offline

#11 2013-07-03 02:41:47

Stebalien
Member
Registered: 2010-04-27
Posts: 1,237
Website

Re: [Solved] Display Manager crashes on 2nd log out

colinkeenan wrote:

How do I mark this thread as solved?

Edit the first post and prepend [SOLVED] to the title.


Steven [ web : git ]
GPG:  327B 20CE 21EA 68CF A7748675 7C92 3221 5899 410C
Do not email: honeypot@stebalien.com

Offline

#12 2013-08-07 17:18:36

qwertypoke
Member
Registered: 2011-09-06
Posts: 28

Re: [Solved] Display Manager crashes on 2nd log out

I added a bug report on this:

https://bugs.archlinux.org/task/36446

I tried slim and lxdm on my system. Both have the xfce4 second logout problem and both get fixed by the additional line in /etc/pam.d/lxdm|slim

Offline

Board footer

Powered by FluxBB