User avatar
clickykbd
Posts: 117
Joined: Wed Jun 06, 2012 2:21 am
Location: Austin, Texas
Contact: Website

lose ability to interact when closing X?

Wed Jul 04, 2012 12:01 pm

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.

???

User avatar
clickykbd
Posts: 117
Joined: Wed Jun 06, 2012 2:21 am
Location: Austin, Texas
Contact: Website

Re: lose ability to interact when closing X?

Wed Jul 04, 2012 12:09 pm

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?

User avatar
teh_orph
Posts: 346
Joined: Mon Jan 30, 2012 2:09 pm
Location: London
Contact: Website

Re: lose ability to interact when closing X?

Wed Jul 04, 2012 12:53 pm

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)

keithsuddick
Posts: 10
Joined: Sat May 12, 2012 10:14 pm

Re: lose ability to interact when closing X?

Wed Jul 04, 2012 1:37 pm

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

User avatar
grumpyoldgit
Posts: 1452
Joined: Thu Jan 05, 2012 12:20 pm

Re: lose ability to interact when closing X?

Wed Jul 04, 2012 1:44 pm

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.

keithsuddick
Posts: 10
Joined: Sat May 12, 2012 10:14 pm

Re: lose ability to interact when closing X?

Wed Jul 04, 2012 2:26 pm

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

User avatar
Burngate
Posts: 6013
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: lose ability to interact when closing X?

Wed Jul 04, 2012 4:17 pm

on Squeeze here
From x, logout leaves a blank screen, ping won't work. Reboot leaves blank screen but ping does work.

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5331
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: lose ability to interact when closing X?

Wed Jul 04, 2012 5:26 pm

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.

User avatar
alexeames
Forum Moderator
Forum Moderator
Posts: 2869
Joined: Sat Mar 03, 2012 11:57 am
Location: UK
Contact: Website

Re: lose ability to interact when closing X?

Wed Jul 04, 2012 7:12 pm

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.
Alex Eames RasPi.TV, RasP.iO

User avatar
clickykbd
Posts: 117
Joined: Wed Jun 06, 2012 2:21 am
Location: Austin, Texas
Contact: Website

Re: lose ability to interact when closing X?

Wed Jul 04, 2012 10:08 pm

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!

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: lose ability to interact when closing X?

Wed Jul 04, 2012 10:29 pm

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.
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

Binson
Posts: 8
Joined: Wed Jul 04, 2012 10:27 pm
Location: near Brussels, Belgium

Re: lose ability to interact when closing X?

Wed Jul 04, 2012 11:26 pm

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

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5331
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: lose ability to interact when closing X?

Wed Jul 04, 2012 11:36 pm

Binson wrote: I can confirm this blank screen behaviour in raspbian as well, after an upgrade .
an "rpi-update" or "apt-get upgrade" ?

Binson
Posts: 8
Joined: Wed Jul 04, 2012 10:27 pm
Location: near Brussels, Belgium

Re: lose ability to interact when closing X?

Thu Jul 05, 2012 2:35 am

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
=

keithsuddick
Posts: 10
Joined: Sat May 12, 2012 10:14 pm

Re: lose ability to interact when closing X?

Thu Jul 05, 2012 12:37 pm

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

User avatar
clickykbd
Posts: 117
Joined: Wed Jun 06, 2012 2:21 am
Location: Austin, Texas
Contact: Website

Re: lose ability to interact when closing X?

Thu Jul 05, 2012 1:24 pm

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.

keithsuddick
Posts: 10
Joined: Sat May 12, 2012 10:14 pm

Re: lose ability to interact when closing X?

Thu Jul 05, 2012 2:15 pm

@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

User avatar
clickykbd
Posts: 117
Joined: Wed Jun 06, 2012 2:21 am
Location: Austin, Texas
Contact: Website

Re: lose ability to interact when closing X?

Thu Jul 05, 2012 2:19 pm

@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)

User avatar
piglet
Posts: 909
Joined: Sat Aug 27, 2011 1:16 pm

Re: lose ability to interact when closing X?

Thu Jul 05, 2012 2:40 pm

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?

keithsuddick
Posts: 10
Joined: Sat May 12, 2012 10:14 pm

Re: lose ability to interact when closing X?

Thu Jul 05, 2012 3:39 pm

@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

User avatar
piglet
Posts: 909
Joined: Sat Aug 27, 2011 1:16 pm

Re: lose ability to interact when closing X?

Thu Jul 05, 2012 3:46 pm

Will do. Thanks.

User avatar
clickykbd
Posts: 117
Joined: Wed Jun 06, 2012 2:21 am
Location: Austin, Texas
Contact: Website

Re: lose ability to interact when closing X?

Fri Jul 06, 2012 9:27 am

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.

User avatar
jojopi
Posts: 3085
Joined: Tue Oct 11, 2011 8:38 pm

Re: lose ability to interact when closing X?

Fri Jul 06, 2012 10:13 pm

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.)

User avatar
extravagoose
Posts: 59
Joined: Tue May 29, 2012 2:51 pm
Location: UK
Contact: Website

Re: lose ability to interact when closing X?

Fri Jul 06, 2012 10:45 pm

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). :(
RPi 1: Hostname: Gimli, 500Gb USB HDD, ArchLinux | ARM.
Main Use: Bit of everything - but mainly web server, Network Storage and C programming.

RPi 2: Hostname tba, awaiting delivery.

User avatar
clickykbd
Posts: 117
Joined: Wed Jun 06, 2012 2:21 am
Location: Austin, Texas
Contact: Website

Re: lose ability to interact when closing X?

Sat Jul 07, 2012 2:49 am

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.

Return to “General discussion”