Xfce Forum

Sub domains
 

You are not logged in.

#1 2021-05-05 10:49:36

LividFruit
Member
Registered: 2021-05-05
Posts: 8

Power manager does not grab any keys when started via xdg autostart

I just installed Xfce on Arch and I can't get brightness keys to work properly. They do work as expected (change of brightness plus notification) when I start xfce4-power-manager from an interactive shell, but not when power manager is started via xdg autostart.

System info and logs:

System:    Kernel: 5.10.34-1-lts x86_64 bits: 64 Desktop: Xfce 4.16.0 Distro: Arch Linux
Machine:   Type: Laptop System: GOOGLE product: Edgar v: 1.0 serial: <filter>
           Mobo: GOOGLE model: Edgar v: 1.0 serial: <filter> UEFI: coreboot v: MrChromebox-4.12 date: 06/06/2020
Graphics:  Device-1: Intel Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Integrated Graphics driver: i915 v: kernel
           Device-2: Realtek HD WebCam type: USB driver: uvcvideo
           Display: server: X.Org 1.20.11 driver: loaded: intel unloaded: modesetting resolution: 1920x1080~60Hz
 
$ xfconf-query -c xfce4-power-manager -lv
/xfce4-power-manager/blank-on-battery                   3
/xfce4-power-manager/brightness-exponential             false
/xfce4-power-manager/brightness-on-battery              9
/xfce4-power-manager/brightness-switch                  0
/xfce4-power-manager/brightness-switch-restore-on-exit  -1
/xfce4-power-manager/critical-power-action              3
/xfce4-power-manager/dpms-on-battery-sleep              7
/xfce4-power-manager/general-notification               false
/xfce4-power-manager/handle-brightness-keys             true
/xfce4-power-manager/inactivity-on-battery              15
/xfce4-power-manager/inactivity-sleep-mode-on-battery   1
/xfce4-power-manager/lid-action-on-battery              1
/xfce4-power-manager/logind-handle-lid-switch           false
/xfce4-power-manager/power-button-action                3
/xfce4-power-manager/presentation-mode                  false
/xfce4-power-manager/show-panel-label                   0
/xfce4-power-manager/show-tray-icon                     false

In Session Manager, I disable the provided startup entry for power manager, and make a new one:

xfce4-power-manager --debug

Here's the output of xorg.log right after xfce is started:

X.Org X Server 1.20.11
X Protocol Version 11, Revision 0
Build Operating System: Linux Archlinux
Current Operating System: Linux <host> 5.10.34-1-lts #1 SMP Sun, 02 May 2021 12:41:09 +0000 x86_64
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-linux-lts root=UUID=2041b54b-a986-450d-be17-525a6bec0ac7 rw loglevel=3 quiet usbcore.autosuspend=120 resume=UUID=bb83e052-89a4-48f1-9b26-3c71741d0767
Build Date: 13 April 2021  03:12:10PM

Current version of pixman: 0.40.0
	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/home/<user>/.local/share/xorg/Xorg.0.log", Time: Wed May  5 11:24:58 2021
(==) Using config directory: "/etc/X11/xorg.conf.d"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
xf86EnableIOPorts: failed to set IOPL for I/O (Operation not permitted)
/usr/bin/startxfce4: X server already running on display :0
dbus-update-activation-environment: warning: error sending to systemd: org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.freedesktop.systemd1 exited with status 1
dbus-update-activation-environment: warning: error sending to systemd: org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.freedesktop.systemd1 exited with status 1
gpg-agent: a gpg-agent is already running - not starting a new one

(wrapper-2.0:2330): GLib-GIO-CRITICAL **: 11:25:02.242: g_file_new_for_path: assertion 'path != NULL' failed

(wrapper-2.0:2330): GLib-GIO-CRITICAL **: 11:25:02.242: g_file_monitor_file: assertion 'G_IS_FILE (file)' failed

(wrapper-2.0:2330): GLib-GObject-WARNING **: 11:25:02.242: invalid (NULL) pointer instance

(wrapper-2.0:2330): GLib-GObject-CRITICAL **: 11:25:02.242: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(wrapper-2.0:2330): Gtk-WARNING **: 11:25:02.242: Attempting to add a widget with type GtkToggleButton to a container of type XfcePanelPlugin, but the widget is already inside a container of type XfcePanelPlugin,please remove the widget from its existing container first.

** (xfdesktop:2323): WARNING **: 11:25:02.357: Thumbnailer failed calling GetFlavors

(wrapper-2.0:2330): Gtk-WARNING **: 11:25:02.475: Negative content width -1 (allocation 1, extents 1x1) while allocating gadget (node button, owner GtkToggleButton)

(wrapper-2.0:2331): Gtk-WARNING **: 11:25:02.669: Negative content width -1 (allocation 1, extents 1x1) while allocating gadget (node button, owner PowerManagerButton)

(wrapper-2.0:2324): Gtk-WARNING **: 11:25:02.904: Negative content width -1 (allocation 1, extents 1x1) while allocating gadget (node button, owner GtkToggleButton)

** (xfce4-power-manager:2350): WARNING **: 11:25:03.074: Failed to get name owner: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'org.freedesktop.PowerManagement': no such name


** (xfce4-power-manager:2350): WARNING **: 11:25:03.075: Failed to get name owner: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'org.xfce.PowerManager': no such name


(xfce4-power-manager:2350): GLib-GObject-WARNING **: 11:25:03.227: ../glib/gobject/gsignal.c:2614: signal 'Changed' is invalid for instance '0x5563a61af510' of type 'GDBusProxy'
TRACE[xfpm-main.c:210] xfpm_start(): Starting the power manager
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for lock-screen-suspend-hibernate
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for critical-power-level
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for show-brightness-popup
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for brightness-step-count
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for hibernate-button-action
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for sleep-button-action
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for battery-button-action
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for lid-action-on-ac
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for brightness-level-on-ac
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for brightness-level-on-battery
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for brightness-slider-min-level
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for dpms-enabled
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for dpms-on-ac-sleep
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for dpms-on-ac-off
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for dpms-on-battery-off
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for dpms-sleep-mode
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for inactivity-on-ac
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for inactivity-sleep-mode-on-ac
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for brightness-on-ac
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for logind-handle-power-key
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for logind-handle-suspend-key
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for logind-handle-hibernate-key
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for heartbeat-command
TRACE[xfpm-dpms.c:72] xfpm_dpms_set_timeouts(): Settings dpms: standby=600 suspend=0 off=900

TRACE[xfpm-polkit.c:284] xfpm_polkit_init_data(): Using unix session polkit subject
TRACE[xfpm-polkit.c:342] xfpm_polkit_check_auth_intern(): polkit request: (('unix-process', {'pid': <uint32 2350>, 'start-time': <uint64 207354>}), 'org.freedesktop.login1.power-off', @a{ss} {}, uint32 0, '')
TRACE[xfpm-polkit.c:363] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.login1.power-off is authorized=TRUE
TRACE[xfpm-polkit.c:342] xfpm_polkit_check_auth_intern(): polkit request: (('unix-process', {'pid': <uint32 2350>, 'start-time': <uint64 207354>}), 'org.freedesktop.login1.reboot', @a{ss} {}, uint32 0, '')
TRACE[xfpm-polkit.c:363] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.login1.reboot is authorized=TRUE
TRACE[xfpm-polkit.c:342] xfpm_polkit_check_auth_intern(): polkit request: (('unix-process', {'pid': <uint32 2350>, 'start-time': <uint64 207354>}), 'org.freedesktop.login1.suspend', @a{ss} {}, uint32 0, '')
TRACE[xfpm-polkit.c:363] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.login1.suspend is authorized=TRUE
TRACE[xfpm-polkit.c:342] xfpm_polkit_check_auth_intern(): polkit request: (('unix-process', {'pid': <uint32 2350>, 'start-time': <uint64 207354>}), 'org.freedesktop.login1.hibernate', @a{ss} {}, uint32 0, '')
TRACE[xfpm-polkit.c:363] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.login1.hibernate is authorized=TRUE
TRACE[xfpm-power.c:930] xfpm_power_get_power_devices(): Power device detected at : /org/freedesktop/UPower/devices/line_power_AC
TRACE[xfpm-power.c:889] xfpm_power_add_device(): 'line-power' device added
TRACE[xfpm-power.c:930] xfpm_power_get_power_devices(): Power device detected at : /org/f
(xfce4-power-manager:2350): xfce4-power-manager-WARNING **: 11:25:03.307: could not map keysym 1008ffa8 to keycode


(xfce4-power-manager:2350): xfce4-power-manager-WARNING **: 11:25:03.436: Unable to set the kernel brightness switch parameter to 0.

(xfce4-power-manager:2350): xfce4-power-manager-WARNING **: 11:25:03.443: Failed to get keyboard max brightness level : GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.UPower.KbdBacklight” on object at path /org/freedesktop/UPower/KbdBacklight

By now, the brightness keys don't work. I then quit power manager and start it from an interactive shell. As shown in the output, power manager successfully grabs the keys and the brightness keys do work:

$ xfce4-power-manager -q

(xfce4-power-manager:4007): xfce4-power-manager-WARNING **: 12:33:50.982: Unable to restore the kernel brightness switch parameter to its original value, still resetting the saved value.

(xfce4-power-manager:4007): Gtk-WARNING **: 12:33:50.987: A floating object was finalized. This means that someone
called g_object_unref() on an object that had only a floating
reference; the initial floating reference is not owned by anyone
and must be removed with g_object_ref_sink().

$ xfce4-power-manager --debug



** (xfce4-power-manager:4085): WARNING **: 12:43:49.253: Failed to get name owner: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'org.freedesktop.PowerManagement': no such name


** (xfce4-power-manager:4085): WARNING **: 12:43:49.254: Failed to get name owner: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'org.xfce.PowerManager': no such name


(xfce4-power-manager:4085): GLib-GObject-WARNING **: 12:43:49.375: ../glib/gobject/gsignal.c:2614: signal 'Changed' is invalid for instance '0x557d7e4ff500' of type 'GDBusProxy'
TRACE[xfpm-main.c:210] xfpm_start(): Starting the power manager
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for lock-screen-suspend-hibernate
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for critical-power-level
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for show-brightness-popup
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for brightness-step-count
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for hibernate-button-action
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for sleep-button-action
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for battery-button-action
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for lid-action-on-ac
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for brightness-level-on-ac
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for brightness-level-on-battery
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for brightness-slider-min-level
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for dpms-enabled
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for dpms-on-ac-sleep
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for dpms-on-ac-off
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for dpms-on-battery-off
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for dpms-sleep-mode
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for inactivity-on-ac
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for inactivity-sleep-mode-on-ac
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for brightness-on-ac
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for logind-handle-power-key
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for logind-handle-suspend-key
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for logind-handle-hibernate-key
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for heartbeat-command
TRACE[xfpm-polkit.c:284] xfpm_polkit_init_data(): Using unix session polkit subject
TRACE[xfpm-polkit.c:342] xfpm_polkit_check_auth_intern(): polkit request: (('unix-process', {'pid': <uint32 4085>, 'start-time': <uint64 680025>}), 'org.freedesktop.login1.power-off', @a{ss} {}, uint32 0, '')
TRACE[xfpm-polkit.c:363] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.login1.power-off is authorized=TRUE
TRACE[xfpm-polkit.c:342] xfpm_polkit_check_auth_intern(): polkit request: (('unix-process', {'pid': <uint32 4085>, 'start-time': <uint64 680025>}), 'org.freedesktop.login1.reboot', @a{ss} {}, uint32 0, '')
TRACE[xfpm-polkit.c:363] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.login1.reboot is authorized=TRUE
TRACE[xfpm-polkit.c:342] xfpm_polkit_check_auth_intern(): polkit request: (('unix-process', {'pid': <uint32 4085>, 'start-time': <uint64 680025>}), 'org.freedesktop.login1.suspend', @a{ss} {}, uint32 0, '')
TRACE[xfpm-polkit.c:363] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.login1.suspend is authorized=TRUE
TRACE[xfpm-polkit.c:342] xfpm_polkit_check_auth_intern(): polkit request: (('unix-process', {'pid': <uint32 4085>, 'start-time': <uint64 680025>}), 'org.freedesktop.login1.hibernate', @a{ss} {}, uint32 0, '')
TRACE[xfpm-polkit.c:363] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.login1.hibernate is authorized=TRUE
TRACE[xfpm-power.c:930] xfpm_power_get_power_devices(): Power device detected at : /org/freedesktop/UPower/devices/line_power_AC
TRACE[xfpm-power.c:889] xfpm_power_add_device(): 'line-power' device added
TRACE[xfpm-power.c:930] xfpm_power_get_power_devices(): Power device detected at : /org/freedesktop/UPower/devices/battery_BAT0
TRACE[xfpm-power.c:889] xfpm_power_add_device(): 'batte
(xfce4-power-manager:4085): xfce4-power-manager-WARNING **: 12:43:49.420: could not map keysym 1008ffa8 to keycode


(xfce4-power-manager:4085): xfce4-power-manager-WARNING **: 12:43:49.464: Unable to set the kernel brightness switch parameter to 0.

(xfce4-power-manager:4085): xfce4-power-manager-WARNING **: 12:43:49.472: Failed to get keyboard max brightness level : GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.UPower.KbdBacklight” on object at path /org/freedesktop/UPower/KbdBacklight

(xfce4-power-manager:4085): xfce4-power-manager-WARNING **: 12:43:58.006: Unable to restore the kernel brightness switch parameter to its original value, still resetting the saved value.

(xfce4-power-manager:4085): Gtk-WARNING **: 12:43:58.008: A floating object was finalized. This means that someone
called g_object_unref() on an object that had only a floating
reference; the initial floating reference is not owned by anyone
and must be removed with g_object_ref_sink().
ry' device added
TRACE[xfpm-power.c:898] xfpm_power_add_device(): Battery device type 'battery' detected at: /org/freedesktop/UPower/devices/battery_BAT0
TRACE[xfpm-button.c:180] xfpm_button_xevent_key(): Grabbed key 124 : ((XfpmButtonKey) BUTTON_POWER_OFF)
TRACE[xfpm-button.c:180] xfpm_button_xevent_key(): Grabbed key 213 : ((XfpmButtonKey) BUTTON_HIBERNATE)
TRACE[xfpm-button.c:180] xfpm_button_xevent_key(): Grabbed key 150 : ((XfpmButtonKey) BUTTON_SLEEP)
TRACE[xfpm-button.c:180] xfpm_button_xevent_key(): Grabbed key 73 : ((XfpmButtonKey) BUTTON_MON_BRIGHTNESS_UP)
TRACE[xfpm-button.c:180] xfpm_button_xevent_key(): Grabbed key 72 : ((XfpmButtonKey) BUTTON_MON_BRIGHTNESS_DOWN)
TRACE[xfpm-button.c:180] xfpm_button_xevent_key(): Grabbed key 244 : ((XfpmButtonKey) BUTTON_BATTERY)
TRACE[xfpm-button.c:180] xfpm_button_xevent_key(): Grabbed key 238 : ((XfpmButtonKey) BUTTON_KBD_BRIGHTNESS_UP)
TRACE[xfpm-button.c:180] xfpm_button_xevent_key(): Grabbed key 237 : ((XfpmButtonKey) BUTTON_KBD_BRIGHTNESS_DOWN)
TRACE[xfpm-power.c:210] xfpm_power_check_polkit_auth(): using logind suspend backend
TRACE[xfpm-polkit.c:342] xfpm_polkit_check_auth_intern(): polkit request: (('unix-process', {'pid': <uint32 4085>, 'start-time': <uint64 680025>}), 'org.freedesktop.login1.suspend', @a{ss} {}, uint32 0, '')
TRACE[xfpm-polkit.c:363] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.login1.suspend is authorized=TRUE
TRACE[xfpm-polkit.c:342] xfpm_polkit_check_auth_intern(): polkit request: (('unix-process', {'pid': <uint32 4085>, 'start-time': <uint64 680025>}), 'org.freedesktop.login1.hibernate', @a{ss} {}, uint32 0, '')
TRACE[xfpm-polkit.c:363] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.login1.hibernate is authorized=TRUE
TRACE[xfpm-power.c:1446] xfpm_update_blank_time(): Prev Timeout: 600 / New Timeout: 600
TRACE[xfpm-manager.c:645] xfpm_manager_inhibit_sleep_systemd(): Inhibiting systemd sleep: handle-power-key:handle-suspend-key:handle-hibernate-key:handle-lid-switch
TRACE[xfpm-backlight.c:262] xfpm_backlight_brightness_on_ac_settings_changed(): Alarm on ac timeout changed 9
TRACE[xfpm-backlight.c:283] xfpm_backlight_brightness_on_battery_settings_changed(): Alarm on battery timeout changed 9
TRACE[xfpm-button.c:114] xfpm_button_filter_x_events(): Key press: ((XfpmButtonKey) BUTTON_MON_BRIGHTNESS_DOWN)
TRACE[xfpm-backlight.c:185] xfpm_backlight_show(): Level 501
TRACE[xfpm-manager.c:365] xfpm_manager_button_pressed_cb(): Received button press event: ((XfpmButtonKey) BUTTON_MON_BRIGHTNESS_DOWN)
TRACE[xfpm-button.c:114] xfpm_button_filter_x_events(): Key press: ((XfpmButtonKey) BUTTON_MON_BRIGHTNESS_UP)
TRACE[xfpm-backlight.c:185] xfpm_backlight_show(): Level 593
TRACE[xfpm-manager.c:365] xfpm_manager_button_pressed_cb(): Received button press event: ((XfpmButtonKey) BUTTON_MON_BRIGHTNESS_UP)
TRACE[xfpm-main.c:68] xfpm_quit_signal(): sig 2
TRACE[xfpm-manager.c:937] xfpm_manager_stop(): Stopping
TRACE[xfpm-manager.c:262] xfpm_manager_quit(): Exiting
TRACE[xfpm-polkit.c:241] xfpm_polkit_free_data(): Destroying Polkit data

What kind of sorcery is this?!

Offline

#2 2021-05-05 11:05:21

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 7,751

Re: Power manager does not grab any keys when started via xdg autostart

LividFruit wrote:

What kind of sorcery is this?!

Sorcery for sure. This makes no sense...unless some sort of race condition?

As a first step, can you try clearing your sessions cache? Delete the contents of ~/.cache/sessions while not logged in.

Offline

#3 2021-05-05 11:17:20

LividFruit
Member
Registered: 2021-05-05
Posts: 8

Re: Power manager does not grab any keys when started via xdg autostart

Done, same results.

Offline

#4 2021-05-05 15:27:22

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 7,751

Re: Power manager does not grab any keys when started via xdg autostart

dbus-update-activation-environment: warning: error sending to systemd: org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.freedesktop.systemd1 exited with status 1
dbus-update-activation-environment: warning: error sending to systemd: org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.freedesktop.systemd1 exited with status 1

How do you log into Xfce?

Do you use a display manager? and if so, which one?
Do you use xinit/startx? If so, can you post your ~/.xinitrc file?

Last edited by ToZ (2021-05-05 15:28:59)

Offline

#5 2021-05-05 15:58:56

LividFruit
Member
Registered: 2021-05-05
Posts: 8

Re: Power manager does not grab any keys when started via xdg autostart

How do you log into Xfce?

Do you use a display manager? and if so, which one?
Do you use xinit/startx? If so, can you post your ~/.xinitrc file?

No display manager. startx is run when I log in and I've copied the default /etc/X11/xinit/xinitrc to my ~/.xinitrc (I followed this guide: https://wiki.archlinux.org/title/Xinit) and only added the last line:

#!/bin/sh

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

# merge in defaults and keymaps

if [ -f $sysresources ]; then







    xrdb -merge $sysresources

fi

if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

if [ -f "$userresources" ]; then







    xrdb -merge "$userresources"

fi

if [ -f "$usermodmap" ]; then
    xmodmap "$usermodmap"
fi

# start some nice programs

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
 for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
  [ -x "$f" ] && . "$f"
 done
 unset f
fi


exec startxfce4

And here's my ~/.xserverrc (also taken from the same guide mentioned above):

#!/bin/sh

exec /usr/bin/Xorg -nolisten tcp -nolisten local "$@" vt$XDG_VTNR

And startx is run from ~/.bash_profile :

startx -- -keeptty &> ~/.xorg.log

Last edited by LividFruit (2021-05-05 16:47:48)

Offline

#6 2021-05-05 17:39:26

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 7,751

Re: Power manager does not grab any keys when started via xdg autostart

I believe this is somehow related to the dbus-update-activation-environment error that you are getting.

Can you try renaming your ~/.xserverrc file and commenting out the "startx" command in ~/.bash_profile? Then reboot, log in and run "startx". See if that makes the dbus-update-activation-environment succeed. If so, you can try to narrow down the cause by re-enabling each of those one at a time.

Offline

#7 2021-05-05 18:47:15

LividFruit
Member
Registered: 2021-05-05
Posts: 8

Re: Power manager does not grab any keys when started via xdg autostart

That particular dbus-update-activation-environment message no longer appears, with or without my ~/.xserverrc...  I don't know if deleting ~/.cache/sessions/ once more had anything to do with that?? Anyway, without my ~/.xserverrc the xorg.log still looks pretty similar to the previous one:

X.Org X Server 1.20.11
X Protocol Version 11, Revision 0
Build Operating System: Linux Archlinux
Current Operating System: Linux davabook 5.10.34-1-lts #1 SMP Sun, 02 May 2021 12:41:09 +0000 x86_64
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-linux-lts root=UUID=2041b54b-a986-450d-be17-525a6bec0ac7 rw loglevel=3 quiet usbcore.autosuspend=120 resume=UUID=bb83e052-89a4-48f1-9b26-3c71741d0767
Build Date: 13 April 2021  03:12:10PM
 
Current version of pixman: 0.40.0
	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/home/dava/.local/share/xorg/Xorg.0.log", Time: Wed May  5 20:16:17 2021
(==) Using config directory: "/etc/X11/xorg.conf.d"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
xf86EnableIOPorts: failed to set IOPL for I/O (Operation not permitted)
/usr/bin/startxfce4: X server already running on display :0
gpg-agent: a gpg-agent is already running - not starting a new one

(xfce4-panel:2483): garcon-CRITICAL **: 20:16:19.915: garcon_gtk_menu_get_desktop_actions_menu: assertion 'actions != NULL' failed

(xfce4-panel:2483): garcon-CRITICAL **: 20:16:20.132: garcon_gtk_menu_get_desktop_actions_menu: assertion 'actions != NULL' failed

** (xfdesktop:2492): WARNING **: 20:16:20.273: Thumbnailer failed calling GetFlavors

** (xfce4-power-manager:2500): WARNING **: 20:16:20.666: Failed to get name owner: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: The name does not have an owner


** (xfce4-power-manager:2500): WARNING **: 20:16:20.667: Failed to get name owner: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: The name does not have an owner


(xfce4-power-manager:2500): libnotify-WARNING **: 20:16:20.721: Failed to connect to proxy

(xfce4-power-manager:2500): GLib-GObject-WARNING **: 20:16:20.761: ../glib/gobject/gsignal.c:2614: signal 'Changed' is invalid for instance '0x55b6c01adca0' of type 'GDBusProxy'
TRACE[xfpm-main.c:210] xfpm_start(): Starting the power manager
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for lock-screen-suspend-hibernate
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for critical-power-level
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for show-brightness-popup
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for brightness-step-count
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for hibernate-button-action
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for sleep-button-action
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for battery-button-action
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for lid-action-on-ac
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for brightness-level-on-ac
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for brightness-level-on-battery
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for brightness-slider-min-level
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for dpms-enabled
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for dpms-on-ac-sleep
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for dpms-on-ac-off
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for dpms-on-battery-off
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for dpms-sleep-mode
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for inactivity-on-ac
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for inactivity-sleep-mode-on-ac
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for brightness-on-ac
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for logind-handle-power-key
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for logind-handle-suspend-key
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for logind-handle-hibernate-key
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for heartbeat-command
TRACE[xfpm-dpms.c:72] xfpm_dpms_set_timeouts(): Settings dpms: standby=600 suspend=0 off=900

TRACE[xfpm-polkit.c:284] xfpm_polkit_init_data(): Using unix session polkit subject
TRACE[xfpm-polkit.c:342] xfpm_polkit_check_auth_intern(): polkit request: (('unix-process', {'pid': <uint32 2500>, 'start-time': <uint64 107845>}), 'org.freedesktop.login1.power-off', @a{ss} {}, uint32 0, '')
TRACE[xfpm-polkit.c:363] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.login1.power-off is authorized=TRUE
TRACE[xfpm-polkit.c:342] xfpm_polkit_check_auth_intern(): polkit request: (('unix-process', {'pid': <uint32 2500>, 'start-time': <uint64 107845>}), 'org.freedesktop.login1.reboot', @a{ss} {}, uint32 0, '')
TRACE[xfpm-polkit.c:363] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.login1.reboot is authorized=TRUE
TRACE[xfpm-polkit.c:342] xfpm_polkit_check_auth_intern(): polkit request: (('unix-process', {'pid': <uint32 2500>, 'start-time': <uint64 107845>}), 'org.freedesktop.login1.suspend', @a{ss} {}, uint32 0, '')
TRACE[xfpm-polkit.c:363] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.login1.suspend is authorized=TRUE
TRACE[xfpm-polkit.c:342] xfpm_polkit_check_auth_intern(): polkit request: (('unix-process', {'pid': <uint32 2500>, 'start-time': <uint64 107845>}), 'org.freedesktop.login1.hibernate', @a{ss} {}, uint32 0, '')
TRACE[xfpm-polkit.c:363] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.login1.hibernate is authorized=TRUE
TRACE[xfpm-power.c:930] xfpm_power_get_power_devices(): Power device detected at : /org/freedesktop/UPower/devices/line_power_AC
TRACE[xfpm-power.c:889] xfpm_power_add_device(): 'line-power' device added
TRACE[xfpm-power.c:930] xfpm_power_get_power_devices(): Power device detected at : /org/f
(xfce4-power-manager:2500): xfce4-power-manager-WARNING **: 20:16:20.815: could not map keysym 1008ffa8 to keycode


(xfce4-power-manager:2500): xfce4-power-manager-WARNING **: 20:16:20.870: Unable to set the kernel brightness switch parameter to 0.

(xfce4-power-manager:2500): xfce4-power-manager-WARNING **: 20:16:20.878: Failed to get keyboard max brightness level : GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.UPower.KbdBacklight” on object at path /org/freedesktop/UPower/KbdBacklight

(wrapper-2.0:2531): GLib-GIO-CRITICAL **: 20:16:21.653: g_file_new_for_path: assertion 'path != NULL' failed

(wrapper-2.0:2531): GLib-GIO-CRITICAL **: 20:16:21.653: g_file_monitor_file: assertion 'G_IS_FILE (file)' failed

(wrapper-2.0:2531): GLib-GObject-WARNING **: 20:16:21.653: invalid (NULL) pointer instance

(wrapper-2.0:2531): GLib-GObject-CRITICAL **: 20:16:21.653: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(wrapper-2.0:2531): Gtk-WARNING **: 20:16:21.653: Attempting to add a widget with type GtkToggleButton to a container of type XfcePanelPlugin, but the widget is already inside a container of type XfcePanelPlugin, please remove the widget from its existing container first.

(wrapper-2.0:2531): Gtk-WARNING **: 20:16:21.921: Negative content width -1 (allocation 1, extents 1x1) while allocating gadget (node button, owner GtkToggleButton)

(wrapper-2.0:2493): Gtk-WARNING **: 20:16:21.964: Negative content width -1 (allocation 1, extents 1x1) while allocating gadget (node button, owner GtkToggleButton)

(wrapper-2.0:2532): Gtk-WARNING **: 20:16:22.024: Negative content width -1 (allocation 1, extents 1x1) while allocating gadget (node button, owner PowerManagerButton)

Offline

#8 2021-05-06 18:14:39

LividFruit
Member
Registered: 2021-05-05
Posts: 8

Re: Power manager does not grab any keys when started via xdg autostart

ToZ wrote:

Sorcery for sure. This makes no sense...unless some sort of race condition?

By race condition, are you hinting at the abrupt end of the debugging messages when power manager is started via xdg autostart? Again, when I start power manager, all looks good here:

...
TRACE[xfpm-power.c:930] xfpm_power_get_power_devices(): Power device detected at : /org/freedesktop/UPower/devices/line_power_AC
TRACE[xfpm-power.c:889] xfpm_power_add_device(): 'line-power' device added
TRACE[xfpm-power.c:930] xfpm_power_get_power_devices(): Power device detected at : /org/freedesktop/UPower/devices/battery_BAT0
TRACE[xfpm-power.c:889] xfpm_power_add_device(): 'battery' device added
TRACE[xfpm-power.c:898] xfpm_power_add_device(): Battery device type 'battery' detected at: /org/freedesktop/UPower/devices/battery_BAT0
TRACE[xfpm-button.c:180] xfpm_button_xevent_key(): Grabbed key 124 : ((XfpmButtonKey) BUTTON_POWER_OFF)
...

but when it's started via xdg autostart the TRACE messages end abruptly at the middle of a string:

...
TRACE[xfpm-power.c:930] xfpm_power_get_power_devices(): Power device detected at : /org/freedesktop/UPower/devices/line_power_AC
TRACE[xfpm-power.c:889] xfpm_power_add_device(): 'line-power' device added
TRACE[xfpm-power.c:930] xfpm_power_get_power_devices(): Power device detected at : /org/freedeskt 
##NO MORE TRACE AFTER ABOVE MESSAGE
...

Then power manager continues to print (non-debug) warning messages as shown in my first post.

Last edited by LividFruit (2021-05-06 18:35:39)

Offline

#9 2021-05-06 20:51:37

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 7,751

Re: Power manager does not grab any keys when started via xdg autostart

To rule out a race condition, in your ~/.xinitrc file, put a "sleep 5" command before "startxfce4". Lets see if giving the system more time to perform startup routines helps.

This is definitely a strange one.

Offline

#10 2021-05-07 11:03:19

LividFruit
Member
Registered: 2021-05-05
Posts: 8

Re: Power manager does not grab any keys when started via xdg autostart

Ok done. Got the same output. I felt adventurous and grabbed the sources from the latest commit , built and installed but that didn't help. What next?

Offline

#11 2021-05-07 11:48:05

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 7,751

Re: Power manager does not grab any keys when started via xdg autostart

LividFruit wrote:

Ok done. Got the same output. I felt adventurous and grabbed the sources from the latest commit , built and installed but that didn't help. What next?

Sorry but I'm out of ideas. You can create a bug report here and see where it goes.

Offline

#12 2021-05-07 12:08:50

LividFruit
Member
Registered: 2021-05-05
Posts: 8

Re: Power manager does not grab any keys when started via xdg autostart

Will do, thanks anyway for your quick replies and suggestions!

Offline

#13 2021-05-11 14:47:40

LividFruit
Member
Registered: 2021-05-05
Posts: 8

Re: Power manager does not grab any keys when started via xdg autostart

Got help on xfce gitlab and now it works! smile

Offline

Board footer

Powered by FluxBB