Bug 979637 - Changes to display sleep made through mate-power-preferences are ignored
Changes to display sleep made through mate-power-preferences are ignored
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: mate-power-manager (Show other bugs)
19
x86_64 Linux
unspecified Severity medium
: ---
: ---
Assigned To: Dan Mashal
Fedora Extras Quality Assurance
: Reopened
Depends On: 975897
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-28 20:23 EDT by James
Modified: 2013-07-05 20:52 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-07-05 20:52:47 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description James 2013-06-28 20:23:11 EDT
Using the 'Power Management Preferences' dialog, I changed the 'Put display to sleep when inactive for' setting to '30 minutes' but the display still sleeps after only 5 minutes(the original setting).


The dconf editor does show the updated values.
Comment 1 Wolfgang Ulbrich 2013-06-29 07:38:30 EDT
Starting 'mate-power-preferences --verbose' from a terminal should show you what's going on ;)

[rave@mother ~]$ mate-power-preferences --verbose
TI:13:17:09	TH:0x15918d0	FI:egg-debug.c	FN:egg_debug_init,306
 - Verbose debugging 1 (on console 1)GPM_VERBOSE
TI:13:17:09	TH:0x15918d0	FI:egg-console-kit.c	FN:egg_console_kit_init,305
<snip>
TI:13:17:25	TH:0x15918d0	FI:gpm-prefs-core.c	FN:gpm_prefs_action_time_changed_cb,191
 - Changing sleep-display-ac to 60
TI:13:20:59	TH:0x15918d0	FI:gpm-prefs-core.c	FN:gpm_prefs_action_time_changed_cb,191
 - Changing sleep-display-ac to 300
TI:13:21:02	TH:0x15918d0	FI:gpm-prefs-core.c	FN:gpm_prefs_action_time_changed_cb,191
 - Changing sleep-display-ac to 600
TI:13:21:08	TH:0x15918d0	FI:gpm-prefs-core.c	FN:gpm_prefs_action_time_changed_cb,191
 - Changing sleep-display-ac to 1800
TI:13:21:12	TH:0x15918d0	FI:gpm-prefs-core.c	FN:gpm_prefs_action_time_changed_cb,191
 - Changing sleep-display-ac to 3600
TI:13:21:18	TH:0x15918d0	FI:gpm-prefs-core.c	FN:gpm_prefs_action_time_changed_cb,191
 - Changing sleep-display-ac to 0

Here you see the time was changes and if i change to 60s my Monitor gets black in 1 minute.
Also i see a realtime change in dconf-editor /org/mate/power-manager/sleep-display-ac i f i change the values.

Can you run the command 'mate-power-preferences --verbose' from a terminal?
Comment 2 James 2013-06-29 14:54:43 EDT
[me@localhost ~]$ mate-power-preferences --verbose
TI:13:43:28	TH:0x15300d0	FI:egg-debug.c	FN:egg_debug_init,306
 - Verbose debugging 1 (on console 1)GPM_VERBOSE
TI:13:43:28	TH:0x15300d0	FI:egg-console-kit.c	FN:egg_console_kit_init,301
 - Failed to get session for pid 11722: Unable to lookup session information for process '11722'
TI:13:43:28	TH:0x15300d0	FI:gpm-brightness.c	FN:gpm_brightness_update_cache,840
 - screen 1 of 1
TI:13:43:28	TH:0x15300d0	FI:gpm-brightness.c	FN:gpm_brightness_update_cache,845
 - watching ::monitors_changed on 0x1554000
TI:13:43:28	TH:0x15300d0	FI:gpm-brightness.c	FN:gpm_brightness_update_cache,865
 - adding resource 0x1575c30
TI:13:43:38	TH:0x15300d0	FI:gpm-prefs-core.c	FN:gpm_prefs_action_time_changed_cb,191
 - Changing sleep-display-ac to 3600
TI:13:43:43	TH:0x15300d0	FI:gpm-prefs-core.c	FN:gpm_prefs_close_cb,404
 - emitting action-close


Five minutes later, the display went to sleep. Then I checked dconf:

[me@localhost ~]$ dconf read /org/mate/power-manager/sleep-display-ac
3600
[me@localhost ~]$
Comment 3 Wolfgang Ulbrich 2013-06-29 15:15:44 EDT
can you post thhe output of:
gsettings list-recursively org.mate.power-manager
and
gsettings list-recursively org.mate.screensaver

PS: are you a autobot or why are you using not a human name in bugzilla?
I prefer to comunicate with humans for further bugs!
You can change this in your account settings.
Comment 4 James 2013-06-29 15:21:11 EDT
[me@localhost ~]$ gsettings list-recursively org.mate.power-manager
org.mate.power-manager action-critical-battery 'nothing'
org.mate.power-manager action-critical-ups 'shutdown'
org.mate.power-manager action-low-ups 'hibernate'
org.mate.power-manager action-sleep-type-ac 'suspend'
org.mate.power-manager action-sleep-type-battery 'hibernate'
org.mate.power-manager backlight-battery-reduce true
org.mate.power-manager backlight-enable true
org.mate.power-manager brightness-ac 100.0
org.mate.power-manager brightness-dim-battery 50
org.mate.power-manager button-hibernate 'hibernate'
org.mate.power-manager button-lid-ac 'suspend'
org.mate.power-manager button-lid-battery 'suspend'
org.mate.power-manager button-power 'interactive'
org.mate.power-manager button-suspend 'suspend'
org.mate.power-manager check-type-cpu false
org.mate.power-manager dpms-method-ac 'off'
org.mate.power-manager dpms-method-battery 'off'
org.mate.power-manager enable-sound true
org.mate.power-manager event-when-closed-battery true
org.mate.power-manager icon-policy 'present'
org.mate.power-manager idle-brightness 30
org.mate.power-manager idle-dim-ac false
org.mate.power-manager idle-dim-battery true
org.mate.power-manager idle-dim-time 10
org.mate.power-manager info-history-graph-points true
org.mate.power-manager info-history-graph-smooth true
org.mate.power-manager info-history-time 21600
org.mate.power-manager info-history-type 'charge'
org.mate.power-manager info-last-device '/org/freedesktop/UPower/devices/line_power_AC'
org.mate.power-manager info-page-number 0
org.mate.power-manager info-stats-graph-points true
org.mate.power-manager info-stats-graph-smooth true
org.mate.power-manager info-stats-type 'charge-data'
org.mate.power-manager kbd-backlight-battery-reduce true
org.mate.power-manager kbd-brightness-dim-by-on-battery 50
org.mate.power-manager kbd-brightness-dim-by-on-idle 75
org.mate.power-manager kbd-brightness-on-ac 100
org.mate.power-manager lock-blank-screen true
org.mate.power-manager lock-hibernate true
org.mate.power-manager lock-keyring-hibernate true
org.mate.power-manager lock-keyring-suspend false
org.mate.power-manager lock-suspend true
org.mate.power-manager lock-use-screensaver true
org.mate.power-manager network-sleep false
org.mate.power-manager notify-discharging true
org.mate.power-manager notify-fully-charged false
org.mate.power-manager notify-low-capacity true
org.mate.power-manager notify-low-power true
org.mate.power-manager notify-perhaps-recall true
org.mate.power-manager notify-sleep-failed true
org.mate.power-manager notify-sleep-failed-uri ''
org.mate.power-manager percentage-action 2
org.mate.power-manager percentage-critical 3
org.mate.power-manager percentage-low 10
org.mate.power-manager show-actions true
org.mate.power-manager sleep-computer-ac 3600
org.mate.power-manager sleep-computer-battery 0
org.mate.power-manager sleep-computer-ups 0
org.mate.power-manager sleep-display-ac 3600
org.mate.power-manager sleep-display-battery 600
org.mate.power-manager sleep-display-ups 600
org.mate.power-manager spindown-enable-ac false
org.mate.power-manager spindown-enable-battery true
org.mate.power-manager spindown-timeout-ac 600
org.mate.power-manager spindown-timeout-battery 60
org.mate.power-manager time-action 120
org.mate.power-manager time-critical 300
org.mate.power-manager time-low 1200
org.mate.power-manager use-time-for-policy true
[me@localhost ~]$ gsettings list-recursively org.mate.screensaver
org.mate.screensaver cycle-delay 10
org.mate.screensaver embedded-keyboard-command ''
org.mate.screensaver embedded-keyboard-enabled false
org.mate.screensaver idle-activation-enabled true
org.mate.screensaver idle-delay 20
org.mate.screensaver lock-delay 0
org.mate.screensaver lock-dialog-theme 'default'
org.mate.screensaver lock-enabled true
org.mate.screensaver logout-command ''
org.mate.screensaver logout-delay 120
org.mate.screensaver logout-enabled false
org.mate.screensaver mode 'blank-only'
org.mate.screensaver power-management-delay 30
org.mate.screensaver status-message-enabled true
org.mate.screensaver themes @as []
org.mate.screensaver user-switch-enabled true
Comment 5 Wolfgang Ulbrich 2013-06-30 04:13:25 EDT
Hi James,
it seems that we have a prob with consolekit and selinux again.
On my system and notebook i don't use selinux and the begining of the output of --verbose looks like this.

[rave@mother ~]$ mate-power-preferences --verbose
TI:09:49:17	TH:0x115eed0	FI:egg-debug.c	FN:egg_debug_init,306
 - Verbose debugging 1 (on console 1)GPM_VERBOSE
TI:09:49:17	TH:0x115eed0	FI:egg-console-kit.c	FN:egg_console_kit_init,305
 - ConsoleKit session ID: /org/freedesktop/ConsoleKit/Session3
TI:09:49:17	TH:0x115eed0	FI:gpm-brightness.c	FN:gpm_brightness_setup_display,251

yours:

[me@localhost ~]$ mate-power-preferences --verbose
TI:13:43:28	TH:0x15300d0	FI:egg-debug.c	FN:egg_debug_init,306
 - Verbose debugging 1 (on console 1)GPM_VERBOSE
TI:13:43:28	TH:0x15300d0	FI:egg-console-kit.c	FN:egg_console_kit_init,301
 - Failed to get session for pid 11722: Unable to lookup session information for process '11722'
TI:13:43:28	TH:0x15300d0	FI:gpm-brightness.c	FN:gpm_brightness_update_cache,840

What is the output of 'ck-list-sessions' ?

Can you temporarily disable selinux?
'setenforce 0'  as root and than restart the session.
You should also disable the screensaver for testing, because if screensaver setting is blank and 10 minutes you see the sreensaver and not sleep-display-ac.
Both looks same.
And can you test the other time settings too (1,5,10,30 minutes)?
Comment 6 James 2013-06-30 16:47:31 EDT
After I updated to mate-power-manager-1.6.1-3.fc19 and selinux-policy.noarch-3.12.1-58.fc19 AND used 'setenforce 0'/logout/login then the monitor sleep settings work correctly(I tested several). This was all done with the screensaver disabled.

I am also affected by https://bugzilla.redhat.com/show_bug.cgi?id=972881#c27 which is also cured with 'setenforce 0'.

I don't know enough to understand https://bugzilla.redhat.com/show_bug.cgi?id=975897 but that was referenced as a possible cause for the lid-suspend issue so maybe it affects this as well.

[me@localhost ~/]$ ck-list-sessions 
Session3:
	unix-user = '1000'
	realname = 'me'
	seat = 'Seat1'
	session-type = ''
	active = TRUE
	x11-display = ':0'
	x11-display-device = '/dev/tty1'
	display-device = ''
	remote-host-name = ''
	is-local = TRUE
	on-since = '2013-06-30T15:15:14.428625Z'
	login-session-id = '2'
Session2:
  ...

Let me know if you need more information.
Comment 7 Wolfgang Ulbrich 2013-07-01 06:46:36 EDT
(In reply to James from comment #6)
> After I updated to mate-power-manager-1.6.1-3.fc19 and
> selinux-policy.noarch-3.12.1-58.fc19 AND used 'setenforce 0'/logout/login
> then the monitor sleep settings work correctly(I tested several). This was
> all done with the screensaver disabled.
> 
Fine, with selinux-policy.noarch-3.12.1-58.fc19 it should be work without using 'setenforce 0' now. Pls test. 
> I am also affected by https://bugzilla.redhat.com/show_bug.cgi?id=972881#c27
> which is also cured with 'setenforce 0'.
> 
> I don't know enough to understand
> https://bugzilla.redhat.com/show_bug.cgi?id=975897 but that was referenced
> as a possible cause for the lid-suspend issue so maybe it affects this as
> well.
In short, older version of selinux-policy prevent consolekit from working.
But mate-power-manager need consolekit for both functions, lid-suspend and sleep-display-ac.
For this reason you didn't get an output with ck-list-sessions.
A temporarily workaround was to disable selinux with 'setenforce 0' for older versions of selinux-policy.
But both functions, lid-suspend and sleep-display-ac, should work now with selinux-policy.noarch-3.12.1-58 without disable selinux.
You should get an output of ck-list-sessions.
Can you confirm?
Comment 8 James 2013-07-01 10:16:23 EDT
(In reply to Wolfgang Ulbrich from comment #7)

> In short, older version of selinux-policy prevent consolekit from working.
> But mate-power-manager need consolekit for both functions, lid-suspend and
> sleep-display-ac.
> For this reason you didn't get an output with ck-list-sessions.
> A temporarily workaround was to disable selinux with 'setenforce 0' for
> older versions of selinux-policy.
> But both functions, lid-suspend and sleep-display-ac, should work now with
> selinux-policy.noarch-3.12.1-58 without disable selinux.
> You should get an output of ck-list-sessions.
> Can you confirm?

I just tested it again. After reboot, closing the lid does not suspend and changing the display sleep setting does not work. This is the output of ck-list-sessions:

[me@localhost ~/Desktop]$ ck-list-sessions 
[me@localhost ~/Desktop]$ 

These are the versions I have installed:

[me@localhost ~/Desktop]$ yum list selinux-policy mate-power-manager
Loaded plugins: langpacks
Installed Packages
mate-power-manager.x86_64 1.6.1-3.fc19    @updates-testing                      
selinux-policy.noarch     3.12.1-58.fc19  @/selinux-policy-3.12.1-58.fc19.noarch
[me@localhost ~/Desktop]$
Comment 9 Rex Dieter 2013-07-01 10:20:37 EDT
Please post your CK-not-working findings to bug #975897 , that's the one tracking CK/selinux problems.
Comment 10 Wolfgang Ulbrich 2013-07-01 10:38:44 EDT
James,
you have a prob with selinux which prevent consolekit from working.
I see no problem with mate-power-manager.
Also lid-suspend and sleep-display-ac is worhing fine on my laptop with selinux-policy-3.12.1-5.fc19 if i enable selinux.
I will close this report as duplicate, pls use the other report.
Comment 11 Wolfgang Ulbrich 2013-07-01 10:41:37 EDT

*** This bug has been marked as a duplicate of bug 972881 ***
Comment 12 Wolfgang Ulbrich 2013-07-01 10:43:11 EDT
sorry,
(In reply to Wolfgang Ulbrich from comment #10)
> James,
> you have a prob with selinux which prevent consolekit from working.
> I see no problem with mate-power-manager.
> Also lid-suspend and sleep-display-ac is worhing fine on my laptop with
> selinux-policy-3.12.1-5.fc19 if i enable selinux.
> I will close this report as duplicate, pls use the other report.

i meant selinux-policy-3.12.1-57.fc19
Comment 13 James 2013-07-05 20:38:02 EDT
This is still broken even though https://bugzilla.redhat.com/show_bug.cgi?id=975897 has been closed.
Comment 14 Wolfgang Ulbrich 2013-07-05 20:52:47 EDT
again, please post your problems with selinux and conlosolekit in https://bugzilla.redhat.com/show_bug.cgi?id=975897
This is the place to fix it, or to get help in this case.

PS: Why do use selinux on a desktop system?
SEelinux is only needed for server systems.
You can disable it in general.

Note You need to log in before you can comment on or make changes to this bug.