Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sharing a script to Setup as a Second Screen on Linux with X11 (and slightly changed from docs) #51

Open
pedro-nonfree opened this issue Feb 15, 2025 · 0 comments

Comments

@pedro-nonfree
Copy link

so, in my case, did not work https://github.com/matteodelabre/vnsee/blob/master/docs/second-screen/linux-x11.md

I have intel [1] but I need the modesetting Driver

Hence, I was testing with another monitor I am using as shown in Generic Workaround, but I needed some changes to make it work

So here it goes the script I used, I hope is useful, maybe the docs should be reviewed, next person that find this maybe would like to help on that. I already spend so much hours reaching to this.

# thanks https://gist.github.com/LottieVixen/166fae536ceb2214f795670c8c4c8ee2
TARGET_DEVICE="HDMI-2"
REF_DEVICE="HDMI-1"
MODELINE="$(gtf 1404 1872 60  | grep Modeline | cut -f4- -d' ')"
# returns "1408x1872_60.00"  225.00  1408 1520 1672 1936  1872 1873 1876 1937  -HSync +Vsync
MODELINE_NAME="$(echo $MODELINE | cut -f2 -d'"')"
# returns 1408x1872_60.00
eval xrandr --newmode ${MODELINE}
xrandr --addmode "${TARGET_DEVICE}" ${MODELINE_NAME}
xrandr --output "${TARGET_DEVICE}" --mode ${MODELINE_NAME} --left-of "${REF_DEVICE}"
# turn off screen:
# xrandr --output "${TARGET_DEVICE}" --off

[1] via lspci command: 00:02.0 VGA compatible controller: Intel Corporation Haswell-ULT Integrated Graphics Controller (rev 0b)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant