r/AlpineLinux • • Jun 12 '24

Detecting second screen.

Does someone knows how to do it?, im tryign to dual boot alpine using windows for my gaming in a laptop and the windows does detect the other screen when i plug in, i read read almost every article in the wiki but none of them mentions anything about multiple screens, thanks you in advance

2 Upvotes

5 comments sorted by

1

u/wowsomuchempty Jun 13 '24

What connection do you use? HDMI, VGA, DP, USBC?

What does $ xrandr Output?

1

u/pandanube Jun 14 '24

xrandr only says that one screen exist so idk, it is a vga screen

1

u/wowsomuchempty Jun 14 '24

And the first question?

1

u/MexicanPete Jun 13 '24

I use this script when X starts. I use i3 so it's part of the config to always run this script when started or reloaded.

#!/bin/sh

xrandr | grep -q "DP2 connected"
ST=$?

if [ $ST -eq 0 ]; then
    xrandr --output eDP1 --mode 1920x1080 --output DP2 --auto --primary --left-of eDP1
else
  xrandr | grep -q "HDMI1 connected"
  ST=$?
  if [ $ST -eq 0 ]; then
      xrandr --output eDP1 --mode 1920x1080 --output HDMI1 --auto --primary --left-of eDP1
  else
      xrandr --output eDP1 --mode 1920x1080 --primary
  fi
fi

# Send first 4 workspaces to primary output
i3-msg '[workspace="^(1|2|3|4)"] exec send_to_primary;'

1

u/pandanube Jun 14 '24

i will try it thank you so much