You are not logged in.

#1 2024-07-04 21:59:27

alissonmarcs
Member
Registered: 2023-05-11
Posts: 1

Unable to turn off laptop's monitor in my two monitors setup

Hello

I bought a external monitor to use with my laptop. I will spend more time in my new monitor rather than laptop's monitor, so I created a little shell script to turn on/off laptop's monitor.

#!/bin/bash

setup_on()
{
	xrandr --output eDP-1 --auto --right-of HDMI-1
}

setup_off()
{
	xrandr --output eDP-1 --off
}

case $1 in
	"on")
		setup_on
		;;
	"off")
		setup_off
		;;
	*)
		echo "option '$1' don't recognized"
		;;
esac

This script works very well, but I want that at startup, laptop's monitor be turned off. So I add

Option "Enable" "false"

in the session of laptop's monitor in my

/etc/X11/xorg.conf.d/10-monitor.conf

file, but it doesn't work. When I start my laptop, the laptop's monitor is active.

The entire file are as follows:

Section "Monitor"
	Identifier "HDMI-1"
	Option "Enable" "true"
	Option "Primary" "true"
	Option "DPMS" "true"
EndSection

Section "Monitor"
	Identifier "eDP-1"
	Option "Enable" "false"
EndSection

I am using i3wm.

Anyone can figure out what am I doing wrong?

Last edited by alissonmarcs (2024-07-05 01:06:34)

Offline

Board footer

Powered by FluxBB