The Cookie Machine - Click here to drag window

DUMMY TEXT - Real text set in assets/js/theCookieMachine.js

If you can read me, I'm broken!

Views: 5,150     Votes:  3 
Tags: display   xrandr  
Link: šŸ” See Original Answer on Ask Ubuntu ⧉ šŸ”—

URL: https://askubuntu.com/q/1178690
Title: Disabling external monitor with xrandr also disables laptop screen
ID: /2019/10/04/Disabling-external-monitor-with-xrandr-also-disables-laptop-screen
Created: October 4, 2019
Upload: April 21, 2025    Layout:  post
TOC: false    Navigation:  false    Copy to clipboard:  false


I’m not using i3 windowing manager but what could be happening here is external monitor is the primary monitor and laptop display mirrors it. Either way create this bash script:

#!/bin/bash
xrandr --output DP1 --off
xrandr --output eDP1 --auto --primary

Mark the script as executable: chmod a+x /path/to/scriptname

Then call the script with /path/to/scriptname

Replace eDP1 with your laptop monitor name discovered using:

xrandr | grep " connected"
⇧ Pause music when bluetooth connection drops Suspend temporarily linux update apt for the session until reboot  ā‡©