Page 1 of 2

lose ability to interact when closing X?

Posted: Wed Jul 04, 2012 12:01 pm
by clickykbd
Okay this is a weird one, and first I've encountered it.
Latest firmware and wheezy just updated.

When I close X Windows (with logout method) I arrive to a black screen, can't change to any other console. I can still ping the pi on the network. But attempting a ssh login, I get username and password prompt... then it just hangs. Putty connection doesn't die, it just sits there and never gives me the terminal.

At a bit of a loss with this one. I will try it again with serial console later and see if I can trace any more info.

???

Re: lose ability to interact when closing X?

Posted: Wed Jul 04, 2012 12:09 pm
by clickykbd
er maybe I won't. checkfs failed on following boot.

Amusing aside, when you are dropped to the maintenance shell... it's expecting a root password, which we don't have on the pi?

Re: lose ability to interact when closing X?

Posted: Wed Jul 04, 2012 12:53 pm
by teh_orph
How do you run X? Is it from a console tty, some kind of background process or via ssh?
On arch, for debugging I use -keeptty to prevent X detaching from the tty and gdb and stuff. Try the option and see if it makes any difference for you!

(unlikely, but worth a shot)

Re: lose ability to interact when closing X?

Posted: Wed Jul 04, 2012 1:37 pm
by keithsuddick
clickykbd wrote: Latest firmware and wheezy just updated.

When I close X Windows (with logout method) I arrive to a black screen, can't change to any other console. ...
Same here, I did an apt-get upgrade and an rpi-update a few days agao and since then logging out of X just gives me a black screen. I can't check anything via any network connectivity as starting X kills my network.

Suds

Re: lose ability to interact when closing X?

Posted: Wed Jul 04, 2012 1:44 pm
by grumpyoldgit
Yup. Same here. The same thing happens if you are at a prompt and halt the system. Previously I got the system halted message so I knew when to unplug. Now I get the blank screen. I had thought it was an improvement but now realise from what is being said that it is more likely an indication of the system crashing.

Re: lose ability to interact when closing X?

Posted: Wed Jul 04, 2012 2:26 pm
by keithsuddick
grumpyoldgit wrote:Yup. Same here. The same thing happens if you are at a prompt and halt the system. Previously I got the system halted message so I knew when to unplug. Now I get the blank screen. I had thought it was an improvement but now realise from what is being said that it is more likely an indication of the system crashing.
I've just checked that on my RPi by doing a "shutdown -h now", previously I used to (eventually) get a system halted message, now I just get the black screen too.


Suds

Re: lose ability to interact when closing X?

Posted: Wed Jul 04, 2012 4:17 pm
by Burngate
on Squeeze here
From x, logout leaves a blank screen, ping won't work. Reboot leaves blank screen but ping does work.

Re: lose ability to interact when closing X?

Posted: Wed Jul 04, 2012 5:26 pm
by dom
grumpyoldgit wrote:Yup. Same here. The same thing happens if you are at a prompt and halt the system. Previously I got the system halted message so I knew when to unplug. Now I get the blank screen. I had thought it was an improvement but now realise from what is being said that it is more likely an indication of the system crashing.
No this is deliberate. A "sudo poweroff" (and probably halt) will now reset the board and sleep in bootcode.bin.
You will see the Network lights go off when it resets, and I flash OK 10 times in bootcode.bin to indicate where it is.
If the network lights are off, it is safe to power down.

The reason for this is the old "halt" state was actually quite a high power comsumption state. The new one should be much lower.

Now, what logoff does, I don't know. I wouldn't expect it to call poweroff/halt, so may be an unrelated issue.

Re: lose ability to interact when closing X?

Posted: Wed Jul 04, 2012 7:12 pm
by alexeames
dom wrote:The reason for this is the old "halt" state was actually quite a high power comsumption state. The new one should be much lower.

Now, what logoff does, I don't know. I wouldn't expect it to call poweroff/halt, so may be an unrelated issue.
I can confirm this works. It draws 0.12A @5V now when shutdown compared with 0.42A idling at cli.
Previously the current draw went up slightly on shutdown.

I also got the leaving x crash. Probably the best workaround is to start a terminal window in x and shutdown from that.

Re: lose ability to interact when closing X?

Posted: Wed Jul 04, 2012 10:08 pm
by clickykbd
Thanks for the news/confirmations.

Problem is. I wasn't trying to shutdown... I just wanted to leave X. Perhaps I'm expecting a "logout" behavior it wasn't gonna do anyway, but the crash was no bueno. Corrupted FS.

Until I hear otherwise I think I'll be killing X remotely from another shell instead. I'll look for the differences now with halt/poweroff/shutdown too. Thanks!

Re: lose ability to interact when closing X?

Posted: Wed Jul 04, 2012 10:29 pm
by Joe Schmoe
clickykbd wrote: Until I hear otherwise I think I'll be killing X remotely from another shell instead!
I usually switch back to the console from which I started X (Ctrl/Alt/F1), then hit ^C.

That nicely shuts down X.

Re: lose ability to interact when closing X?

Posted: Wed Jul 04, 2012 11:26 pm
by Binson
Hi all !

I can confirm this blank screen behaviour in raspbian as well, after an upgrade .

Thing is, we got two different things going on : the blank screen after poweroff from the console (and from a terminal window in X) and shutdown -h from the console, these do a clean shutdown of the filesystem, logout, powerdown, reboot from x logout button (and use of sudo shutdown from terminal in x) will hang the system, not shutting down the ethernet and not shutting down hdmi (this last is more of a guess on my part as it seems the backlight on the screen has gone) .

Poweroff should be documented somewhere as i was not aware of it . The other hang smells like a bug . As a Linux newbee i have no idea what next ...

Bye for now .

Binson
=
ps ctrl alt F1 then ctrl c works well thnks

Re: lose ability to interact when closing X?

Posted: Wed Jul 04, 2012 11:36 pm
by dom
Binson wrote: I can confirm this blank screen behaviour in raspbian as well, after an upgrade .
an "rpi-update" or "apt-get upgrade" ?

Re: lose ability to interact when closing X?

Posted: Thu Jul 05, 2012 2:35 am
by Binson
Hi all !

@Dom

Both actually, recently . But a bit more than a week ago i got the same behaviour, i just changed to a mirror ,i did an apt-get upgrade . The rpi-update was not that old then (but had the sd card update) ... But somehow i managed to break some other stuff and i decided to start all over again :)

Hope this helps .

Cheers

Binson
=

Re: lose ability to interact when closing X?

Posted: Thu Jul 05, 2012 12:37 pm
by keithsuddick
dom wrote:No this is deliberate. A "sudo poweroff" (and probably halt) will now reset the board and sleep in bootcode.bin.
I guess I don't understand the development methodology being used here, are such decisions discussed or announced anywhere before being rolled out?

Do we know if the black screen hang when logging out of X is related to this change - I'm one of the unlucky people who can't startx without losing my network, and having my keyboard and mouse work only sporadically, so to check the log files I have to close X first - now I can't even do that.


Suds

Re: lose ability to interact when closing X?

Posted: Thu Jul 05, 2012 1:24 pm
by clickykbd
keithsuddick wrote:so to check the log files I have to close X first - now I can't even do that.
Suds. Finding the right keyboard (aka happy/working) sorted many of the problems I was having that sound similar to yours.

Tips: X runs in a dedicated terminal... you can switch to other ones by holding Ctrl+Alt and mashing F# keys. This will let you get another console to view log files with. You can even force kill the X session if need be from there. If things are really unstable with your setup you might look into the serial-console via FTDI adapter/chip which should be the last thing to freeze up in theory.

Re: lose ability to interact when closing X?

Posted: Thu Jul 05, 2012 2:15 pm
by keithsuddick
@clickykbd - thanks for the suggestions, unfortunately my keyboard just doesn't seem to work in X so no mashing of the F# keys gets me another console. It's the second keyboard I've tried along with two mice, two powered hubs and two wi-fi dongles and the combination I have now seems to work fine at the command line, it just all fails when I start X. I've already spent £90 on this $35 computer and I really can't justify spending any more.

As it happens, in the last few minutes I've just done another rpi-update and now logging out of X gets me back to the command line - and as that is what this thread is about, I won't hijack it any further :-)

Suds

Re: lose ability to interact when closing X?

Posted: Thu Jul 05, 2012 2:19 pm
by clickykbd
@keithsuddick - Ohh! Will have to try logout again after another update. I didn't realize your keyboard was crapping out... thought it was just network woes within X. Carry on! (And good luck)

Re: lose ability to interact when closing X?

Posted: Thu Jul 05, 2012 2:40 pm
by piglet
Ahhh - I thought this was just me!

Surely "Shutdown" should umm.... shut down..... and "Logout" should just drop you from desktop to CLI?

Is there a particular reason for not letting the end user go back to the CLI?

Re: lose ability to interact when closing X?

Posted: Thu Jul 05, 2012 3:39 pm
by keithsuddick
@piglet - try another rpi-update, I did one just over an hour ago and now logout from X gets me back to the command line again.

Suds

Re: lose ability to interact when closing X?

Posted: Thu Jul 05, 2012 3:46 pm
by piglet
Will do. Thanks.

Re: lose ability to interact when closing X?

Posted: Fri Jul 06, 2012 9:27 am
by clickykbd
I am able to reproduce this logout crash (with FTDI serial attached) and captured this oops/trace:

http://pastebin.com/Tr7w4Ax1

I have latest updates and firmware (as of writing).

It doesn't do it every time. I'm not 100% sure but I seem to be able to reproduce it if the first thing I do is logout. Interestingly, I did it a couple times with /boot unmounted and it exited to console cleanly, but can't be sure that was the culprit of the instability.

Aside, a quick note for clarification. My initial impression this had corrupted a filesystem was false... I had entries in fstab pointing to non-present devices. It just happened to be the first time I saw the result.

Re: lose ability to interact when closing X?

Posted: Fri Jul 06, 2012 10:13 pm
by jojopi
dom wrote:A "sudo poweroff" (and probably halt) will now reset the board and sleep in bootcode.bin.
This is wrong behaviour. On any other linux platform, halt either turns off the power (implying that there is a button to turn it back on) or it halts in kernel. You can not turn off the power, so you should not pretend you can.

In the old firmware one can "sudo halt", wait for the halted message, then change the SD card and press Ctrl+Alt+Del to boot a different image. Now one has to explicitly "sudo shutdown -h -H" to avoid entering the futile state.

(I can not reproduce any problem when exiting X, however.)

Re: lose ability to interact when closing X?

Posted: Fri Jul 06, 2012 10:45 pm
by extravagoose
Interesting, glad I found this post. Am having exactly the same issues in Arch with LXDE. Despite doing a pacman -Syu and a reboot...

For me when I go to logout from LXDE, its as if my Pi stops responding altogether... cannot do anything, won't respond to logging in over SSH. The only way I can proceed is to pull the power cable... not something I like doing (esp. with a mounted HDD). :(

Re: lose ability to interact when closing X?

Posted: Sat Jul 07, 2012 2:49 am
by clickykbd
extravagoose wrote:when I go to logout from LXDE, its as if my Pi stops responding altogether... cannot do anything, won't respond to logging in over SSH
I expect you'll see the same kernel panic I am if you you are watching the serial console. But without serial it's really hard to know what just happened.