! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Laptop suspend fails with "GDBus.Error:org.freedesktop.DBus.Error.AccessDenie...
Status:
RESOLVED: MOVED
Product:
Xfce4-power-manager
Component:
General

Comments

Description Simon Dedman 2015-11-17 17:23:46 CET
Hi. With Xubuntu 15.10 (was same w/ 15.04) when suspend is initiated through inactivity, it fails with the quoted text: "GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Permission denied".

I've tried this [https://askubuntu.com/questions/627356/xubuntu-15-04-cannot-suspend-when-inactive] fix but it didn't help.
I suspect that this [https://bugs.launchpad.net/ubuntu/+source/xfce4-power-manager/+bug/1441460] is close but irrelevant?

Seems to fail the same when powered or on battery - I haven't noticed a difference in any case.

Any thoughts / guesses appreciated. When I come back to it and wiggle the mouse, hit the keyboard, or sometimes hit the power button, it comes back to the session login screen then returns with that failure warning. So I suspect it has been sitting there unsuspended but with the screen off.

edit: just noticed I'm using v1.4.4-4ubuntu (per software manager); given we're not on 1.5.2 is there a reason why this hasn't been upgraded as part of xubuntu 15.10? Cheers.
Comment 1 Simon Dedman 2016-08-16 04:06:43 CEST
This is still an issue in v.1.6.0
Comment 2 np1 2016-11-21 04:01:13 CET
I had this exact error in Xubuntu 16.04 and fixed it with this solution:

http://askubuntu.com/a/851760/83302
Comment 3 fernandsaussure 2017-02-22 22:47:36 CET
The fix in the link (http://askubuntu.com/a/851760/83302) worked for me as well on Xubuntu 16.04. Incidentally, someone on the Ubuntu-devel-discuss mailing list reported what I think is the same bug and workaround and suggested a more permanent fix: https://lists.ubuntu.com/archives/ubuntu-devel-discuss/2016-July/016779.html.
Comment 4 Erik Kessler 2017-08-27 00:33:30 CEST
The error message "GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Permission denied" is unrelated to inactivity sleep not working. It is caused by a separate bug.

Bug: NetworkManager.Sleep access denied

The access denied error is caused by xfce4-power-manager attempting to call org.freedesktop.NetworkManager.Sleep, but access is denied by Network Manager's polkit policy. This bug could be fixed by creating a polkit rule to allow xfce4-power-manager to call the Sleep DBus message. However, a better fix would be to not call org.freedesktop.NetworkManager.Sleep at all, at least when using logind for suspend, because Network Manager automatically sleeps by using a logind suspend inhibit delay. I reported this bug on the Ubuntu bug tracker https://bugs.launchpad.net/ubuntu/+source/xfce4-power-manager/+bug/1713224.

Bug: Inactivity sleep mode on battery when hibernate is disabled

Not suspending when on battery is a separate bug. It is a duplicate of Bug 12497. It is caused by a combination of things:

* The default sleep action on AC is suspend. The default sleep action on battery is hibernate. (see xfpm_xfconf_class_init() function in xfpm-xfconf.c)
* Hibernate is disabled by default on some systems.
* In xfce4-power-manager-settings, there is a GComboBox to select the sleep mode on battery. This combo box displays only one item, suspend, because hibernate is disabled. The "inactivity-sleep-mode-on-battery" setting is only updated after the GComboBox changed signal fires. The changed signal never fires if there is only one item in the combo box, so selecting suspend does not change the sleep mode from hibernate.

To reiterate, xfce4-power-manager attempts to hibernate on an inactivity timeout even when hibernate is disabled, and you cannot switch to suspend using the settings GUI. If hibernate was enabled and suspend disabled, then a similar bug would happen during inactivity timeouts on AC.

There are a number of potential solutions to this bug.

1. In xfce4-power-manager intelligently select a default value for "inactivity-sleep-mode-on-battery" and "inactivity-sleep-mode-on-ac" when these settings are not explicitly set. The value should be based on can_suspend, auth_suspend, can_hibernate, and auth_hibernate.

2. In xfce4-power-manager, after an inactivity timeout, override "inactivity-sleep-mode-on-battery" and "inactivity-sleep-mode-on-ac" when the preferred sleep mode is not available.

3. In xfce4-power-manager-settings, change the functions xfpm_settings_on_ac() and xfpm_settings_on_battery() in xfpm-settings.c:
    gtk_combo_box_set_active (GTK_COMBO_BOX (inact_action), 0); // Change this line
    gtk_combo_box_set_active (GTK_COMBO_BOX (inact_action), -1); // To this
This will make it so if the current sleep mode is not available, the sleep mode combo box will not have an active item. When selecting the only item, the combo box changed signal will fire and the setting will be updated.
Comment 5 Git Bot editbugs 2020-05-27 01:39:10 CEST
-- GitLab Migration Automatic Message --

This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/xfce/xfce4-power-manager/-/issues/13.

Please create an account or use an existing account on one of our supported OAuth providers. 

If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests

Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev

Bug #12317

Reported by:
Simon Dedman
Reported on: 2015-11-17
Last modified on: 2020-05-27

People

Assignee:
Ali Abdallah
CC List:
9 users

Version

Attachments

Additional information