Power to the (xfce4-)manager!

Forum rules
We don't support installations in VirtualBox, VMWare, qemu or others. We ignore posts about WINE, PlayOnLinux, Steam and Skype. We don't support btrfs, lvm, UEFI, side-by-side installations with GPT or dualboot with anything newer than Windows XP.
Google your problem first. Check the Wiki. Read the existing threads. It's okay to "hijack" an existing thread, yes! If your problem is not yet covered, open a new thread. To get the quickest possible help, mention the exact release codename in your post (uname -a is a good idea, too). Due to the lack of crystal balls, attach the output of lspci -nnk if you encounter hardware problems.
User avatar
GergoE
Virgin
Posts: 7
Joined: Tue Jan 28, 2014 7:17 pm

Power to the (xfce4-)manager!

Unread post by GergoE » Fri Feb 07, 2014 9:16 pm

Hello to all the Big Old Ones! Please don't be mad if my question is a too noobish one -- I swear I tried that forum first but they do not accept new registrations.

Well, I installed Pony Muncher (great work! etc...) on my ThinkPad SL400 and after one week I'm still having two problems. (I guess I'm expected to open another thread for the other one.) I'd have liked to trust energy management to the xfce4-power-manager as I always do, this worked well in my previous distros. As this line of laptops is known to have problems waking up from hibernation, some distros had this option dimmed out, on others I simply remembered to choose Suspend instead.

Now in bbq the xfce-PM got installed with almost all options missing, on lid close I could only choose "Do nothing/Lock screen" but neither Sustend nor Hibernate. Something else manages this under the hood and does it badly -- on laptop lid open I see a console demanding logon (and reverting to the US keyboard for that. My real login screen, the nice one belonging to Slim, certainly knows to use my national keybord). If I log in, I'm left with a crippled system, most applications work (some like the Feh background do not) but regular shutdown is impossible, I get the message

Code: Select all

shutdown: timeout opening/writing control channel /run/initctl

and the power button is insensitive, so I have to shutdown with removing the battery.

What I already tried after googling the problem: I added "HandleLidSwitch=ignore" to /etc/systemd/logind.conf, it made thing even worse -- on lid close only the screen darkened but the machine stayed awake.

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: Power to the (xfce4-)manager!

Unread post by machinebacon » Fri Feb 07, 2014 10:06 pm

hello

you should probably install xfce-pm with --yes-install-recommends, and make sure upower is installed and the polkit allows for per-user basis. (/usr/share/polkit-1 folder)
also you can install 'hibernation' from the repos.

typing this on my phone, but this should give you something to look at. will update later.

welcome to the grill
..gnutella..

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: Power to the (xfce4-)manager!

Unread post by machinebacon » Fri Feb 07, 2014 10:08 pm

by the way, you need xfce4-session for the 'greyed out ' things to appear, and xfce4-session should be started via autostart (if you don't go the crunchbang way with gnome-polkit )
..gnutella..

User avatar
wuxmedia
Grasshopper
Posts: 6454
Joined: Wed Oct 17, 2012 11:32 am
Location: Back in Blighty
Contact:

Re: Power to the (xfce4-)manager!

Unread post by wuxmedia » Fri Feb 07, 2014 10:22 pm

^ that's why you are the grillmeister.
I thought it was because OP didn't have a DM, till I read the post properly.
Without DM - I got used to an aliased 'sudo pm-suspend'...
"Seek, and Ye shall find"
"Github | Chooons | Site"

User avatar
ivanovnegro
Minister of Truth
Posts: 5449
Joined: Wed Oct 17, 2012 11:12 pm

Re: Power to the (xfce4-)manager!

Unread post by ivanovnegro » Fri Feb 07, 2014 10:53 pm

That is what happens if you bloat up your system, not meaning it negatively here.
What Bacon says, install the power manager with its recommends to have it fully working without missing pieces.

LinuxBBQ by default disables apt's recommendations for a leaner system. ;)

User avatar
GergoE
Virgin
Posts: 7
Joined: Tue Jan 28, 2014 7:17 pm

Re: Power to the (xfce4-)manager!

Unread post by GergoE » Fri Feb 07, 2014 11:05 pm

machinebacon wrote:by the way, you need xfce4-session for the 'greyed out ' things to appear, and xfce4-session should be started via autostart

Thank you for your quick answer! Now my xfce4-power-manager is started by the Openbox startup file.

It seems I was erroneously thinking that the real problem is not to enable the xfce4-power-manager to handle the all energy stuff but to disable the (to me) unknown program that does all this for bbq installations without xfce4-PM?

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: Power to the (xfce4-)manager!

Unread post by machinebacon » Sat Feb 08, 2014 3:37 am

there is no energy stuff being managed in regular bbq installations, because of the bbq philosophy. see,if i add a certain mechanism, i automatically force the user to use something he probably doesnt like.
but by keeping the base clean the user will learn and see that certain features are either desktop dependent, or require dependencies to be fulfilled, or other things that differ a lean system from a bloated one.

be happy that you stumble across this problem or question, because solving it will teach you a lot about how certain mechanisms are connected to each other: display manager, session manager, policykit, upower / udisks, hibernation and suspend. and there is much more, thanks to dubious foundations trying to unify the Linux desktops.
..gnutella..

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: Power to the (xfce4-)manager!

Unread post by machinebacon » Sat Feb 08, 2014 11:24 am

Just seeing you are online, I add a little info:

Do you have a Crunchbang installation at hand? If yes, you can check the /etc/xdg/autostart folder to see what is started as root to make certain things, like network-manager and power-manager to work. IIRC it is now also in ~/.config/openbox/autostart (not sure)

I recommend trying the pm-utils and/or hibernate, these packages are in the repos and can be connected to an event (like lid close) or keypress.

Sorry that I cannot tell you much more about it, because I generally either shutdown or keep it turned on. systemd is quite quick at booting, so I don't bother.

Try with "hibernate", as root. And check its manpage. I think it will do what you want.
..gnutella..

User avatar
GergoE
Virgin
Posts: 7
Joined: Tue Jan 28, 2014 7:17 pm

Re: Power to the (xfce4-)manager!

Unread post by GergoE » Sat Feb 08, 2014 11:43 am

Oh yes -- thank you again! I had some understanding of the bbq philosophy beforehand and I found it very appealing, I really was not expecting WinBuntu 3.0 :) Still my knowledge may be too little for this... But I'm going to look at the way the other distros did this anyway. (My ~/.config/openbox/autostart is already modified according to the one I used in Crunchbang, and V-sido did this laptop power management part well, too.)

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: Power to the (xfce4-)manager!

Unread post by machinebacon » Sat Feb 08, 2014 12:06 pm

That's the file I meant yesterday night:

/usr/share/polkit-1/actions/org.freedesktop.upower.policy

change the <allow_any>no</allow_any> to ...yes..., do the same in /usr/share/polkit-1/actions/org.freedesktop.login1.policy

I think this is all you need. And of course enough swap/RAM for hibernation IIRC.
..gnutella..

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: Power to the (xfce4-)manager!

Unread post by machinebacon » Sat Feb 08, 2014 12:09 pm

One more thing,

I hope xfce4-power-manager is actually started after login (see autostart file)?
..gnutella..

User avatar
GergoE
Virgin
Posts: 7
Joined: Tue Jan 28, 2014 7:17 pm

Re: Power to the (xfce4-)manager!

Unread post by GergoE » Sat Feb 08, 2014 1:09 pm

machinebacon wrote: I hope xfce4-power-manager is actually started after login (see autostart file)?
Surely it is -- what I'm trying to set up is: login using Slim that lets me choose between two sessions, an Openbox (+ xfce panel) and a Fluxbox (with its own panel) one, after that .xinitrc sets the common things (cursor, keyboard map), then either ~/.openbox/startup or ~/.fluxbox/startup starts the "goodies".

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: Power to the (xfce4-)manager!

Unread post by machinebacon » Sat Feb 08, 2014 1:26 pm

What does sudo pm-suspend do? Or sudo systemctl hibernate? Did you try the hibernate package I mentioned before? Have you set up the polkit policies?
..gnutella..

User avatar
GergoE
Virgin
Posts: 7
Joined: Tue Jan 28, 2014 7:17 pm

Re: Power to the (xfce4-)manager!

Unread post by GergoE » Sat Feb 08, 2014 1:44 pm

machinebacon wrote:What does sudo pm-suspend do? Or sudo systemctl hibernate? Did you try the hibernate package I mentioned before? Have you set up the polkit policies?

sudo pm-suspend responds with "command not found" and sudo systemctl hibernate shuts down power instantly! It did not even wait for the password.

In the meantime I reinstalled the power manager (apparently I already had everything it recommends) and changed the upower.policy to allow_any yes, but nothing changed.

Sorry for being vague in the OP, I decidedly don't want hibernation (that is known to not work well on this line of ThinkPads) or screen locking ever, all I'd really like to use is "suspend".

But please do not bother with my problem anymore if it is too annoying for you! (I realize somehow I became a Troll in the process---God knows I've never been one, nor do I intend to be...)

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: Power to the (xfce4-)manager!

Unread post by machinebacon » Sat Feb 08, 2014 1:52 pm

Have you tried sudo systemctl suspend already?
(If yes, ignore: have you installed pm-utils for pm-suspend? )

Because it does work here on Pony Muncher which I installed for troubleshooting. There is no need for xfce4-* if you assign sudo systemctl suspend (or sudo /bin/systemctl suspend, which will need no sudo) to a keybind in .xbindkeysrc and give it an event in ACPI.
..gnutella..

User avatar
GergoE
Virgin
Posts: 7
Joined: Tue Jan 28, 2014 7:17 pm

Re: Power to the (xfce4-)manager!

Unread post by GergoE » Sat Feb 08, 2014 2:30 pm

Oh, I already thought I saw the light -- somehow I was missing the pm-utils package! Installed that, now the PM looks normal, I was able to choose Suspend all over its preferences.

But regretfully something still double-manages my power. Now sudo pm-suspend does the same as an actual lid close: an unwanted hibernation (?) and screen lock, then comes the login console, some lines of text that run too fast to read anything, then an incomplete system (that is unable to shut down nicely) is restored.

sudo systemctl suspend returns

Code: Select all

Failed to get D-Bus connection: Failed to connect to socket /run/systemd/private
: Connection refused

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: Power to the (xfce4-)manager!

Unread post by machinebacon » Sat Feb 08, 2014 3:11 pm

May I see the .xinitrc file?
..gnutella..

User avatar
GergoE
Virgin
Posts: 7
Joined: Tue Jan 28, 2014 7:17 pm

Re: Power to the (xfce4-)manager!

Unread post by GergoE » Sat Feb 08, 2014 3:58 pm

Wow, this is SOLVED!

Now that the xfce4-PM regained all its abilities after the installation of the missing pm-utils, I tried to disable the Mysterious System Thing by adding HandleLidSwitch=ignore to /etc/systemd/logind.conf once more. (This was the first thing I tried some days before but then the results were disastrous, the machine could not go to sleep mode at all.) Now everything works as expected.

But maybe I'm not the only dumb one -- I checked it in Synaptic again and the PM suggests udisks (besides its own plugins) and recommends consolekit, there's no mention of the pm-utils.

Thank you very much, Machinebacon, for all your patience! (Now that I became a Virgin -- which is something I can live with -- I think I'd better give you all some days' rest before mentioning my other problem :)

BTW, my .xinitrc (you still might spot some silly mistake in it):

Code: Select all

#!/bin/sh

xrdb -merge ~/.Xresources &
setxkbmap hu &
#hsetroot -fill /home/bbq/wall.png &
xsetroot -cursor_name left_ptr &

xset s off

# this actually launches Openbox
exec dbus-launch openbox-session
# exec dbus-launch startfluxbox

Post Reply