You are not logged in.

#1 2016-01-16 07:45:54

cer_nagas
Member
Registered: 2015-07-01
Posts: 24

xrandr needs reset to work properly

One beautiful day (yesterday), my X randomly changed the default to 1024x768. The display was centered and smaller than the monitor.
The problem can be solved immediately with

 xrandr -s 0 

, but this won't save the configuration for the next reboot.
The funny thing is after xrandr -s 0, the mode chosen is 1366x768 (my monitor is eDP-1):

Screen 0: minimum 320 x 200, current 1366 x 768, maximum 8192 x 8192
eDP-1 connected 1366x768+0+0 (normal left inverted right x axis y axis) 344mm x 193mm
   1366x768      60.00*+
   1024x768      60.04    60.00  
   960x720       60.00  
   928x696       60.05  
   896x672       60.01  
   800x600       60.00    60.32    56.25  
   700x525       59.98  
   640x512       60.02  
   640x480       60.00    59.94  
   512x384       60.00  
   400x300       60.32    56.34  
   320x240       60.05  
HDMI-1 disconnected (normal left inverted right x axis y axis)
DP-1 connected 1024x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1024x768      60.00* 
   800x600       60.32    56.25  
   848x480       60.00  
   640x480       59.94  

But I cannot use

xrandr --output eDP-1 --mode 1366x768 

alone. I tried also to changed it in /etc/X11/xorg.conf:

Section "Monitor"
	Identifier	"eDP-1"
	Option		"Primary"	"true"
	Option		"PreferredMode"	"1366x768"
EndSection

Section "Monitor"
	Identifier	"eDP-0"
	Option		"LeftOf"	"eDP-1"
	Option		"PreferredMode"	"1920x1080"
EndSection

Section "Monitor"
	Identifier	"DisplayPort-0"
	Option		"LeftOf"	"eDP-0"
	Option		"PreferredMode"	"1680x1050"
EndSection

(I added eDP-1 section, the other 2 are there by default).
Is there a way to save the whole current section as default?

Offline

#2 2016-01-16 08:36:11

tom.ty89
Member
Registered: 2012-11-15
Posts: 608

Re: xrandr needs reset to work properly

Well, your DP-1 is 1024x768, if you are doing mirror, then eDP-1 needs to be 1024x768 as well...

Offline

#3 2016-01-16 10:54:34

rune888
Member
From: Norway
Registered: 2016-01-15
Posts: 3

Re: xrandr needs reset to work properly

Your setup info is limited (DE,Display manager, .xinitrc, xrandr -q is nice, if you mirror or not).  Stuff like that.  I can see both DP-1 and eDP-1 is connected. You should consider using scripts to detect connected monitors and turn off the one you dont use if you diff monitors/outputs all the time.

Checkout excellent wiki at Arch xrandr wiki espessially scripts section.

At last you normally you dont need a /etx/X11/xorg.conf as Xorg are auto-configuring. It is not there by default. If you need monitor setup for your box then make a config in /etc/X11/xorg.conf.d/10-monitor.conf  explained Here in Arch wiki

You should check if you have a config for monitor in /etc/X11/xorg.conf.d/ alredy.


ARCHBOX: Kernel: 4.3.3-2-ARCH x86_64  Openbox 3.6.1  Theme: Windows 10 Dark   Icon: clarity-caeruleus  Font: Lucida MAC 10


Where the fuck are my cookies?

Offline

#4 2016-01-16 19:27:08

cer_nagas
Member
Registered: 2015-07-01
Posts: 24

Re: xrandr needs reset to work properly

Hi, DP-1 is something strange to me. After I edited xorg.conf, it appears. No other action was taken. I just use one monitor eDP-1, it's a laptop.
I'm using i3.

.xinitrc:

#!/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

# start some nice 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

exec i3

# mute the beep
xset -b

feh --bg-scale ~/Wallpaper/arch-desktop-wallpaper-widescreen-so0v1hso0f.png
exec 'ibus-daemon -drx'
exec 'xscreensaver &'
exec 'xautolock -time 1 -locker /home/cer/bin/lock -detectsleep'

xrandr -q:

Screen 0: minimum 320 x 200, current 1366 x 768, maximum 8192 x 8192
eDP-1 connected 1366x768+0+0 (normal left inverted right x axis y axis) 344mm x 193mm
   1366x768      60.00*+
   1024x768      60.04    60.00  
   960x720       60.00  
   928x696       60.05  
   896x672       60.01  
   800x600       60.00    60.32    56.25  
   700x525       59.98  
   640x512       60.02  
   640x480       60.00    59.94  
   512x384       60.00  
   400x300       60.32    56.34  
   320x240       60.05  
HDMI-1 disconnected (normal left inverted right x axis y axis)
DP-1 connected (normal left inverted right x axis y axis)
   1024x768      60.00  
   800x600       60.32    56.25  
   848x480       60.00  
   640x480       59.94  
HDMI-2 disconnected (normal left inverted right x axis y axis)

I tried to use /etc/X11/xorg.conf.d/10-monitor.conf, but it made no difference.
Thank you for answers.

Offline

#5 2016-01-16 19:53:52

tom.ty89
Member
Registered: 2012-11-15
Posts: 608

Re: xrandr needs reset to work properly

Why are you using the xorg conf after all?

Offline

#6 2016-01-16 20:18:41

cer_nagas
Member
Registered: 2015-07-01
Posts: 24

Re: xrandr needs reset to work properly

The problem (wrong resolution) occurs. There's no DP-1 then. I tried to use /etc/X11/xorg.conf.d/10-monitor.conf, failed. Then I tried to edit xorg.conf.
But maybe now I have a quite acceptable solution, I just need to ignore the DP-1 and everything is back to normal. I can mark this as SOLVED.
Create /usr/share/X11/xorg.conf.d/50-disable-lvds.conf and add:

Section "Monitor"
        Identifier      "DP-1"
        Option  "ignore"        "true"
EndSection

But I still don't understand what happened at the first place. I did no update, the only thing I was working with was the netctl profiles. I'm quite busy these days so I'm quite sure I'm not messing around with any system configuration.
Thank you for your attempts to help. Have a nice day.

Offline

#7 2016-01-17 09:05:15

tom.ty89
Member
Registered: 2012-11-15
Posts: 608

Re: xrandr needs reset to work properly

So you mean this weird DP-1 comes up (as in, shown as "connected" with a couple available modes) before you use use ANY xorg conf?

Sounds like some bug of the driver. What's your card?

Last edited by tom.ty89 (2016-01-17 09:05:59)

Offline

Board footer

Powered by FluxBB