power settings not working

Kernels & Hardware, configuring network, installing services

power settings not working

Postby kmchen » 2019-07-11 06:47

Hi

On Stretch / KDE my system power settings are not working. My laptop suddently powers off without applying any of the differents steps I defined in the system configuration settings.

Thanks for your answers
Développeur WEB
http://www.webologix.com
kmchen
 
Posts: 49
Joined: 2013-04-24 06:29

Re: power settings not working

Postby Emperor Penguin » 2019-07-11 09:22

Strange. My laptop was working OK with Stretch / Gnome, but with Buster / Gnome (clean install, not upgrade) I have automatic suspends. I saw a message that it would suspend due to inactivity. It seems that the settings are not applied. I've noticed that also other settings, not just the ones about power control, are not working, like switching the lock screen background. I have made my choices in settings, they seem to be accepted, but they don't get applied. Probably a bug.
Emperor Penguin
 
Posts: 105
Joined: 2011-02-25 13:40

Re: power settings not working

Postby theblueplll » 2019-07-11 15:35

Power management does strange things to one of my laptops so I have it disabled.

I know this isn't a fix but if you don't absolutely need it I would disable it.
theblueplll
 
Posts: 154
Joined: 2019-04-29 01:17

Re: power settings not working

Postby kmchen » 2019-07-15 08:21

Thanks for your replies. Power settings were working correctly before Stretch upgrade.

Ain't another way to manage that than KDE system settings page ? At command line I mean
Développeur WEB
http://www.webologix.com
kmchen
 
Posts: 49
Joined: 2013-04-24 06:29

Re: power settings not working

Postby Emperor Penguin » 2019-07-17 11:41

I think I've found out what's going on. Reading this discussion https://gitlab.gnome.org/GNOME/gnome-control-center/issues/22 at gitlab, it seems that a change was made in the gnome-settings-daemon in order to comply with European and American power-saving regulations. Now, the power settings are, to my understanding, in a per user bases. So, as long the user stays logged-in, the power settings of the user are been used. I think this also is the case if the user logs-in and then locks the screen (while still being logged-in). If the user logs out, then the GDM settings are the ones being used.

If you type this command in a terminal you can see the power settings for the GDM user, which in Debian is Debian-gdm (with a capital D):

Code: Select all
sudo -u Debian-gdm dbus-launch gsettings list-recursively org.gnome.settings-daemon.plugins.power


Code: Select all
sudo -u Debian-gdm dbus-launch gsettings list-recursively org.gnome.settings-daemon.plugins.power
org.gnome.settings-daemon.plugins.power power-button-action 'suspend'
org.gnome.settings-daemon.plugins.power idle-dim true
org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type 'suspend'
org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout 1200
org.gnome.settings-daemon.plugins.power sleep-inactive-battery-type 'suspend'
org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout 1200
org.gnome.settings-daemon.plugins.power ambient-enabled true
org.gnome.settings-daemon.plugins.power idle-brightness 30


Using this command I have changed the settings of GDM user for when the laptop is plugged in to 0 (which means never):

Code: Select all
sudo -u Debian-gdm dbus-launch gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout 0


So now it looks like this:

Code: Select all
sudo -u Debian-gdm dbus-launch gsettings list-recursively org.gnome.settings-daemon.plugins.power
org.gnome.settings-daemon.plugins.power power-button-action 'suspend'
org.gnome.settings-daemon.plugins.power idle-dim true
org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type 'suspend'
org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout 1200
org.gnome.settings-daemon.plugins.power sleep-inactive-battery-type 'suspend'
org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout 0
org.gnome.settings-daemon.plugins.power ambient-enabled true
org.gnome.settings-daemon.plugins.power idle-brightness 30


Basically I changed the value of the line:
org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout 1200 to
org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout 0

Obviously the line org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout 1200 is for when the laptop is on battery.

For now it seems to work.

Probably somewhere in there there must be the setting for the background that is being used when only GDM is running. I wish there was a GUI for changing these settings :( .
Emperor Penguin
 
Posts: 105
Joined: 2011-02-25 13:40

Re: power settings not working

Postby Head_on_a_Stick » 2019-07-20 09:24

Emperor Penguin wrote:I wish there was a GUI for changing these settings

https://packages.debian.org/buster/dconf-editor
User avatar
Head_on_a_Stick
 
Posts: 10377
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: power settings not working

Postby Emperor Penguin » 2019-07-20 11:02

@Head_on_a_Stick: But can a user run dconf as another user? The problem is that, now, the dconf changes the user's settings only. But we need to change the Debian-gdm user settings to take effects when the system is on the login screen.
Emperor Penguin
 
Posts: 105
Joined: 2011-02-25 13:40

Re: power settings not working

Postby Head_on_a_Stick » 2019-07-20 19:15

Emperor Penguin wrote:But can a user run dconf as another user?

Code: Select all
sudo -u Debian-gdm dconf-editor

Not recommended though, this is probably the way to go.
User avatar
Head_on_a_Stick
 
Posts: 10377
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: power settings not working

Postby theblueplll » 2019-07-21 03:30

Head_on_a_Stick wrote:
Emperor Penguin wrote:I wish there was a GUI for changing these settings

https://packages.debian.org/buster/dconf-editor


If it just me or is it odd that an application like that never asks for permission or priveleges?(yes i realize running a gui as root has it's risks)

It just does whatever I tell it to without question.
So it scares me and I don'tuse it often.
theblueplll
 
Posts: 154
Joined: 2019-04-29 01:17

Re: power settings not working

Postby Emperor Penguin » 2019-07-21 07:28

I knew about this command, but it didn't work for me.

Code: Select all
sudo -u Debian-gdm dconf-editor

It stops with an error.

Code: Select all
No protocol specified
Unable to init server:
(dconf-editor:9709): Gtk-WARNING **: 11:12:26.227: cannot open display: :1

It works fine for the current user, but not as another user than the one running.
Emperor Penguin
 
Posts: 105
Joined: 2011-02-25 13:40

Re: power settings not working

Postby Head_on_a_Stick » 2019-07-21 10:10

theblueplll wrote:If it just me or is it odd that an application like that never asks for permission or priveleges?(yes i realize running a gui as root has it's risks)

It just does whatever I tell it to without question.

The program only applies settings for the normal user so it shouldn't ask for root privileges.

Emperor Penguin wrote:It stops with an error.

Are you using the Wayland session? Try with X instead.
User avatar
Head_on_a_Stick
 
Posts: 10377
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: power settings not working

Postby Emperor Penguin » 2019-07-21 12:49

@Head_on_a_Stick: I have tried it in both, even though by accident. My system sometimes recognize wayland and sometimes it doesn't and falls back to using X11 (that's another bug I'm having). But the command "sudo -u Debian-gdm dconf-editor" could not run as another user. Anyway, for now, the command line gave me a solution. Thank you.
Emperor Penguin
 
Posts: 105
Joined: 2011-02-25 13:40

Re: power settings not working

Postby kmchen » 2019-07-23 08:48

Is there a KDE little brother for gdm-dconf ?
Développeur WEB
http://www.webologix.com
kmchen
 
Posts: 49
Joined: 2013-04-24 06:29

Re: power settings not working

Postby kmchen » 2019-08-15 06:53

So the problem of that post was on KDE, not GNOME, does anyone know about system power settings not taken in account ?
Développeur WEB
http://www.webologix.com
kmchen
 
Posts: 49
Joined: 2013-04-24 06:29

Re: power settings not working

Postby L_V » 2019-08-15 07:03

What report this
Code: Select all
apt policy upower powerdevil
L_V
 
Posts: 1047
Joined: 2007-03-19 09:04

Next

Return to System configuration

Who is online

Users browsing this forum: No registered users and 14 guests

fashionable