You are not logged in.

#1 2012-11-05 11:35:08

poseidon
Member
Registered: 2012-06-07
Posts: 66

[SOLVED] Lid-close doesn't suspend anymore since last pacman -Syyu

Therefore I checked the Battery Monitor Settings in the taskbar (KDE as desktop environment):

In Energy Saving -> On Battery the selected item in "Suspend Session" is empty. Dropping down the drop box reveals, that suspend and hibernate are not offered anymore.

Is this issue connected with systemd somehow? What settings have to be altered (and wehere)?

Last edited by poseidon (2012-11-06 06:43:14)

Offline

#2 2012-11-05 11:49:10

illusionist
Member
From: localhost
Registered: 2012-04-03
Posts: 498

Re: [SOLVED] Lid-close doesn't suspend anymore since last pacman -Syyu

Sounds like a permission issue to me.
Did you remove consolekit ?
Can you suspend from command line ?
Post your '/etc/systemd/logind.conf' and any logs which look suspicious to you .


  Never argue with stupid people,They will drag you down to their level and then beat you with experience.--Mark Twain
@github

Offline

#3 2012-11-05 13:10:04

poseidon
Member
Registered: 2012-06-07
Posts: 66

Re: [SOLVED] Lid-close doesn't suspend anymore since last pacman -Syyu

/etc/systemd/logind.conf:

#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.
#
# See logind.conf(5) for details

[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#Controllers=
#ResetControllers=cpu
#InhibitDelayMaxSec=5
#HandlePowerKey=poweroff
#HandleSuspendKey=suspend
#HandleHibernateKey=hibernate
#HandleLidSwitch=suspend
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes

ConsolKit: "ConsoleKit replaced by logind" sounded to me as if it was removed automatically. Am I supposed to remove it manually and anyway? Shouldn't I check first whether systemd is used? How do I check that relieably (sorry for my ignorance)?

Suspend from command line: pm-suspend works as expected.

Offline

#4 2012-11-05 15:31:18

poseidon
Member
Registered: 2012-06-07
Posts: 66

Re: [SOLVED] Lid-close doesn't suspend anymore since last pacman -Syyu

Kust read https://bbs.archlinux.org/viewtopic.php?id=152186 and did /proc/1/comm. It says init. Guess I have to switch to systemd.

Offline

#5 2012-11-06 04:41:07

illusionist
Member
From: localhost
Registered: 2012-04-03
Posts: 498

Re: [SOLVED] Lid-close doesn't suspend anymore since last pacman -Syyu

Yes you do need to switch to systemd.
If you have not removed consolekit manually. You can see it listed in pacman -Qm
You may remove logind and use consolekit. But I won't advise you to do so. Going with systemd is your only option.


  Never argue with stupid people,They will drag you down to their level and then beat you with experience.--Mark Twain
@github

Offline

#6 2012-11-06 06:42:47

poseidon
Member
Registered: 2012-06-07
Posts: 66

Re: [SOLVED] Lid-close doesn't suspend anymore since last pacman -Syyu

Switched to systemd and suspend works again.

Thanks a lot!

Paul

Offline

#7 2012-11-06 10:53:47

kkoceski
Member
Registered: 2012-07-16
Posts: 11

Re: [SOLVED] Lid-close doesn't suspend anymore since last pacman -Syyu

I did a new install with the latest archlinux-2012.11.01-dual.iso. image.  This was on a Dell Latitude E6500 with 4GB Ram and 80GB Hard Drive.  I installed KDE.  When I go to "Leave", there is no Shutdown/Poweroff Option.  Also, when I Logout from KDE, then "halt" from the command prompt, the system halts, but does not power off.  This sounds like the right topic, but when I tried the following, it still does not work :

As bgc1954 said, there is also a symlink "/sbin/poweroff". Just edit the file "/usr/share/config/kdm/kdmrc", go to [shutdown] an replace the line "HaltCmd=/sbin/halt" with "HaltCmd=/sbin/poweroff".

Note that whereas "/usr/share/config/kdm/kdmrc" had the HaltCmd=... in it, it was commented out, and I did uncomment it.

I also found a bug report :

Description:

When switching to a full systemd installation, there is no more shutdown command

/usr/share/config/kdm/kdmrc should be fixed to contain this:
HaltCmd=/usr/bin/systemctl poweroff
RebootCmd=/usr/bin/systemctl reboot

However, this did not work either.

I assume I am using systemd, since this was install with the latest image.  After I did the install, I installed kde.  Then, to get to the DeskTop,
I added "exec startkde" to my .xinitrc file.  Then, I simply issue "startx".  I don't have any kind of Login Manager.

Thanks, Kurt

Offline

#8 2012-11-07 01:10:16

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,134

Re: [SOLVED] Lid-close doesn't suspend anymore since last pacman -Syyu

I have a feeling that I saw a discussion about this not working in KDE without a DM. The config file kdmrc is for KDM as far as I know so if you don't use KDM, I don't think the settings there will have any effect. I suspect that KDE's shutdown options for powering off and rebooting are provided by KDM so that if you don't use KDM (or some equivalent), you don't get that functionality. (But I'm not sure about this.) Changing kdmrc got those options working again for me after switching for systemd. That is, correcting the commands for KDM got the options working in KDE, suggesting that KDE relies on KDM to provide them.

Check that you have the symlinks installed (there's a compatibility package which sets them up) - I assume you do on a new installation.

Instead of using "halt" to shutdown, use "poweroff" or "systemctl poweroff". Halt isn't meant to poweroff under systemd, at least. (That's why you need the changes to kdmrc if you are using KDM - halt doesn't poweroff; poweroff should do; systemct poweroff definitely should.)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#9 2012-11-07 11:33:15

kkoceski
Member
Registered: 2012-07-16
Posts: 11

Re: [SOLVED] Lid-close doesn't suspend anymore since last pacman -Syyu

cfr : Thanks !  It's nice to know that there is, at least, some explanation.  I found last night that "poweroff" works.  So, I'm OK with that for now.  I just have to figure out why the "Poweroff" option is not presented to me from the KDE "button ?" ( the button that is in the Left-Bottom like the "Start" on the other OS that most people use ( including me, of course, at work ).

I will try "systemctl poweroff" tonight, just for completeness.

So, to shut down my laptop, I can either :
1) sudo "poweroff" from an xterm ( this works REAL fast )
2) KDE "button" to Leave to Logout ( this takes a LONG time - maybe 30 seconds )
   a) then issue "poweroff" from the big black screen

I'm not sure if the first option is OK, but I like it, since it is so fast.

In the past ( on another laptop with the non-systemd install ), I was able to KDE "button" to Leave to Poweroff.  And I'm not sure, but I think it was faster than the #2 option above ( but certainly not as fast as #1 ).

I also have to wrap my head around subtle aspects of KDE, DM, KDM, kdmrc.  I was thinking that a raw-install with only KDE most conformed to that "KISS" credo that Arch tries to adhere to.  And I take KISS to also imply more understanding of what's going on, leaving out some of the flamboyant GUI stuff that "hides" stuff from you.

In addition those "symlinks" need to be learned, but like you said, it probably is OK with this new-image-systemd install.

Thanks again, Kurt

Offline

#10 2012-11-08 01:59:40

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,134

Re: [SOLVED] Lid-close doesn't suspend anymore since last pacman -Syyu

You should not need sudo. systemctl poweroff should work without it. (Except maybe if more than one user is logged in or even if you are logged in twice - then I think it needs authorisation.)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#11 2012-11-08 11:52:21

kkoceski
Member
Registered: 2012-07-16
Posts: 11

Re: [SOLVED] Lid-close doesn't suspend anymore since last pacman -Syyu

I haven't gone through all the permutations of (root)_(user)_(user-with-sudo), but I can now say that "systemctl poweroff" does indeed work.  What I can't remember here at my desk is whether I stuck a sudo in front of that, but I was certainly user ( not root ).  I do remember that I GUI box popped up, asking me for the root password, so I'm guessing I left the sudo off.

I think that's good enough - just start using "poweroff" instead of "halt".

What I still don't like is that the KDE Applications Menu still does not present me with "Poweroff" option.  That seems to be the most elegant way to completely turn off the laptop.  But maybe I can't get there from here due to the lack of a login manager ( that "KDE, DM, KDM, kdmrc" confusion of mine ).  The way I have to turn off isn't real bad, because it keeps me in the "KISS" mode.  However, that may get old after I am more adept at all this, and I get tired of not being able to just hit the physical button and "arrow" to Poweroff and hit return.

Offline

#12 2012-11-08 16:43:19

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,134

Re: [SOLVED] Lid-close doesn't suspend anymore since last pacman -Syyu

I can confirm it works with KDM but that is probably scant comfort if you'd rather not use it.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#13 2012-11-08 18:17:08

kkoceski
Member
Registered: 2012-07-16
Posts: 11

Re: [SOLVED] Lid-close doesn't suspend anymore since last pacman -Syyu

I keep hoping there is something good and noble about being stubborn smile

Offline

Board footer

Powered by FluxBB