You are not logged in.

#1 2017-11-21 20:19:43

Sweenu
Member
Registered: 2016-12-08
Posts: 27

Turning one monitor off out of two

Hello,

I've been using

xset dpms force off

to turn off the screen of my laptop. The problem is, I now have another monitor and I'd like my laptop's screen to shut off and not the other monitor's.
I've tried

set -display :0.0 dpms force off

but it still turns off both screens.

Is there any way to accomplish that? Even if it's not by using xset but something else?

Thank you smile

Offline

#2 2017-11-21 20:21:45

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Turning one monitor off out of two

Just shut the lid...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2017-11-21 20:39:59

seth
Member
Registered: 2012-09-03
Posts: 51,029

Re: Turning one monitor off out of two

or "man xrandr"

Offline

#4 2017-11-21 20:53:38

Sweenu
Member
Registered: 2016-12-08
Posts: 27

Re: Turning one monitor off out of two

Thanks for your answers,

However, I do not want to close the lid (it wouldn't work for me anyway because I got an acpi rule that tells the computer to sleep when the lid is closed.
And as for xrandr, I do not want to change the screen configuration. I want the screen to come back up as if nothing happened if It detects mouse movement on the screen.

Maybe, what I want to do is impossible. In that case, I would indeed need to reconfigure the setup with xrandr to have only the second monitor on... That'd be a hassle because, I have differents configuration on my WM if only one screen is enabled or the both of them.

Offline

#5 2017-11-21 20:56:57

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: Turning one monitor off out of two

`man xrandr` was probably meant to suggest you should read the man page not just use the tool in the way you've previously been aquianted.  In particular, see --brightness.

EDIT: this wouldn't help with the goal of coming back on with mouse movement.  But it'd be easy to toggle on and off without affecting how your WM perceives the root window size/layout.  If you can configure your WM to do so, you could also react to mouse movement events to turn the brightness back up - or alternatively perhaps some wmctrl or xdotool script could do the same thing.

Last edited by Trilby (2017-11-21 20:58:50)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#6 2017-11-24 15:14:33

Sweenu
Member
Registered: 2016-12-08
Posts: 27

Re: Turning one monitor off out of two

Trilby wrote:

`man xrandr` was probably meant to suggest you should read the man page not just use the tool in the way you've previously been aquianted.  In particular, see --brightness.

EDIT: this wouldn't help with the goal of coming back on with mouse movement.  But it'd be easy to toggle on and off without affecting how your WM perceives the root window size/layout.  If you can configure your WM to do so, you could also react to mouse movement events to turn the brightness back up - or alternatively perhaps some wmctrl or xdotool script could do the same thing.

Thank you!
Indeed of a simple xbacklight -set 0 (I thought it would affect both monitors but it affects only one actually).

I'll try to look into using wmctrl or xdotool, thanks for the suggestions smile

Offline

Board footer

Powered by FluxBB