You are not logged in.

#1 2017-09-26 07:34:50

ohnonot
...again
Registered: 2015-09-29
Posts: 5,022
Website

[Armbian/Ubuntu] xfce4-power-manager does not suspend

On my ARM laptop, I have installed Armbian which is ubuntu based, despite its name.
it ran the xfce desktop, and powermanaging was working.
i ditched all that for startx & openbox, but i'd like to keep on using the xfce4-power-manager.
it still performs "trivial" operations like screen locking and dimming, but does not suspend anymore.
i suspect a permission issue.
i can suspend manually with 'sudo systemctl suspend', but it does not lock the screen at the same time, so xfce4-power-manager must be using some different process.

i already added

/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1 &

(i think that's the same as on bunsenlabs?)
to autostart, but choosing the suspend option (e.g. on lid close) does exactly nothing (not even screen blanking).

any ideas what more i need to add?
there's quite a lot in /etx/xdg/autostart that isn't getting executed anymore...
also it seems the display manager (nodm) did some pam magic, which also isn't happening anymore...

Last edited by ohnonot (2017-09-26 07:35:28)


Search youtube without a brwoser: repo | thread
BL quote proposals to this thread please.
my repos / my repos

Offline

#2 2017-09-26 16:48:24

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: [Armbian/Ubuntu] xfce4-power-manager does not suspend

BunsenLabs starts the GNOME keyring in ~/.config/openbox/environment:

https://github.com/BunsenLabs/bunsen-co … onment#L12

Can we see the output of:

systemd-inhibit

How are you attempting to suspend when not using the command line?

there's quite a lot in /etx/xdg/autostart that isn't getting executed anymore...

I hate to go all Arch forums on you but can you please supply the relevant graphical session startup file(s) big_smile


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#3 2017-09-27 00:35:45

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 7,422
Website

Re: [Armbian/Ubuntu] xfce4-power-manager does not suspend

ohnonot wrote:

there's quite a lot in /etx/xdg/autostart that isn't getting executed anymore...

For i386 and amd64 architectures there are the commands

/usr/lib/x86_64-linux-gnu/openbox-xdg-autostart --list
# and
/usr/lib/i386-linux-gnu/openbox-xdg-autostart --list

which will show what apps are not being started, and why.
Maybe on an arm system (total guesswork here) if you look in /usr/lib/ you can identify the equivalent directory name to substitute...
Or check the filelist for the arm (armel or armhf?) build of openbox...


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

#4 2017-09-27 10:06:07

ohnonot
...again
Registered: 2015-09-29
Posts: 5,022
Website

Re: [Armbian/Ubuntu] xfce4-power-manager does not suspend

this place is indeed much more friendly & helpful than arch forums... big_smile
thanks for bearing with me so far.
i agree i should've supplied more info right from the start, but my inner reasoning was like:
"hmm, xfce power manager without xfce - bunsenlbs also does that, and is also debian based - probably a simple fix"
- turns out it isn't all that simple.

i will try to give a full account of where i'm at right now:

  • i disabled nodm. i do not exactly know what it is doing; there's the mentioned pam, but i'd like to leave that aside for now

  • away from nodm, away from xfce, back to startx; however i'm starting 'openbox', not 'openbox-session'. i've been doing that for a long time now and it's simpler to stick with that.

i noticed that the power manager doesn't work properly under armbian's xfce session, either! it's actually working better now:

  • it suspends properly on pressing the power or sleep button

  • it locks or simply switches off the screen on closing the lid

  • the only thing that doesn't work is suspend on lid close

  • the only other thing that doesn't work is the 'Ask' dialog, i'd like to have something there...

Here is the output of systemd-inhibit:

     Who: xfce4-power-manager (UID xxxx/xxxx, PID xxxx/xfce4-power-man)
    What: handle-power-key:handle-suspend-key:handle-hibernate-key:handle-lid-switch
     Why: xfce4-power-manager handles these events
    Mode: block

Who: NetworkManager (UID 0/root, PID 666/NetworkManager)
    What: sleep
     Why: NetworkManager needs to turn off networks
    Mode: delay

2 inhibitors listed.

Here are all the .desktop files from /etc/xdg/autostart and here's the output of /usr/lib/aarch64-linux-gnu/openbox-xdg-autostart --list:

[ ] Clipman
      File: /etc/xdg/autostart/xfce4-clipman-plugin-autostart.desktop
      Executes: xfce4-clipman
    * Excluded by: Hidden

[ ] ClipIt
      File: /etc/xdg/autostart/clipit-startup.desktop
      Executes: clipit
    * Excluded by: OnlyShowIn (GNOME, XFCE, LXDE, Unity)

[ ] Xfsettingsd
      File: /etc/xdg/autostart/xfsettingsd.desktop
      Executes: xfsettingsd
    * Excluded by: OnlyShowIn (XFCE)

[ ] Screensaver
      File: /etc/xdg/autostart/xscreensaver.desktop
      Executes: xscreensaver -no-splash
    * Excluded by: TryExec (xscreensaver)

[*] PulseAudio Sound System
      File: /etc/xdg/autostart/pulseaudio.desktop
      Executes: start-pulseaudio-x11

[ ] PolicyKit Authentication Agent
      File: /etc/xdg/autostart/polkit-gnome-authentication-agent-1.desktop
      Executes: /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1
    * Excluded by: OnlyShowIn (GNOME, XFCE, Unity)

[ ] SSH Key Agent
      File: /etc/xdg/autostart/gnome-keyring-ssh.desktop
      Executes: /usr/bin/gnome-keyring-daemon --start --components=ssh
    * Excluded by: OnlyShowIn (GNOME, Unity, MATE)

[ ] Certificate and Key Storage
      File: /etc/xdg/autostart/gnome-keyring-pkcs11.desktop
      Executes: /usr/bin/gnome-keyring-daemon --start --components=pkcs11
    * Excluded by: OnlyShowIn (GNOME, Unity, MATE)

[ ] GSettings Data Conversion
      File: /etc/xdg/autostart/gsettings-data-convert.desktop
      Executes: gsettings-data-convert
    * Excluded by: OnlyShowIn (GNOME, Unity)

[*] Power Manager
      File: /etc/xdg/autostart/xfce4-power-manager.desktop
      Executes: xfce4-power-manager

[ ] Secret Storage Service
      File: /etc/xdg/autostart/gnome-keyring-secrets.desktop
      Executes: /usr/bin/gnome-keyring-daemon --start --components=secrets
    * Excluded by: OnlyShowIn (GNOME, Unity, MATE)

[*] Network
      File: /etc/xdg/autostart/nm-applet.desktop
      Executes: nm-applet

[*] Blueman Applet
      File: /etc/xdg/autostart/blueman.desktop
      Executes: blueman-applet

But given my newest findings, I don't think this matters anymore...
Anyhow, starting 'openbox', not 'openbox-session', executes NONE of the above.

I have added (and make sure they work, i.e. environment variables are properly exported etc.) the following to my autostart routine:

export $(gnome-keyring-daemon --start --components=pkcs11,secrets) &
export XDG_CURRENT_DESKTOP=XFCE
# Stuff from /etc/xdg/autostart
/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1 &
gsettings-data-convert &
( sleep 5 ; xfce4-power-manager & ) &
( sleep 1 ; nm-applet & ) &

Last edited by ohnonot (2017-09-27 10:07:39)


Search youtube without a brwoser: repo | thread
BL quote proposals to this thread please.
my repos / my repos

Offline

#5 2017-09-27 17:14:36

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: [Armbian/Ubuntu] xfce4-power-manager does not suspend

ohnonot wrote:

i'm starting 'openbox', not 'openbox-session'. i've been doing that for a long time now and it's simpler to stick with that.

empty@Xanadu:~ $ cat $(which openbox-session)                                                      
#!/bin/sh

if test -n "$1"; then
    echo "Syntax: openbox-session"
    echo
    echo "See the openbox-session(1) manpage for help."
  exit
fi

# Clean up after GDM
xprop -root -remove _NET_NUMBER_OF_DESKTOPS \
      -remove _NET_DESKTOP_NAMES \
      -remove _NET_CURRENT_DESKTOP 2> /dev/null

# Set up the environment
A="/etc/xdg/openbox/environment"
test -r $A && . $A
A="${XDG_CONFIG_HOME:-"$HOME/.config"}/openbox/environment"
test -r $A && . $A

# Run Openbox, and have it run the autostart stuff
exec /usr/bin/openbox --startup "/usr/lib/openbox/openbox-autostart OPENBOX" "$@"
empty@Xanadu:~ $

wink


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#6 2017-09-28 06:19:18

ohnonot
...again
Registered: 2015-09-29
Posts: 5,022
Website

Re: [Armbian/Ubuntu] xfce4-power-manager does not suspend

^ i know what openbox-session is (doing). not much, if that's what you hinted at.

anyhow, my first post assumed that this problem stems from my change away from display manager and DE, but upon closer inspection it doesn't seem to be like that.

This askubuntu question is for 14.04, pre-systemd, and suggests installing 'pm-utils'. hasn't helped either, but through it i found that even the FAQ for this app suggests letting systemd handle these things.
i guess that's what i'll do next then, but i would consider it a workaround, not a solution :-(

next: the 'Ask' dialog seems unavailable when i'm not running the xfce DE, how to customize that. maybe more xfconf-query magic.

Last edited by ohnonot (2017-09-28 06:19:57)


Search youtube without a brwoser: repo | thread
BL quote proposals to this thread please.
my repos / my repos

Offline

#7 2017-09-29 11:18:31

ohnonot
...again
Registered: 2015-09-29
Posts: 5,022
Website

Re: [Armbian/Ubuntu] xfce4-power-manager does not suspend

in the end the (partial) solution was to use mate-power-manager instead. unsatisfying.
https://forum.armbian.com/index.php?/to … lid-close/


Search youtube without a brwoser: repo | thread
BL quote proposals to this thread please.
my repos / my repos

Offline

#8 2017-09-29 11:23:00

nicholasalipaz
Member
Registered: 2016-02-25
Posts: 50

Re: [Armbian/Ubuntu] xfce4-power-manager does not suspend

Just to clarify on Armbian being Ubuntu-based, that is an option but you can do it on Debian too. See the docs:
https://docs.armbian.com/

I compiled Armbian for a headless Debian Jessie that would run on arm, I use it on an ODroid XU4.

Offline

#9 2017-09-29 18:13:57

ohnonot
...again
Registered: 2015-09-29
Posts: 5,022
Website

Re: [Armbian/Ubuntu] xfce4-power-manager does not suspend

nicholasalipaz wrote:

I compiled Armbian

good for you.
i just used one of the prefabricated images... and i haven't seen a debian-based armbian for pinebook... :-(


Search youtube without a brwoser: repo | thread
BL quote proposals to this thread please.
my repos / my repos

Offline

Board footer

Powered by FluxBB