"Restart" logs out, even when there are no other people logged in

Bug #838792 reported by Jonathan Lange on 2011-09-01
410
This bug affects 82 people
Affects Status Importance Assigned to Milestone
Session Menu
Invalid
High
Ted Gould
Unity Foundations
High
Ted Gould
gnome-session (Ubuntu)
High
Unassigned

Bug Description

Trying to restart the computer from within a unity session causes the session to log out, instead of actually restarting the computer.

1. Boot up oneiric
2. Log in
3. Click on the Power button obscured by a tiny gear on the top and far right of the screen
4. Click "Shutdown..."
5. When asked, "Are you sure you want to close all programs and shut down the computer?", select "Restart" (it's on the bottom left of the dialog)

Instead of restarting, you will be logged out.

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: indicator-session 0.3.3.2-0ubuntu1
ProcVersionSignature: Ubuntu 3.0.0-9.15-generic 3.0.3
Uname: Linux 3.0.0-9-generic x86_64
Architecture: amd64
Date: Thu Sep 1 13:52:22 2011
EcryptfsInUse: Yes
ProcEnviron:
 PATH=(custom, user)
 LANG=en_AU.UTF-8
 SHELL=/bin/bash
SourcePackage: indicator-session
UpgradeStatus: Upgraded to oneiric on 2011-07-26 (37 days ago)

Jonathan Lange (jml) wrote :
Changed in indicator-session (Ubuntu):
status: New → Confirmed
Ted Gould (ted) on 2011-09-02
Changed in indicator-session:
status: New → Confirmed
assignee: nobody → Ted Gould (ted)
importance: Undecided → High
Changed in unity-foundations:
milestone: none → oneiric-beta-2
assignee: nobody → Ted Gould (ted)
status: New → Confirmed
importance: Undecided → High
Conor Curran (cjcurran) wrote :

I cannot reproduce this, restart is working fine ...

Conor Curran (cjcurran) on 2011-09-05
Changed in indicator-session:
milestone: none → 0.3.5
Vincent Ladeuil (vila) wrote :

I encountered a similar issue, randomly, on natty (so this bug may not have been introduced by oneiric). I've never been able to refine the diagnosis , sorry about that :-/

Nick Moffitt (nick-moffitt) wrote :

I've had this problem on my Thinkpad x200s in natty for as long as it's run Natty.

Brian Buchanan (nighthawk-uk) wrote :

After a clean re-install this problem only started after activating the NVIDIA proprietary drivers.
The latest updates seem to have fixed this problem for me as I can now successfully restart and shutdown.

Sebastien Bacher (seb128) wrote :

could you go to a vt and run "ck-list-sessions" after getting the issue and copy the log there?

Jonathan Lange (jml) wrote :

Done.

Session3:
 unix-user = '129'
 realname = 'RabbitMQ messaging server'
 seat = 'Seat1'
 session-type = ''
 active = FALSE
 x11-display = ''
 x11-display-device = ''
 display-device = '/dev/???'
 remote-host-name = ''
 is-local = TRUE
 on-since = '2011-09-07T15:36:19.140717Z'
 login-session-id = '4294967295'
Session11:
 unix-user = '134'
 realname = 'Light Display Manager'
 seat = 'Seat1'
 session-type = 'LoginWindow'
 active = FALSE
 x11-display = ':0'
 x11-display-device = '/dev/tty7'
 display-device = ''
 remote-host-name = ''
 is-local = TRUE
 on-since = '2011-09-07T16:42:07.207961Z'
 login-session-id = '4294967295'
Session12:
 unix-user = '1000'
 realname = 'Jonathan Lange'
 seat = 'Seat1'
 session-type = ''
 active = TRUE
 x11-display = ''
 x11-display-device = ''
 display-device = '/dev/tty1'
 remote-host-name = ''
 is-local = TRUE
 on-since = '2011-09-07T16:42:28.379523Z'
 login-session-id = '4294967295'

Jonathan Lange (jml) wrote :

On a hunch, I uninstalled rabbitmq-server and tried to restart. It succeeded. Does that mean the bug is here (and thus that indicator-session needs to be better at filtering?) or that it's in rabbitmq-server?

Sebastien Bacher (seb128) wrote :

it seems the issue would rather be in rabbitmq-server or consolekit, it should start an active local session this way

Jonathan Lange (jml) wrote :

Filed bug 845536.

Hello,

We're having a difficult time tracking this bug down, so we're at the
point of looking for more information. Yesterday we released a new
version of indicator-session that should be in your local archive soon.
It is version 0.3.5. If those who are effected by these bugs could
ensure that they have this version:

  $ apt-cache policy indicator-session

and then run this:

  $ /usr/lib/indicator-session/gtk-logout-helper --shutdown &>
gtk-logout.log

And then attach that log to this bug that'd be really helpful. Thanks a
lot! Hopefully we can nail this soon.

  --Ted

Here is my output. I executed the command, and my system did just log out instead of shutting down.

Looks like there are no indications on what went wrong in the log file.

I get a
  gnome-session[5722]: WARNING: Unable to stop system: Not Authorized
in my .xsession-errors file. Maybe this is related to #660120?

christopher@Xyz:~$ apt-cache policy indicator-session
indicator-session:
  Installed: 0.3.5.1-0ubuntu1
  Candidate: 0.3.5.1-0ubuntu1
  Version table:
 *** 0.3.5.1-0ubuntu1 0
        500 http://us.archive.ubuntu.com/ubuntu/ oneiric/main amd64 Packages
        100 /var/lib/dpkg/status

Running the second command given logs me out, even though it explicitly asks if I want to shut down, and then the gtk-logout.log file is completely blank when I log back in.

Trying to shutdown from the login screen doesn't do anything, as well.

Just a note to anyone looking for a workaround: sudo reboot and sudo shutdown now -P still seem to work perfectly fine for restart and shutdown, respectively, when run from a terminal.

This issue also occurs when clicking the "Restart Now..." button in Update Manager when prompted, as well.

I'm not completely sure, but it appeared like that I got the error fixed by means of reinstalling all gnome-keyring packages. I have the suspicion that the /etc/pam.d/common-* files might be created with the wrong contents. For those people which still have the bug, can you make a backup of /etc/pam.d and try a "sudo pam-auth-update --package"?

Ted Gould (ted) wrote :

I think that this is gnome-session working fine, I think there's some issue between gnome-session and the system overall. Switching the bug around to reflect that.

affects: indicator-session (Ubuntu) → gnome-session (Ubuntu)
Changed in unity-foundations:
status: Confirmed → Invalid
Changed in indicator-session:
status: Confirmed → Invalid
Mohit Mundhra (mundhra-mohit) wrote :

even i am getting a similar bug on a lenovo ideapad Z560 laptop. Whenever i click on shut down / restart, it just logs out and doesn't shut down / restart. i am using ubuntu 11.10 beta 2 version. Had installed it a couple of days back. I am able to hibernate.

Scott Abbey (malakhi) wrote :

I had the same bug, and in my case, I manually stopped the plexmediaserver (which I had manually installed) before trying to shutdown. This solved the problem. My guess is that there is a daemon process running as a user that gnome-session sees as being logged in. I'm not sure how gnome-session determines which user sessions are safe to terminate, but stopping this process let my machine shutdown and reboot normally.

I'm not really sure this is a bug with gnome-session so much as it is a bug with other packages starting daemons that show up as actual users.

Francis J. Lacoste (flacoste) wrote :

Bug 704139 might be another duplicate of this bug

rumpl (rumplstielz) wrote :

same here for me on oneiric - latest patches

raggar (mbaart) wrote :

I found a possible solution to this bug. It has something to do with the auto login function in the user management from Unity. When activated it cannot shutdown anymore. Also disable the auto login is not possible anymore.

What I did:
$sudo gedit /etc/lightdm/lightdm.conf

remove the line:
autologin-user= YOUR USERNAME

Restart your computer with:
$sudo shutdown -h now

After that I had a system that worked normally again.

Changed in gnome-session (Ubuntu):
importance: Undecided → Medium
Sandy Patterson (xandey) wrote :

I have the same problem as post #21

Killing the plexmediaserver allows me to shutdown/reboot as expected from the menu.

I tried changing autologin stuff, and it had no effect.

sudo reboot works as expected.

It seems that plexmediaserver is doing something funky with how it runs its server. I assume they have a bug, but perhaps installing a package should still allow ubuntu to reboot/shutdown?

I'm on oneiric fully patched.
plexmediaserver version: 0.9.5.2-7a18da4

Changed in gnome-session (Ubuntu):
importance: Medium → High
wizzor (visa-parviainen) wrote :

Could this be in any way related to fingerprint auth? I have that enabled from external repositories, which may change the behavior of PAM somehow (for example having two authentication sources available, rather than one)?

ck-list-sessions only reveals one active session, no autologin in lightdm.conf.

vasanth (getvasanth) wrote :

Solved:
I did a fresh install of Oneric.
when clicking on the shutdown or restart, It just logs me out. after uninstalling the hsqldb-server the restart and the shutdown works fine. But I don't have this issue on my laptop (Dell Vostro with ATI chipset ).

David Alfonso (david-alfonso) wrote :

I've been experiencing this issue since I changed my user password.

Solved:
Followed post #24 indications and now I can properly restart and shutdown.

David Alfonso (david-alfonso) wrote :

By the way, as I side effect I was not able to mount other disk partitions or removable media. Disabling auto login for my user solved both problems at once.

Michael Härtl (h-mh) wrote :

As this bug is still open i wonder, wether there is anything we can do to help fixing this. It's getting pretty annoying to shutdown "twice" each time.

I've never had automatic login enabled. so #24 isn't solving it for me.

the entire contents of my lightdm.conf is:

[SeatDefaults]
greeter-session=unity-greeter
user-session=ubuntu

I get logged out pretty much every time I request a shutdown/restart. It reminds me a lot of how fedora works where you log out first and then shut down from the greet menu. Maybe it's just a simple matter of changing the name of the button to "log-out" ;)

Ubuntu 11.10 (Oneiric) x86_64 3.0.0-16-generic
Laptop model: Dell-Studio-1747 (ati video card, using fglrx)

Jay S (topdownjimmy) wrote :

I've removed Tangerine from my Startup Applications, and the problem seems to have disappeared.

May be related to this bug: https://bugs.launchpad.net/ubuntu/+source/tangerine/+bug/455238

Bryan Hermsen (b-hermse) wrote :

I had this issue come up as well and found that Jonathan's solution in #8 worked for me. Disabling RabbitMQ fixed the issue and I was able to shut down normally.

Doug Winter (doug-isotoma) wrote :

I can confirm that I also had this issue and that uninstalling the rabbitmq-server package has resolved it.

Michael Härtl (h-mh) wrote :

I have this issue and don't have RabbitMQ installed. So must still be something else.

bruce (bruce-oy) wrote :

i encountered the same problem in ubuntu 10.04.4
maybe the following image can help you.
in the logout applet of cairo-dock ,only the option 'log out' and the option 'lock screen' is enabled, all other options are disabled.
but after a relogin, everything is enabled.

I am encountering this bug on Ubuntu 11.10 (oneiric) and would love to help diagnose/fix this issue. I'm not well versed in the parts of the system that are invoked when the "shutdown" button is selected, but can offer the following data points about my configuration:

* Running under VMWare Player 4.0.2 build 591240
* did not experience the issue after initial install and subsequent updates
* began experiencing the issue after installing Chef and its dependencies (via instructions at http://wiki.opscode.com/display/chef/Installing+Chef+Server+on+Debian+or+Ubuntu+using+Packages)
* noted that RabbitMQ is a key Chef dependency, and highlighted in other comments, so may be suspect
* wondered if it may be Lightdm/session related and affected by https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/933626 or similar

This seems like a fairly big haystack to me, but happy to post any debugging output that might be valuable.

Bob Friesenhahn (bfriesen) wrote :

I am also encountering this bug on Ubuntu 11.10 (oneiric). Originally I thought that it was some bug when updating packages but based on other comments here it is apparently random behavior. The system is rarely rebooted but the problem has been observed in perhaps 40% of the reboot cycles since the system was installed in late November.

% ck-list-sessions
Session4:
        unix-user = '1010'
        realname = 'Tina Friesenhahn'
        seat = 'Seat1'
        session-type = ''
        active = FALSE
        x11-display = ':0'
        x11-display-device = '/dev/tty7'
        display-device = ''
        remote-host-name = ''
        is-local = TRUE
        on-since = '2012-04-22T16:53:26.028970Z'
        login-session-id = '4294967295'
Session2:
        unix-user = '1010'
        realname = 'Tina Friesenhahn'
        seat = 'Seat1'
        session-type = ''
        active = TRUE
        x11-display = ':0'
        x11-display-device = '/dev/tty7'
        display-device = ''
        remote-host-name = ''
        is-local = TRUE
        on-since = '2012-04-22T16:52:56.922448Z'
        login-session-id = '4294967295'

% cat /etc/lightdm/lightdm.conf

[SeatDefaults]
greeter-session=unity-greeter
user-session=ubuntu

Roland (roland-breedveld) wrote :

Bug still exist in 11.04 LTS

Michael Härtl (h-mh) wrote :

For me it's gone since 12.04 (the release which Roland probably meant).

Ivan Zorin (iaz) wrote :

The same issue for me (logout instead shutdown in indicator-session) using Ubuntu 12.04 LTS (amd64) with latest updates on asus zenbook ux21e.
Additional information:
 - no autologin option in lightdm.conf
 - no rabbitmq-server package installed
so provided fixes above is useless for me.
Also no any extra installed software - such behavior is right out-of-the-box practically.

Ivan Zorin (iaz) wrote :

Hm, looks like this issue is not reproducible for me at 100% - successful shutdown just right now via indicator-session.

Aethralis (aethralis) wrote :

I have this issue on 12.04 (upgrade from 11.10). I can't shutdown or restart via cog menu (it simply directs to lightdm login screen). I have to do sudo reboot or sudo init 0

EdwinB (edwin-b) wrote :

Same issue here with 12.04. I can't shutdown unless - sudo init 0

Tried all sorts of stuff as suggested - so far no go.

Hopefully someone can figure this out.

EdwinB (edwin-b) wrote :

Is there a way to create a shortcut icon for the shutdown command - sudo init 0?

This way I don't have to keep typing it in.

Henning Moll (drscott) wrote :

same here on 12.04 64bit. No auto-login.

Trying to shutdown from a (one and only) Desktop session just logs out to lightdm. There "shutdown" leads to nothing. No reaction. There is no other "real" session running. The output of ck-list-sessions:

Session4:
 unix-user = '123'
 realname = 'Cloudera Manager'
 seat = 'Seat1'
 session-type = ''
 active = FALSE
 x11-display = ''
 x11-display-device = ''
 display-device = '/dev/???'
 remote-host-name = ''
 is-local = TRUE
 on-since = '2012-07-07T16:21:25.747608Z'
 login-session-id = '4294967295'
Session5:
 unix-user = '1000'
 realname = 'foobar'
 seat = 'Seat1'
 session-type = ''
 active = FALSE
 x11-display = ''
 x11-display-device = ''
 display-device = '/dev/tty1'
 remote-host-name = ''
 is-local = TRUE
 on-since = '2012-07-07T16:21:51.036134Z'
 login-session-id = '4294967295'
 idle-since-hint = '2012-07-07T16:25:22.841253Z'

The latter sessions of course exists only because i need to start a tty login to run the command. So normaly there is only this user "123". The processes of that user are just some server processes.

After shutting them down (and closing my tty session) i am able to shutdown the system.

In my case (and for those reporting other server processes) the problem seems to be, that ConsoleKit (ck-list-session) threats some user processes as active user. How to fix this?

Henning Moll (drscott) wrote :

The problem seems to come from init scripts that use "su". This is wrong. The start-stop-daemon system should be used instead. There is an interesting discussion starting here: https://bugs.launchpad.net/ubuntu/+source/gdm/+bug/395281/comments/15

SimonC (simoncoffey) wrote :

Just started encountering this problem. Trying to shutdown merely logs me out and then choosing shutdown does nothing. Opening a terminal session and using sudo poweroff works.

SimonC (simoncoffey) wrote :

OK so I found an errant daemon running in a separate session was the cause of my problems. I stopped the service starting automatically and problem solved.

Removing Tangerine worked here with Ubuntu 12.04

Thank you.

Margaret

> Date: Thu, 16 Aug 2012 13:51:11 +0000
> From: <email address hidden>
> To: <email address hidden>
> Subject: [Bug 838792] Re: "Restart" logs out, even when there are no other people logged in
>
> Removing Tangerine worked here with Ubuntu 12.04
>
> --
> You received this bug notification because you are subscribed to a
> duplicate bug report (995647).
> https://bugs.launchpad.net/bugs/838792
>
> Title:
> "Restart" logs out, even when there are no other people logged in
>
> Status in The Session Menu:
> Invalid
> Status in Unity Foundations:
> Invalid
> Status in “gnome-session” package in Ubuntu:
> Confirmed
>
> Bug description:
> Trying to restart the computer from within a unity session causes the
> session to log out, instead of actually restarting the computer.
>
> 1. Boot up oneiric
> 2. Log in
> 3. Click on the Power button obscured by a tiny gear on the top and far right of the screen
> 4. Click "Shutdown..."
> 5. When asked, "Are you sure you want to close all programs and shut down the computer?", select "Restart" (it's on the bottom left of the dialog)
>
> Instead of restarting, you will be logged out.
>
> ProblemType: Bug
> DistroRelease: Ubuntu 11.10
> Package: indicator-session 0.3.3.2-0ubuntu1
> ProcVersionSignature: Ubuntu 3.0.0-9.15-generic 3.0.3
> Uname: Linux 3.0.0-9-generic x86_64
> Architecture: amd64
> Date: Thu Sep 1 13:52:22 2011
> EcryptfsInUse: Yes
> ProcEnviron:
> PATH=(custom, user)
> LANG=en_AU.UTF-8
> SHELL=/bin/bash
> SourcePackage: indicator-session
> UpgradeStatus: Upgraded to oneiric on 2011-07-26 (37 days ago)
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/indicator-session/+bug/838792/+subscriptions

VolkerK (volkerpur) wrote :

+1 for Henning Moll (drscott) suspicion. I greped my /etc/init.d for services using 'su' and found in my case hsqldb-server. After deinstalling this service I was able to shutdown again.

Thanks a lot for this tip!

Volker

filip. (filip-vrlik) wrote :

Hello,

I just installed Ubuntu 12.04 LTS on my IBM T60p laptop and clicking on "shutdown" logs me out only and doesn't shutdown at all. Command <code>sudo shutdown -h now </code> works fine. What can I do?

I see a lot of suggestions here and at Askubuntu but I don't see clearly if it is for my case. This site send me here http://askubuntu.com/questions/96681/ubuntu-doesnt-seem-to-shut-down-unless-i-force-kill-it-suggestions?rq=1
It said that the bug is "closed", but I don't see the approved solution here. I'm not used to read bug logs though.

Is it connected to my video driver? I read that mentioned few times in forums.

I have had this error for a while now. Sometimes the terminal sessions don't seem to work after using the "shut down"-button.

I find it odd too, that pulseaudio doesn't seem to shut down successfully.
syslog shortly after failed shut down (and login again, because terminal session didn't work this time):
Sep 21 00:15:37 PC-Kristian-Linux pulseaudio[6999]: [pulseaudio] pid.c: Daemon already running.

None of the suggestions above worked for me. (still typing "sudo init 0")
12.04

Iskren Vichev (iskren-vichev) wrote :

Same with me Ubuntu 12.10. Following some updates Restart and Shut down from the graphic interface no longer work bringing up to the login screen. I have several graphic interfaces and they all fail - Unity, Gnome Shell, xfce and lxde. You go to the login screen when you select Power Off or Restart from the graphic menu. On the login screen these options do nothing. Terminal "sudo poweroff" and "sudo reboot" commands both work fine, but it is rather disturbing having to open a terminal and type my password each time I want to turn off or reboot my machine. None of the suggestions in this thread worked for me.

This issue seems to persist in Ubuntu for more than a year now. Anyone having any ideas how to fix it? I can't believe it doesn't bug you having to power off using the terminal every time. It should be noted that it worked initially on 12.10 and got broken only following an upgrade,

Hi,

Sounds like you are able to do more things. I do have anything. Can only get my home folder and get online by pressing F3 for home folder, then Help and click on 'Get Help Online' in order to get the web browser up so I can do things online. Otherwise I have nothing. Hope to Download Ubuntu when I have the time. That should fix my problem, I hope. Will let everyone know if I succeed.

Margaret

> Date: Sun, 25 Nov 2012 14:34:21 +0000
> From: <email address hidden>
> To: <email address hidden>
> Subject: [Bug 838792] Re: "Restart" logs out, even when there are no other people logged in
>
> Same with me Ubuntu 12.10. Following some updates Restart and Shut down
> from the graphic interface no longer work bringing up to the login
> screen. I have several graphic interfaces and they all fail - Unity,
> Gnome Shell, xfce and lxde. You go to the login screen when you select
> Power Off or Restart from the graphic menu. On the login screen these
> options do nothing. Terminal "sudo poweroff" and "sudo reboot" commands
> both work fine, but it is rather disturbing having to open a terminal
> and type my password each time I want to turn off or reboot my machine.
> None of the suggestions in this thread worked for me.
>
> This issue seems to persist in Ubuntu for more than a year now. Anyone
> having any ideas how to fix it? I can't believe it doesn't bug you
> having to power off using the terminal every time. It should be noted
> that it worked initially on 12.10 and got broken only following an
> upgrade,
>
> --
> You received this bug notification because you are subscribed to a
> duplicate bug report (995647).
> https://bugs.launchpad.net/bugs/838792
>
> Title:
> "Restart" logs out, even when there are no other people logged in
>
> Status in The Session Menu:
> Invalid
> Status in Unity Foundations:
> Invalid
> Status in “gnome-session” package in Ubuntu:
> Confirmed
>
> Bug description:
> Trying to restart the computer from within a unity session causes the
> session to log out, instead of actually restarting the computer.
>
> 1. Boot up oneiric
> 2. Log in
> 3. Click on the Power button obscured by a tiny gear on the top and far right of the screen
> 4. Click "Shutdown..."
> 5. When asked, "Are you sure you want to close all programs and shut down the computer?", select "Restart" (it's on the bottom left of the dialog)
>
> Instead of restarting, you will be logged out.
>
> ProblemType: Bug
> DistroRelease: Ubuntu 11.10
> Package: indicator-session 0.3.3.2-0ubuntu1
> ProcVersionSignature: Ubuntu 3.0.0-9.15-generic 3.0.3
> Uname: Linux 3.0.0-9-generic x86_64
> Architecture: amd64
> Date: Thu Sep 1 13:52:22 2011
> EcryptfsInUse: Yes
> ProcEnviron:
> PATH=(custom, user)
> LANG=en_AU.UTF-8
> SHELL=/bin/bash
> SourcePackage: indicator-session
> UpgradeStatus: Upgraded to oneiric on 2011-07-26 (37 days ago)
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/indicator-session/+bug/838792/+subscriptions

Nicolas Krzywinski (nsk7even) wrote :

+1 for #24 and #52 this solved the issue for me while leaving auto-login enabled

Did not tried to disable auto-login, so I don't know whether it would have solved it as well. But I doubt it, because for me, "freevo" was the culprit.

Pavel Kotrč (pkotrc) wrote :

Nicolas (#57): How can I check which services in /etc/init.d use 'su'?

12.04 32bit. I hadn't updated in two or three months and just downloaded them all so I think an update affected me. I've posted details and troubleshooting here:

http://askubuntu.com/questions/243630/shut-down-takes-me-to-greeter-now

Bruno Medeiros (brunojcm) wrote :

Reported the bug against HSQLDB Server: #1153856

James Ringer (james41382) wrote :

I am new to linux and I can see this is quite a long post as well as that it hasn't been added to in some time, but I am experiencing this problem myself and I wondered if anyone can help. It seems random, but sometimes the shutdown and restart operations from within the GUI (Unity?) seem to perform a "Lock Screen" operation instead. Most of the time I am able to shutdown or restart no problem and when this happens I simply force the restart from a shell, but I would like to correct the issue if possible.

Roderick Smith (rodsmith) wrote :

This bug has recurred with the 14.04 beta-2, as of April 3-4, 2014.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers