M
M
Mikhail Guber2015-08-28 23:19:59
linux
Mikhail Guber, 2015-08-28 23:19:59

How to turn off the laptop monitor systemically?

Hello! I recently switched to Linux, to put it mildly, I'm a teapot. Now I want to turn off the monitor built into the laptop, because I connected the monitor via VGA. I tried it in the settings, to no avail: I turn it off, the connected monitor goes out, ten seconds and I turn out to be an unauthorized user, and the laptop monitor is not turned off.
How do I turn off the monitor using the terminal?

Answer the question

In order to leave comments, you need to log in

6 answer(s)
X
xotkot, 2015-08-29
@xotkot

I recently switched to Linux, to put it mildly, I'm a teapot.

You can use xrandr.
Install xrandr if it is not already installed, you can check it by typing xrandr in the console ,
the output will be something like this:
% xrandr
Screen 0: minimum 320 x 200, current 1280 x 1024, maximum 8192 x 8192
VGA-0 connected primary 1280x1024+0+0 (normal left inverted right x axis y axis) 376mm x 301mm
   1280x1024     60.02 +  75.02* 
   1152x864      75.00  
   1024x768      75.08    70.07    60.00  
   832x624       74.55  
   800x600       72.19    75.00    60.32    56.25  
   640x480       75.00    72.81    66.67    60.00  
   720x400       70.08  
LVDS connected (normal left inverted right x axis y axis)
   1024x600      59.99 +
   800x600       59.86  
   848x480       59.66  
   720x480       59.71  
   640x480       59.38  
HDMI-0 disconnected (normal left inverted right x axis y axis)

in this case, it is shown that there are three video outputs:
- VGA-0 - an external monitor is connected here
- LVDS - a netbook screen
- HDMI-0 - an unused HDMI output
For each output used, supported modes will also be displayed that can be enabled.
Task
Switch to an external VGA monitor with a resolution of 1280x1024 and a frequency of 75 Hz, while turning off the laptop screen.
In this case, the command in the terminal will look like this:
Here, two commands will be executed sequentially (&&): in the first, xrandr will set up an external monitor, and in the second, xrandr will turn off the laptop screen.
In general, you look at the output of your xrandr, and already, according to its data, you build the command you need.

L
LittleFatNinja, 2015-08-28
@LittleFatNinja

no way

D
Dima, 2015-08-28
@CrazyFail

Physically (break)

M
Maxim Moseychuk, 2015-08-29
@fshp

If you have Nvidia, then 7783b4ff2e6043918d7f38ccebae16a2.pngselect "Disable" in the "Configuration" list.
If you are less fortunate with the video card, then smoke the xorg.conf documentation. Generate a default config, and then look at specific sections.
Remove the desired monitor from the "Screen" section.

V
Vladimir, 2015-08-29
@MechanID

If your window manager doesn't work through the regular gui, then there are options
1 to install arandr, start it and turn it off from there
2 use xrandr from the console.

V
Vladislav Chernyshov, 2018-05-20
@vlad4ernyshov

On my mint, the xset dpms force off command turns off the monitor until a signal is received from input devices.
https://wiki.archlinux.org/index.php/Display_Power...
You can hang it on a shortcut in the control panel (then it's better with a delay: sleep 1 && xset dpms force off) or on a keyboard shortcut.
If you have Cinnamon you can install the Turn Off Monitor plugin ( https://cinnamon-spices.linuxmint.com/applets/view/284)
Here is a simple script to disable and lock the screen:

#!/bin/bash
sleep 0.5
xset dpms force off
loginctl lock-session

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question