SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2012-05-21 16:29:02

s.hum
Member
Registered: 2011-12-05
Posts: 24

Session hanging on exiting window manager

I thought I'd try out not using any display manager at all so did:

sudo update-rc.d gdm remove
sudo update-rc.d x11-common remove

and setup a simple .xsession file (seems you can use either a .xession or .xinitrc script.. tried both with same results). startx launches the desired window manager fine, only when I exit the window manager (doesn't matter which), instead of getting back to the console prompt, the system appears to be hung (looks like a display issue of sorts, am using startx with multihead support for dual monitors).

Re-enabling gdm is no problem but am curious if anyone else has seen this problem and figured it out. I would have thought using startx would be a more foolproof way to go, lol.

S

Offline

Be excellent to each other!

#2 2012-05-21 17:03:05

machinebacon
#! unstable
From: China
Registered: 2009-07-02
Posts: 6,825
Website

Re: Session hanging on exiting window manager

Did you change the /etc/inittab file?

Edit: Maybe this is helpful: http://www.debianadmin.com/how-to-auto- … ebian.html

Last edited by machinebacon (2012-05-21 17:06:37)


Sweaty lads picking up the soap | I love the new "Ignore user" button

Offline

#3 2012-05-21 18:27:47

s.hum
Member
Registered: 2011-12-05
Posts: 24

Re: Session hanging on exiting window manager

Wow, that was quick machinebacon!

The respawn info is good to know but that didn't fix the hung session after exiting the window manager. It looks like the displays are somehow disabled (unclean X termination).

Guess it's stick with gdm until the search comes up with something else to look at.

Thanks,
S

Offline

#4 2012-05-22 04:24:12

machinebacon
#! unstable
From: China
Registered: 2009-07-02
Posts: 6,825
Website

Re: Session hanging on exiting window manager

I think you need the last line in .bash_profile or where:

edit .bash_profile and at the bottom add

    if [ -z "$DISPLAY" ] && [ $(tty) = /dev/tty1 ]; then
    while true
    do
    startx --
    sleep 10
    done
    fi

How do you exit the WM? If openbox, do you use "openbox --exit"? I don't quite remember what cb-exit does, maybe you want to try the command "openbox --exit" in a terminal and check the output. If it works, simply add this as item in obmenu.


Sweaty lads picking up the soap | I love the new "Ignore user" button

Offline

#5 2012-05-22 13:56:53

s.hum
Member
Registered: 2011-12-05
Posts: 24

Re: Session hanging on exiting window manager

Interestingly, that loop works in that it cycles back to X and back into the wm when the wm is exited without any problems (other than the 10s loop delay, lol).

I was hoping to be able to get back to the console upon exiting the wm, but this can work -- at least, I can switch wm's on the exit cycle (with the way I've set up .xsession to run -- saves a bit of gdm interaction and login, not sure about the other gdm issues mentioned regarding resources and gnome).

Thanks!

Offline

#6 2012-05-22 16:45:48

xaos52
The Good Doctor
From: Planet of the @s
Registered: 2011-06-24
Posts: 4,602

Re: Session hanging on exiting window manager

You are probably not setting up the session correctly in your .xinitrc.
See this post http://crunchbanglinux.org/forums/post/191649/#p191649 by master el_koraco.

Offline

#7 2012-05-22 19:37:09

s.hum
Member
Registered: 2011-12-05
Posts: 24

Re: Session hanging on exiting window manager

xaos52, thanks for the link! Getting closer. Inserting the dbus and ck-launch statements definitely allowed removal of the loop to return to the console for stacking wm's like Openbox and Xfce. Interestingly, tiling managers like Notion and i3 still hang the session/display on exiting... strange. It would appear that tiling managers initialize something differently and this probably relates to a multi-display setup in this particular case.

As I pretty much live in Notion, guess the startx loop will have to do.

You guys rock!

Offline

#8 2012-05-22 19:58:33

xaos52
The Good Doctor
From: Planet of the @s
Registered: 2011-06-24
Posts: 4,602

Re: Session hanging on exiting window manager

Here is a frag of the output of 'ps aux' from my system:

xaos52    2780  0.0  0.6   4656  3176 tty1     S+   20:33   0:00 -bash
xaos52    2895  0.0  0.1   1904   544 tty1     S+   20:33   0:00 /bin/sh /usr/bin/startx -- -dpi 96
xaos52    2913  0.0  0.1   3260   712 tty1     S+   20:33   0:00 xinit /etc/X11/xinit/xinitrc -- /usr/bin/X -dpi 96 -auth /tmp/serverauth.MLRxbzeZ62
root      2914 14.4  5.5  49724 28376 tty7     Ss+  20:33  11:35 /usr/bin/X :0 -dpi 96 -auth /tmp/serverauth.MLRxbzeZ62
xaos52    2921  0.0  0.2   5800  1228 tty1     S    20:33   0:00 /usr/bin/ck-launch-session /usr/bin/dbus-launch --exit-with-session x-window-manager
xaos52    2958  0.0  0.1   3832   664 ?        Ss   20:33   0:00 /usr/bin/ssh-agent /usr/bin/ck-launch-session /usr/bin/dbus-launch --exit-with-session x-window-manager

This is the important part:
usr/bin/ck-launch-session /usr/bin/dbus-launch --exit-with-session x-window-manager
Compare this whith what you have got in 'ps aux'

Offline

#9 2012-05-22 20:07:25

el_koraco
#!/loony/bun
From: inside Ed
Registered: 2011-07-25
Posts: 4,749

Re: Session hanging on exiting window manager

It's probably because you disabled x11 common - that's not a display manager, but X helper functions.

Offline

#10 2012-05-23 00:28:42

s.hum
Member
Registered: 2011-12-05
Posts: 24

Re: Session hanging on exiting window manager

Ok... ps -aux showed

usr/bin/ck-launch-session /usr/bin/dbus-launch --exit-with-session /home/.../.xsession

.xsession containing the "exec ck-launch-session <wm>".. I presume that's ok (since stacking wm's didn't appear to be problematic).

Re-enabling x11 common did not appear to do anything either way.

Interestingly, if startx uses .xinitrc instead of .xsession to launch my wm's, the "/usr/bin/dbus-launch --exit-with-session" is missing from the ps -aux. Curious.

Guess I shouldn't be tiling, lol.

P.S. I'm running this same config on my netbook (yay #! +wheezy) and tiling managers do not appear to be a problem on that single display.. so I am guessing that the way tiling managers (i3 and notion, at least) integrate xinerama and xrandr may be the source of the problem for Xorg (not exiting cleanly?).. though strangely, when I reboot from these tiling wm's, the display seems to recover and the console shows messages as it shuts down.

If you have any other ideas, I'll keep testing! Thanks for all your guidance.

S

Last edited by s.hum (2012-05-23 01:26:44)

Offline

#11 2012-05-23 06:51:18

el_koraco
#!/loony/bun
From: inside Ed
Registered: 2011-07-25
Posts: 4,749

Re: Session hanging on exiting window manager

Try .xinitrc with

exec ck-launch-session dbus-launch --exit-wtih-session WM

Offline

#12 2012-05-24 00:17:04

pidsley
Window Mangler
Registered: 2012-05-23
Posts: 1,752

Re: Session hanging on exiting window manager

have you tried

sudo pkill X

to exit the WM (not the nicest way to kill X, but works sometimes)

Offline

#13 2012-05-25 12:18:35

s.hum
Member
Registered: 2011-12-05
Posts: 24

Re: Session hanging on exiting window manager

startx didn't like adding "dbus-launch..." to the .xinitrc exec statements at all - the wm failed to launch.

pkill was no different than exiting the wm normally - display hang for tiling managers persist upon exit.

Weird. Oh well, I've gotten so used to the cycling startx loop during this time that I probably won't go back to gdm anyway - as I rarely switch wm's and the script mechanism I have for doing so is less involved than interacting with gdm.

Last edited by s.hum (2012-05-25 12:19:07)

Offline

#14 2012-05-25 12:21:03

el_koraco
#!/loony/bun
From: inside Ed
Registered: 2011-07-25
Posts: 4,749

Re: Session hanging on exiting window manager

try .xsession with

exec ck-launch-session dbus-launch --exit-wtih-session WM

Offline

#15 2012-05-25 13:30:07

s.hum
Member
Registered: 2011-12-05
Posts: 24

Re: Session hanging on exiting window manager

Same results as .xinitrc - display hang after wm exit. Sorta weird that the startx loop restarts any wm fine, but w/o the loop, can't get back to the console and get hung.

Offline

#16 2012-05-25 13:50:45

el_koraco
#!/loony/bun
From: inside Ed
Registered: 2011-07-25
Posts: 4,749

Re: Session hanging on exiting window manager

Do what xaos says first.

Last edited by el_koraco (2012-05-25 15:17:39)

Offline

#17 2012-05-25 13:55:00

xaos52
The Good Doctor
From: Planet of the @s
Registered: 2011-06-24
Posts: 4,602

Re: Session hanging on exiting window manager

Try this http://crunchbanglinux.org/forums/post/183013/#p183013.
Adapt for your WM.
Remove ~/.xsession and ~/.xinitrc, but continue to use startx in stead of a login manager.

Offline

#18 2012-05-25 18:11:10

s.hum
Member
Registered: 2011-12-05
Posts: 24

Re: Session hanging on exiting window manager

Still no luck getting back to the console by bypassing .xinitrc and .xsession by using startx and the x-session-manager wm default.

Using startx in a loop and switching wm's within that loop, though remains rock solid.

Offline

#19 2012-06-01 21:24:46

s.hum
Member
Registered: 2011-12-05
Posts: 24

Re: Session hanging on exiting window manager

Hi All,

Just thought that I would report that the latest Wheezy updates would appear to have cleared up all the problems.. what ever it was between Xorg, tiling managers and multihead. Can now get back to the console.. though I'm sticking with the loop for now anyway as I've grown used to it for fast switching of wm's, lol.

Thanks again for all your support.

S

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo