This forum has been archived. All content is frozen. Please use KDE Discuss instead.

How to turn off monitor in desktop pc

Tags: None
(comma "," separated)
rcabral
Registered Member
Posts
6
Karma
0
(I'm not sure whether this is the proper place for this question).
I have a desktop pc connected to a 32´ tv and I would like to tweak the minutes that go by before it goes into standby or shuts down.
(The Energy saving tab in system settings seems to be designed only for laptops).
Is there a way to do it?
User avatar
Rog131
Registered Member
Posts
828
Karma
10
If the monitor is compatible within the DPMS then:
Code: Select all
xset dpms force off

should turn it off.

more man xset:
Code: Select all
NAME
       xset - user preference utility for X
...
       dpms flags...
               The  dpms  option  allows  the  DPMS  (Energy Star) parameters to be set.  The
               option can take up to three numerical values, or the `force' flag followed  by
               a  DPMS  state.   The `force' flags forces the server to immediately switch to
               the DPMS state specified.  The DPMS state can be one of `standby',  `suspend',
               `off',  or  `on'.   When  numerical  values are given, they set the inactivity
               period (in units of seconds) before the three modes are activated.  The  first
               value  given  is for the `standby' mode, the second is for the `suspend' mode,
               and the third is for the `off' mode.  Setting these values implicitly  enables
               the DPMS features.  A value of zero disables a particular mode.
rcabral
Registered Member
Posts
6
Karma
0
Rog131 wrote:If the monitor is compatible within the DPMS then:
Code: Select all
xset dpms force off

should turn it off.


Right. But that would force me to learn how to integrate into a bash script a loop to check whether there has been no mouse or keyboard activity for the last n minutes, which would lead me to open a new thread after countless tests and trials, etc.
I assumed that a daemon of that kind was already working (since my monitor actually turns off after several -but too many- minutes), and I thought there would be a config file somewhere.
Is that not the case?

(Thanks for your reply.)
User avatar
Rog131
Registered Member
Posts
828
Karma
10
rcabral wrote:
Rog131 wrote:If the monitor is compatible within the DPMS then:
Code: Select all
xset dpms force off

should turn it off.


Right. But that would force me to learn how to integrate into a bash script a loop to check whether there has been no mouse or keyboard activity for the last n minutes, which would lead me to open a new thread after countless tests and trials, etc.
I assumed that a daemon of that kind was already working (since my monitor actually turns off after several -but too many- minutes), and I thought there would be a config file somewhere.
Is that not the case?

(Thanks for your reply.)



Well - From the KDE power settings you could dim/turn off the display. As told on the 'Power Management' handbook:
If a battery is detected you have three tabs with different settings for On AC Power, On Battery and On Low Battery profiles.


At here, with the desktop system there is no battery profile.

Image


If I want to turn the display off immediately - I could add the command 'xset dpms force off' to the KDE menu:

Image

There is a graphical menu editor: https://docs.kde.org/trunk5/en/kde-work ... index.html

After the command is in the KDE menu I can drag&drop the button to the desktop/panel.

Image
rcabral
Registered Member
Posts
6
Karma
0
Rog131 wrote:Well - From the KDE power settings you could dim/turn off the display.


That's right. But, as you say, that does not work (as far as I know) on desktops.
User avatar
Rog131
Registered Member
Posts
828
Karma
10
rcabral wrote:
Rog131 wrote:Well - From the KDE power settings you could dim/turn off the display.


That's right. But, as you say, that does not work (as far as I know) on desktops.


Only thing that I can say is that here with a desktop system:

Code: Select all
$ sudo get-edid | parse-edid
Section "Monitor"
        Identifier "BenQ GL2450"
        ModelName "BenQ GL2450"
        VendorName "BNQ"
        ...
        Option "DPMS" "true"


That is: My monitor has DPMS support ( https://wiki.archlinux.org/index.php/Di ... _Signaling )

When enabling KDE system setting: 'Energy Saving - Screen Energy Saving - Switch off after 1 min' the screen will switch off after 1 min.
rcabral
Registered Member
Posts
6
Karma
0
Rog131 wrote:
rcabral wrote:
Rog131 wrote:Well - From the KDE power settings you could dim/turn off the display.


That's right. But, as you say, that does not work (as far as I know) on desktops.


Only thing that I can say is that here with a desktop system:

Code: Select all
$ sudo get-edid | parse-edid
Section "Monitor"
        Identifier "BenQ GL2450"
        ModelName "BenQ GL2450"
        VendorName "BNQ"
        ...
        Option "DPMS" "true"


That is: My monitor has DPMS support ( https://wiki.archlinux.org/index.php/Di ... _Signaling )

When enabling KDE system setting: 'Energy Saving - Screen Energy Saving - Switch off after 1 min' the screen will switch off after 1 min.


My monitor also has DPMS support
(xset commands work and "get-edid | parse-edid" shows DPMS option as "true"),
but the settings in systemsettings do not seem to be taken into account.
????
User avatar
Rog131
Registered Member
Posts
828
Karma
10
rcabral wrote:
My monitor also has DPMS support
(xset commands work and "get-edid | parse-edid" shows DPMS option as "true"),
but the settings in systemsettings do not seem to be taken into account.
????


Thomas Lübking send to me via mail:
he wants to run "xset dpms 300 360 360; xset +dpms"
I've no idea where powerdevil fetches its settings but suggest to simply
turn it off on desktops.
rcabral
Registered Member
Posts
6
Karma
0
Rog131 wrote:
rcabral wrote:
My monitor also has DPMS support
(xset commands work and "get-edid | parse-edid" shows DPMS option as "true"),
but the settings in systemsettings do not seem to be taken into account.
????


Thomas Lübking send to me via mail:
he wants to run "xset dpms 300 360 360; xset +dpms"
I've no idea where powerdevil fetches its settings but suggest to simply
turn it off on desktops.


YESSSSSSSSSSSSSSSSSSS !!!!!!!!!!!!!
Thank you very extremely utterly much!
User avatar
dandv
Registered Member
Posts
28
Karma
0
OS

Works out of the box as of 2021

Fri Feb 12, 2021 10:28 pm
I can confirm that setting an external monitor to sleep works out of the box with Plasma 5.8.15 and an U3219Q DELL 4K monitor connected to my ThinkPad X1C over USB-C.
maxmendez
Registered Member
Posts
1
Karma
0
I've had a similar problem, the monitor go to sleep and wake up a minute later. This situation was fixed with the monitor settings it was scanning its ports, i've setted with the port connected fixed to stop the autoscan.


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], ourcraft