You are not logged in.

#1 2021-02-16 13:30:54

Sprout
Member
Registered: 2021-02-13
Posts: 8

[SOLVED] Multiple Monitor setup gets cut in half

So I tried configuring my monitors, but they seem to get cut off in half: https://imgur.com/a/sVN0sf8
The left monitor is vertically set up  that's why there is a black background on the top, it also has a custom resolution of 1440x900.
From what I can tell their resolution is the same and I can go off screen.
When I adjust their position even by a tiny bit they go back to normal.
Here is the script:

#!/bin/sh

xrandr --newmode "1440x900_59.00"  104.75  1440 1528 1672 1904  900 903 909 934 -hsync +vsync
xrandr --addmode DVI-I-0 1440x900_59.00
xrandr --output DVI-I-0 --mode 1440x900_59.00 --rotate right
xrandr --output HDMI-0 --pos 900x450

I call it with i3 by:

exec_always --no-startup-id $HOME/.config/monitors/Setup.sh

Last edited by Sprout (2021-02-16 18:22:43)

Offline

#2 2021-02-16 14:18:43

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,593

Re: [SOLVED] Multiple Monitor setup gets cut in half

Finish xrandr before starting i3 (eg. from the xinitrc, don't fork it!) to not alter the root window while i3 is starting up (WMs tend to not like that)

Offline

#3 2021-02-16 17:10:11

Sprout
Member
Registered: 2021-02-13
Posts: 8

Re: [SOLVED] Multiple Monitor setup gets cut in half

I tried to put it in ~/.xinitrc:

#!/bin/sh
#
# ~/.xinitrc
#
# Start some Programs
if [ -d /etc/X11/xinit/xinitrc.d ] ; then
 for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
  [ -x "$f" ] && . "$f"
 done
 unset f
fi

# Monitor setup
$HOME/.config/monitors/setup.sh &

# Compositor
picom &

# Window manager
exec i3

I hope this is what you meant by finishing it before starting i3
but it did not execute, also picom does not execute here
too so  I'm guessing the whole file is getting ignored.
Here is my /etc/X11/xinit/xinitrc which also does not work:

#!/bin/sh

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

# merge in defaults and keymaps

if [ -f $sysresources ]; then







    xrdb -merge $sysresources

fi

if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

if [ -f "$userresources" ]; then







    xrdb -merge "$userresources"

fi

if [ -f "$usermodmap" ]; then
    xmodmap "$usermodmap"
fi

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
 for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
  [ -x "$f" ] && . "$f"
 done
 unset f
fi

# Monitor setup
$HOME/.config/monitors/setup.sh &

# Start some nice programs
picom &
exec i3

Offline

#4 2021-02-16 17:41:47

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,346

Re: [SOLVED] Multiple Monitor setup gets cut in half

Is the file executable? And the "don't fork it" is important, remove the & after the script invocation. Maybe add an echo Test > /tmp/test to the file to check whether it's executed.

Last edited by V1del (2021-02-16 17:43:49)

Offline

#5 2021-02-16 18:22:26

Sprout
Member
Registered: 2021-02-13
Posts: 8

Re: [SOLVED] Multiple Monitor setup gets cut in half

Alright so I sort of fixed it.
By that I mean I just made a copy of ~/.xinitrc and named it ~/.xprofile which seems to work.
I already had a .xprofile.sh file but I guess the .sh was the reason it got ignored.
Edit: also removed the & after the script invocation

Last edited by Sprout (2021-02-16 18:23:36)

Offline

Board footer

Powered by FluxBB