You are not logged in.

#1 2020-05-14 17:20:01

PanodGO
Member
Registered: 2020-03-21
Posts: 16

Xrandr in Xinitrc stopped working with new monitor

Hi all,

I have a weird problem I don't know how to solve.

I have external monitor connected to my laptop and for a long time had in my xinitrc line like that:

xrandr --output eDP1 --off --output DP2-1 --primary --mode 2560x1440

Now I'v changed monitor to ultrawide and:

xrandr --output eDP1 --off --output DP2-1 --primary --mode 3440x1440

has no effect. Not only DP2-1 has 2560x1440 resolution but also eDP1 is turned ON.

If I copy xrandr command and run in terminal it works just fine.

It looks like my .xinitrc can't propery run modified xrandr command.

Offline

#2 2020-05-14 17:47:01

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

Re: Xrandr in Xinitrc stopped working with new monitor

Please post your complete xinitrc and the output of "xrandr -q"

Offline

#3 2020-05-14 18:22:27

PanodGO
Member
Registered: 2020-03-21
Posts: 16

Re: Xrandr in Xinitrc stopped working with new monitor

.xinitrc

xrandr --output eDP1 --off --output DP1 --off --output DP2 --off --output DP2-1 --primary --mode 3440x1440 --pos 0x0 --rotate normal --output DP2-2 --off --output HDMI1 --off --output HDMI2 --off --output VIRTUAL1 --off
xrdb ~/.Xresources
feh --randomize --bg-fill /home/pawel/.wallpapers/*
picom -b
exec i3

xrandr -q - eDP1 is ON and DP2-1 is 2560x1080

Screen 0: minimum 8 x 8, current 2736 x 1824, maximum 32767 x 32767
eDP1 connected primary 2736x1824+0+0 (normal left inverted right x axis y axis) 260mm x 170mm
   2736x1824     60.01*+
DP1 disconnected (normal left inverted right x axis y axis)
DP2 disconnected (normal left inverted right x axis y axis)
DP2-1 connected 2560x1080+0+0 (normal left inverted right x axis y axis) 800mm x 330mm
   3440x1440     59.97 +  99.90  
   2560x1080     99.94*   59.98  
   1720x1440     59.94  
   1920x1080     99.93    60.00    50.00    59.94  
   1680x1050     59.95  
   1280x1024     75.02    60.02  
   1440x900      59.89  
   1280x720      60.00    50.00    59.94  
   1024x768      99.99    75.03    70.07    60.00  
   832x624       74.55  
   800x600       99.86    72.19    75.00    60.32    56.25  
   720x576       50.00  
   720x480       60.00    59.94  
   640x480       99.83    75.00    72.81    66.67    60.00    59.94  
   720x400       70.08  
DP2-2 disconnected (normal left inverted right x axis y axis)
HDMI1 disconnected (normal left inverted right x axis y axis)
HDMI2 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)

Offline

#4 2020-05-14 18:36:03

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

Re: Xrandr in Xinitrc stopped working with new monitor

Try to replace the call w/ two calls

xrandr --output DP2-1 --primary --auto
xrandr --output eDP1 --off 

(skip the entire configuration trying to turn off non existent outputs)

Semi-related: you might want to utilize some /etc/X11/xorg.conf.d/11-monitor.conf

Section "Monitor"
	Identifier "DP2-1"
#	Option	"Enable"	"False"
	Option	"Primary"	"True"
EndSection

Section "Monitor"
	Identifier "eDP1"
#	Option	"Primary"	"True"
	Option	"Enable"	"False"
EndSection

instead.

Unrelated but relevant: click the 4th link in my signature ;-)

Offline

Board footer

Powered by FluxBB