LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 06-05-2017, 04:28 PM   #1
BeniBela2
Member
 
Registered: Dec 2012
Posts: 52

Rep: Reputation: Disabled
Cannot shutdown - no active session


I cannot shutdown my laptop as user from the xfce GUI after the last Debian upgrade (I think that installed systemd), only as root by sudo shutdown now, or by pressing the hardware power button.

The main problem seems to be that there is no active session:
Code:
$ loginctl  list-sessions 
   SESSION        UID USER             SEAT             TTY             

0 sessions listed.

$ loginctl show-session
EnableWallMessages=no
NAutoVTs=6
KillUserProcesses=no
RebootToFirmwareSetup=no
IdleHint=yes
IdleSinceHint=0
IdleSinceHintMonotonic=0
DelayInhibited=sleep
InhibitDelayMaxUSec=5s
HandlePowerKey=poweroff
HandleSuspendKey=suspend
HandleHibernateKey=hibernate
HandleLidSwitch=suspend
HandleLidSwitchDocked=ignore
HoldoffTimeoutUSec=30s
IdleAction=ignore
IdleActionUSec=30min
PreparingForShutdown=no
PreparingForSleep=no
Docked=no
RemoveIPC=yes
RuntimeDirectorySize=410161152
InhibitorsMax=8192
NCurrentInhibitors=3
SessionsMax=8192
NCurrentSessions=0
UserTasksMax=10813
That session management had not worked since last year, so I had created a policykit file

Code:
$ cat /etc/polkit-1/localauthority/50-local.d/org.freedesktop.consolekit.pkla
[Shutdown New]
Identity=unix-user:*
Action=org.freedesktop.login1.power-off
ResultActive=yes
ResultInactive=yes
ResultActive=yes
which allowed me to power down with "shutdown now" even as non-root user and even though the GUI turn off button did not work.

But now that fails, too


Code:
$ shutdown now
Failed to set wall message, ignoring: Interactive authentication required.
Failed to power off system via logind: Interactive authentication required.
Failed to open /dev/initctl: Permission denied
Failed to talk to init daemon.

$ pkaction --verbose --action-id org.freedesktop.login1.power-off
org.freedesktop.login1.power-off:
  description:       Power off the system
  message:           Authentication is required for powering off the system.
  vendor:            The systemd Project
  vendor_url:        http://www.freedesktop.org/wiki/Software/systemd
  icon:              
  implicit any:      auth_admin_keep
  implicit inactive: auth_admin_keep
  implicit active:   yes
  annotation:        org.freedesktop.policykit.imply -> org.freedesktop.login1.set-wall-message
Does it need the rule as javascript now?

Code:
$ pkaction  --version
pkaction version 0.105
 
Old 06-05-2017, 09:57 PM   #2
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Try:

Code:
sudo shutdown -h now
Quote:
Does it need the rule as javascript now?
I honestly don't know:-

Are you running stable, Testing or Sid?

The Xfce Desktop requires an active ConsoleKit session to function properly.
http://docs.xfce.org/xfce/xfce4-session/advanced

Last edited by Ztcoracat; 06-05-2017 at 10:21 PM.
 
Old 06-06-2017, 08:48 AM   #3
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by BeniBela2 View Post
I cannot shutdown my laptop as user from the xfce GUI after the last Debian upgrade (I think that installed systemd), only as root by sudo shutdown now, or by pressing the hardware power button.
yeah XFCE4 is like that, you got to be root to do anything other then log out when running xfce4. if you got yourself on the sudo group then you should get your selections back to do everything if you are using that menu logout - shutdown - reboot etc...

me: i just hit the button, it is faster.
clues:
Code:
$ shutdown now
Failed to set wall message, ignoring: Interactive authentication required.
Not admin no proper authentication. so.. maybe..
Code:
  implicit any:      auth_admin_keep
  implicit inactive: auth_admin_keep
implicit any: if that has a user setting you can type in there that too may change it to anyone can.
auth_admin_keep means only ROOT aka sudo too, and keep it that way.
or maybe try setting this to NO
Code:
implicit active:   yes

Last edited by BW-userx; 06-06-2017 at 08:55 AM.
 
Old 06-06-2017, 02:38 PM   #4
BeniBela2
Member
 
Registered: Dec 2012
Posts: 52

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Ztcoracat View Post
Try:

Code:
sudo shutdown -h now
It does work with sudo anyways, but I want it without sudo

Quote:
Originally Posted by Ztcoracat View Post
I honestly don't know:-

Are you running stable, Testing or Sid?
The newest one

Should be Sid


Quote:
Originally Posted by Ztcoracat View Post
The Xfce Desktop requires an active ConsoleKit session to function properly.
http://docs.xfce.org/xfce/xfce4-session/advanced
> For properly registering the ConsoleKit session, you probably want to add --with-ck-launch with startxfce4


How do I set that? I do not run startxfce4 myself. Put

Code:
STARTUP="$STARTUP --with-ck-launch "
in /etc/X11/Xsession.d/55xfce4-session ?


Quote:
Originally Posted by BW-userx View Post
yeah XFCE4 is like that, you got to be root to do anything other then log out when running xfce4. if you got yourself on the sudo group then you should get your selections back to do everything if you are using that menu logout - shutdown - reboot etc...
But a desktop GUI should not need root to shutdown

Quote:
Originally Posted by BW-userx View Post
implicit any: if that has a user setting you can type in there that too may change it to anyone can.
auth_admin_keep means only ROOT aka sudo too, and keep it that way.
or maybe try setting this to NO
Code:
implicit active:   yes
It is just a output

I thought I set the value with the pkla file
 
Old 06-06-2017, 03:33 PM   #5
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by BeniBela2 View Post
It does work with sudo anyways, but I want it without sudo
The newest one

Should be Sid
> For properly registering the ConsoleKit session, you probably want to add --with-ck-launch with startxfce4

How do I set that? I do not run startxfce4 myself. Put

Code:
STARTUP="$STARTUP --with-ck-launch "
in /etc/X11/Xsession.d/55xfce4-session ?
But a desktop GUI should not need root to shutdown
It is just a output
I thought I set the value with the pkla file
on the command line, it is always going to be "sudo shutdown -h now" unless you are in root account. then you can type just "shutdown -h now".

yeah I didn't really look to see what file that was and it is systemD so I have no idea what they've done with that I no longer use it.

but in polkit rules you might be able to make or mod a file to give users in a group rights to shutdown.

xfce4 in that menu off the app bar select to logout - reboot- shutdown where it is grayed out, if one is not in the sudo group. that is what I was talking about.

like I said I can use that menu if I wanted to whenever I am in xfce4 but I don't use that anymore, I use the appbar/toolbar whatever it is called in fluxbox and that is it.

Code:
xfce4-panel --disable-wm-check --sm-client-disable  &
I just push my power button and it goes right into shutdown without any lag. as opposed to using a CLI or gui menu. that is why I just hit my button.

Last edited by BW-userx; 06-06-2017 at 03:36 PM.
 
Old 06-06-2017, 06:00 PM   #6
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Editing the /etc/X11/Xsession.d/55xfce4-session config file with STARTUP="$STARTUP --with-ck-launch might work. I'm not sure as I'm not running Sid.

That file is owned by root so be careful when you edit it and if it doesn't work upon a fresh reboot you can always undo what you've done.

***Make a copy of it before you begin.***

Quote:
But a desktop GUI should not need root to shutdown
Your right.

When you first boot up and your GUI and your log in to XFCE launches do you have the option to check a box to save the previous session?

Mine is checked and I don't have trouble shutting down as regular user.

Does another DE give you the same results?

Another idea is you may be missing pkg's from the upgrade.

Always be careful when you perform updates and check if the actions proposed by the package managing tools are in line with your wishes and expectations. (i.e. make sure that you do not remove a plethora of packages you need by blindly accepting the proposed action)

https://wiki.debian.org/DebianUnstable

Did you run apt-get upgrade <OR> apt-get dist-upgrade?
 
Old 06-06-2017, 08:57 PM   #7
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,314
Blog Entries: 28

Rep: Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137
It's a long shot, but you might take a look in the log files for anything related to shutdown errors. I'd focus on /var/log/messages and /var/log/syslog.

The easiest thing to to would be to attempt to shut down, then use the tail command to inspect the logs. This is a good introduction to tail.

I am running Sid and have not encountered any issues with shut down or reboot from the GUI (I have KDE and MATE installed and usually use KDE).

Last edited by frankbell; 06-06-2017 at 09:02 PM.
 
Old 06-07-2017, 06:01 AM   #8
BeniBela2
Member
 
Registered: Dec 2012
Posts: 52

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Ztcoracat View Post
Editing the /etc/X11/Xsession.d/55xfce4-session config file with STARTUP="$STARTUP --with-ck-launch might work. I'm not sure as I'm not running Sid.

That file is owned by root so be careful when you edit it and if it doesn't work upon a fresh reboot you can always undo what you've done.
oh my, that was a bad idea.

It broke the login.

XFCE goes to the username/password dialog and does not continue from there, till I reverted the file to backuped version.


Quote:
Originally Posted by Ztcoracat View Post

When you first boot up and your GUI and your log in to XFCE launches do you have the option to check a box to save the previous session?

Mine is checked and I don't have trouble shutting down as regular user.
I have set it to auto-login.

When it works, it boots to the desktop without asking for any password.


Quote:
Originally Posted by Ztcoracat View Post
Did you run apt-get upgrade <OR> apt-get dist-upgrade?
dist-upgrade


Quote:
Originally Posted by frankbell View Post
It's a long shot, but you might take a look in the log files for anything related to shutdown errors. I'd focus on /var/log/messages and /var/log/syslog.


Well,

Code:
Jun  7 00:53:33 localhost slim[1034]: (pam_mount.c:743): pam_mount execution complete
Jun  7 00:53:33 localhost slim[1034]: (pam_mount.c:116): Clean global config (0)
Jun  7 00:53:33 localhost org.gtk.vfs.Daemon[1514]: A connection to the bus can't be made
Jun  7 00:53:33 localhost udev-acl.ck[22880]: g_slice_set_config: assertion 'sys_page_size == 0' failed
Jun  7 00:53:33 localhost console-kit-daemon[1535]: missing action
Jun  7 00:53:33 localhost org.gtk.vfs.Daemon[1514]: A connection to the bus can't be made
Jun  7 00:53:37 localhost slim[1034]: (II) Server terminated successfully (0). Closing log file.
Jun  7 00:53:37 localhost udev-acl.ck[22886]: g_slice_set_config: assertion 'sys_page_size == 0' failed
Jun  7 00:53:38 localhost slim[1034]: slim: opening a new Log file, while another is already open
Jun  7 00:53:38 localhost slim[1034]: /usr/bin/X11/xauth:  file /var/run/slim.auth does not exist
Jun  7 00:53:38 localhost slim[1034]: X.Org X Server 1.19.3
Jun  7 00:53:38 localhost slim[1034]: Release Date: 2017-03-15
Jun  7 00:53:38 localhost slim[1034]: X Protocol Version 11, Revision 0
Jun  7 00:53:38 localhost slim[1034]: Build Operating System: Linux 3.16.0-4-amd64 x86_64 Debian
Jun  7 00:53:38 localhost slim[1034]: Current Operating System: Linux hostname 4.9.0-3-amd64 #1 SMP Debian 4.9.25-1 (2017-05-02) x86_64
Jun  7 00:53:38 localhost slim[1034]: Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.9.0-3-amd64 root=UUID=2a92e38c-8ac9-43d2-a86f-2adad23b35a7 ro quiet
Jun  7 00:53:38 localhost slim[1034]: Build Date: 15 March 2017  09:21:41PM
Jun  7 00:53:38 localhost slim[1034]: xorg-server 2:1.19.3-1 (https://www.debian.org/support)
Jun  7 00:53:38 localhost slim[1034]: Current version of pixman: 0.34.0
Jun  7 00:53:38 localhost slim[1034]: #011Before reporting problems, check http://wiki.x.org
Jun  7 00:53:38 localhost slim[1034]: #011to make sure that you have the latest version.
Jun  7 00:53:38 localhost slim[1034]: Markers: (--) probed, (**) from config file, (==) default setting,
Jun  7 00:53:38 localhost slim[1034]: #011(++) from command line, (!!) notice, (II) informational,
Jun  7 00:53:38 localhost slim[1034]: #011(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
Jun  7 00:53:38 localhost slim[1034]: (==) Log file: "/var/log/Xorg.0.log", Time: Wed Jun  7 00:53:38 2017
Jun  7 00:53:38 localhost slim[1034]: (==) Using config file: "/etc/X11/xorg.conf"
Jun  7 00:53:38 localhost slim[1034]: (==) Using system config directory "/usr/share/X11/xorg.conf.d"
Jun  7 00:53:38 localhost acpid: client 1125[0:0] has disconnected
Jun  7 00:53:38 localhost acpid: client connected from 22889[0:0]
Jun  7 00:53:38 localhost acpid: 1 client rule loaded
Jun  7 00:53:38 localhost udev-acl.ck[22892]: g_slice_set_config: assertion 'sys_page_size == 0' failed
Jun  7 00:53:40 localhost org.freedesktop.Tracker1[1514]: Received signal:15->'Terminated'
Jun  7 00:53:40 localhost org.freedesktop.Tracker1[1514]: OK
 
1 members found this post helpful.
Old 06-07-2017, 01:18 PM   #9
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Make this change to the grub file:

Code:
GRUB_CMDLINE_LINUX_DEFAULT=quiet splash noapic irqpoll
Or try without irqpoll

http://devblog.alexsapps.com/2013/01...esnt-shut.html

http://www.linuxquestions.org/questi...755/page2.html
 
  


Reply

Tags
polkit, systemd, xfce



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] system failed to save session at shutdown, but retrieved changes after next shutdown - ?! newbiesforever Linux - General 5 06-09-2016 09:58 PM
SSH session not active Fed Linux - General 5 07-04-2013 02:13 AM
Apache - Tomcat How to use session ID to confirm an active user session? klroller Linux - Server 4 10-08-2009 09:43 PM
Remote into active session??? tiger.woods Linux - General 11 03-29-2006 06:16 AM
Active X session Sonte Linux - Newbie 1 03-06-2004 01:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 10:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration