schuellerf / xfce-test

Docker/Xephyr environment for XFCE testing
MIT License
56 stars 15 forks source link

Power manager plugin doesn't run (segfault) #15

Closed JCGoran closed 3 years ago

JCGoran commented 5 years ago

I am unable to get the power manager plugin to work in the container. Running dmesg reveals that it segfaults somewhere, and running xfce4-power-manager --no-daemon gives the following output:

** (xfce4-power-manager:235): WARNING **: 21:55:16.933: 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:235): WARNING **: 21:55:16.933: 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:235): xfce4-power-manager-WARNING **: 21:55:16.934: Unable to connect to session manager : Failed to connect to the session manager: SESSION_MANAGER environment variable not defined
Xlib:  extension "DPMS" missing on display ":2".

(xfce4-power-manager:235): xfce4-power-manager-WARNING **: 21:55:16.935: Monitor is not DPMS capable

(xfce4-power-manager:235): GLib-GIO-CRITICAL **: 21:55:16.935: g_dbus_connection_signal_subscribe: assertion 'G_IS_DBUS_CONNECTION (connection)' failed

(xfce4-power-manager:235): libupower-glib-WARNING **: 21:55:16.992: Couldn't connect to proxy: Could not connect: No such file or directory

(xfce4-power-manager:235): GLib-GIO-CRITICAL **: 21:55:16.994: g_dbus_proxy_new_for_bus_sync: assertion 'g_variant_is_object_path (object_path)' failed

(xfce4-power-manager:235): xfce4-power-manager-CRITICAL **: 21:55:16.994: Error getting system bus connection : Could not connect: No such file or directory

(xfce4-power-manager:235): xfce4-power-manager-CRITICAL **: 21:55:16.995: xfpm_polkit_check_auth_intern: assertion 'polkit->priv->proxy != NULL' failed

(xfce4-power-manager:235): xfce4-power-manager-CRITICAL **: 21:55:16.995: xfpm_polkit_check_auth_intern: assertion 'polkit->priv->proxy != NULL' failed

(xfce4-power-manager:235): xfce4-power-manager-CRITICAL **: 21:55:16.995: xfpm_polkit_check_auth_intern: assertion 'polkit->priv->proxy != NULL' failed

(xfce4-power-manager:235): xfce4-power-manager-CRITICAL **: 21:55:16.995: xfpm_polkit_check_auth_intern: assertion 'polkit->priv->proxy != NULL' failed

(xfce4-power-manager:235): xfce4-power-manager-CRITICAL **: 21:55:16.995: Unable to connect to the system bus : Could not connect: No such file or directory

(xfce4-power-manager:235): xfce4-power-manager-WARNING **: 21:55:16.996: could not map keysym 1008ffa8 to keycode

(xfce4-power-manager:235): xfce4-power-manager-WARNING **: 21:55:16.996: Unable connect to system bus: Could not connect: No such file or directory

** (xfce4-power-manager:235): WARNING **: 21:55:16.996: No outputs have backlight property

** (xfce4-power-manager:235): WARNING **: 21:55:17.000: xfpm_brightness_helper_set_switch: failed to set value: Failed to execute child process “pkexec” (No such file or directory)

(xfce4-power-manager:235): xfce4-power-manager-WARNING **: 21:55:17.000: Unable to set the kernel brightness switch parameter to 0.

(xfce4-power-manager:235): xfce4-power-manager-CRITICAL **: 21:55:17.001: Unable to get system bus connection : Could not connect: No such file or directory

Any ideas what's causing this?

schuellerf commented 5 years ago

I also saw this already - it might be that upowerd (I think) is not properly available in the container? (System dbus not available?) But additionally the plug-in should not crash if a situation like this occurs...

JCGoran commented 5 years ago

After some time experimenting, I unfortunately didn't manage to run the power manager using this repo alone, however I did manage to make it work with x11docker by running x11docker schuellerf/xfce-test --init=systemd --sudouser --desktop startxfce4, installing upower and starting upower.service as root. This makes my laptop's battery fully transparent to the container, which I'm guessing is a security risk, but works nicely. Only thing I can't figure out is how to restart the already running instance of the power manager without crashing, seems to segfault when I call it with the --restart flag.

JCGoran commented 5 years ago

The --restart flag seems to works now, must've been doing something wrong before...still, not sure if I should close the issue as what I'm doing to run it is more of a workaround than a usable patch for the repo.

ochosi commented 3 years ago

It actually seems to work for me / now.

schuellerf commented 3 years ago

I just tested the power manager plugin again and also for me it seems to work. @JCGoran please check and reopen the issue, maybe with some more debug output if it still does not work on your desk.

JCGoran commented 3 years ago

It seems to not segfault anymore on startup, but it won't display the battery info. However, the same error occurs as above when I try to restart it using xfce4-power-manager --no-daemon, without any other instances running.

I guess this can remain closed since it doesn't segfault anymore, but it's still somewhat annoying. I'm also attaching the debug log in case it's of any use.

P.S. maybe the upower package should be installed by default in the container to get the battery info? Or is libupower-glib-dev sufficient for that?

verbose.log

schuellerf commented 3 years ago

I created the followup #42