0

My notebook has an HDMI connection to external monitor. I want have xrandr to pass parameters so that the image is displayed on both internal and external monitors, and when the external monitor is disconnected, the image continues to be displayed on the internal.

Currently I turn it off it manually:

xrandr --output LVDS1 --off --output HDMI1 --auto

And turn on:

xrandr --output LVDS1 --auto --output HDMI1 --auto

So I want to put xrandr command with correct parameters in $HOME/.xinitrc, so that video would go out on both monitors.

5
  • 1
    man xrandr, read up on --same-as. Commented Oct 20, 2017 at 6:35
  • @dirkt, thanks for pointing this option, but does --same-as go along with --output option? Can you give example? Commented Oct 21, 2017 at 1:19
  • 3
    Possible duplicate of xrandr clone monitor autodetect resolution Commented Apr 28, 2018 at 19:42
  • I'd say it is not a duplicate. The linked question is about setting the second display to a video mode with the same screen pixel area, but this is not required in this question. Commented Apr 29, 2018 at 21:14
  • @Mark, it is a "per-output" option, so it must come after an --output option. So xrandr --output HDMI1 --same-as LVDS1 to make HDMI1 show the same as LVDS1. Commented Apr 29, 2018 at 23:57

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.