Xrandr on startup not working

Hey! I’m on a fresh install of EndeavourOS and i can’t get xrandr to work properly on startup.
I used ARandR to create the file monitor.sh stored in ~/.screenlayout

❯ cat monitor.sh #!/bin/sh xrandr --output HDMI-0 --primary --mode 1680x1050 --pos 5760x0 --rotate left --output DP-0 --mode 3840x2160 --pos 1920x0 --rotate normal --output DP-1 --off --output HDMI-1 --mode 1920x1080 --pos 0x1080 --rotate normal --output DP-2 --off --output DP-3 --off ❯ ls -l total 4 -rwx------ 1 buckfae buckfae 269 6. Apr 17:01 monitor.sh ❯ ./monitor.sh

I’m starting this script like so in my i3 config:
exec --no-startup-id ~/.screenlayout/monitor.sh

However, the monitor config does not work on pc startup. If i just start the script manually via terminal, everything works as expected.

If i restart i3 it does also not work. I am not using any login manager (as this is my home pc and noone has access to it). I clicked “no password required to login” (don’t recall the exact name of the option) on setup.

Try adding sleep 10 before xrandr --output HDMI-0.... and reboot.

1 Like

I tried adding sleep 5. Sleep 6 works.
Thank you!

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.