You are not logged in.

#1 2018-11-19 17:21:38

karna
Member
Registered: 2015-02-02
Posts: 25

making preferred display resolution the default on startup

I have arch linux installed on a thinkpad t440s laptop, with a dell monitor as a second screen. The laptop screen has a resolution of 1920x1080, while the monitor has a resolution of 1920x1200. Everytime I boot up, the dell monitor is set to the resolution of 1920x1080. I manually use 'xrandr -s' to set it to 1920x1200. Is it possible to make the resolution defauilt to 1920x1200 at system startup? Here 's is the contents of my /etc/X11/xorg.conf:

Section "Monitor"
        Identifier      "DP2"
	#Modeline "1920x1200_60.00"  193.25  1920 2056 2256 2592  1200 1203 1209 1245 -hsync +vsync
	#Option "PreferredMode" "1920x1200_60.00"
	Option "PreferredMode" "1920x1200"
        Option          "Primary" "true"
EndSection

Section "Monitor"
        Identifier      "eDP1"
        Option          "LeftOf" "DP2"
EndSection

Also, here's an excerpt from /var/log/Xorg.0.log:

[   129.047] (II) intel(0): Output DP2 connected
[   129.047] (II) intel(0): Output eDP1 connected
[   129.047] (II) intel(0): Output DP1 disconnected
[   129.047] (II) intel(0): Output HDMI1 disconnected
[   129.047] (II) intel(0): Output HDMI2 disconnected
[   129.047] (II) intel(0): Using user preference for initial modes
[   129.047] (II) intel(0): Output DP2 using initial mode 1920x1080 +0+0
[   129.047] (II) intel(0): Output eDP1 using initial mode 1920x1080 +0+0
[   129.047] (II) intel(0): Using default gamma of (1.0, 1.0, 1.0) unless otherwise stated.
[   129.048] (II) intel(0): Kernel page flipping support detected, enabling
[   129.048] (==) intel(0): DPI set to (96, 96)

Thanks for looking.

Offline

#2 2018-11-19 17:37:46

Coya
Member
Registered: 2016-07-27
Posts: 9

Re: making preferred display resolution the default on startup

What DE or WM are you using? In i3 there is an init script (~/.config/i3/config) which I use to call any commands after X has started, so I just put my xrandr command in that init file (might even work with the ~/.xinitrc). But I don't know whether that is the recommended or most efficient way.

Last edited by Coya (2018-11-19 17:38:04)

Offline

#3 2018-11-19 17:52:49

karna
Member
Registered: 2015-02-02
Posts: 25

Re: making preferred display resolution the default on startup

I am using xfce4. I considered adding 'xrandr -s' in my ~/.xinitrc, but as you say, it is not the most efficient. Also, after using xrandr, the xfce4 dock does not move from its position, so it is hanging a few pixels below the top of the monitor. Right no I got around it by moving the dock to the side of the monitor.

Offline

#4 2018-11-20 12:18:06

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: making preferred display resolution the default on startup

Option "PreferredMode" "1920x1200"

Looks like you are use using nividia proprietary driver ?
post lspci -k output please.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#5 2018-11-20 16:16:28

karna
Member
Registered: 2015-02-02
Posts: 25

Re: making preferred display resolution the default on startup

Thanks for the response.
I got the

Option "PreferredMode" "1920x1200"

from multiple displays help: https://wiki.archlinux.org/index.php/Multihead
Seem to be generic intel drivers. Here's the full output of lspci -k :

00:00.0 Host bridge: Intel Corporation Haswell-ULT DRAM Controller (rev 09)
	Subsystem: Lenovo Haswell-ULT DRAM Controller
	Kernel driver in use: hsw_uncore
00:02.0 VGA compatible controller: Intel Corporation Haswell-ULT Integrated Graphics Controller (rev 09)
	Subsystem: Lenovo Haswell-ULT Integrated Graphics Controller
	Kernel driver in use: i915
	Kernel modules: i915
00:03.0 Audio device: Intel Corporation Haswell-ULT HD Audio Controller (rev 09)
	Subsystem: Lenovo Haswell-ULT HD Audio Controller
	Kernel modules: snd_hda_intel
00:14.0 USB controller: Intel Corporation 8 Series USB xHCI HC (rev 04)
	Subsystem: Lenovo 8 Series USB xHCI HC
	Kernel driver in use: xhci_hcd
	Kernel modules: xhci_pci
00:16.0 Communication controller: Intel Corporation 8 Series HECI #0 (rev 04)
	Subsystem: Lenovo 8 Series HECI
	Kernel driver in use: mei_me
	Kernel modules: mei_me
00:19.0 Ethernet controller: Intel Corporation Ethernet Connection I218-V (rev 04)
	Subsystem: Lenovo Ethernet Connection I218-V
	Kernel driver in use: e1000e
	Kernel modules: e1000e
00:1b.0 Audio device: Intel Corporation 8 Series HD Audio Controller (rev 04)
	Subsystem: Lenovo 8 Series HD Audio Controller
	Kernel modules: snd_hda_intel
00:1c.0 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 6 (rev e4)
	Kernel driver in use: pcieport
00:1c.1 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 3 (rev e4)
	Kernel driver in use: pcieport
00:1d.0 USB controller: Intel Corporation 8 Series USB EHCI #1 (rev 04)
	Subsystem: Lenovo T440s
	Kernel driver in use: ehci-pci
	Kernel modules: ehci_pci
00:1f.0 ISA bridge: Intel Corporation 8 Series LPC Controller (rev 04)
	Subsystem: Lenovo 8 Series LPC Controller
	Kernel driver in use: lpc_ich
	Kernel modules: lpc_ich
00:1f.2 SATA controller: Intel Corporation 8 Series SATA Controller 1 [AHCI mode] (rev 04)
	Subsystem: Lenovo 8 Series SATA Controller 1 [AHCI mode]
	Kernel driver in use: ahci
	Kernel modules: ahci
00:1f.3 SMBus: Intel Corporation 8 Series SMBus Controller (rev 04)
	Subsystem: Lenovo 8 Series SMBus Controller
	Kernel driver in use: i801_smbus
	Kernel modules: i2c_i801
02:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5227 PCI Express Card Reader (rev 01)
	Subsystem: Lenovo RTS5227 PCI Express Card Reader
	Kernel driver in use: rtsx_pci
	Kernel modules: rtsx_pci
03:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8192EE PCIe Wireless Network Adapter
	Subsystem: Realtek Semiconductor Co., Ltd. RTL8192EE PCIe Wireless Network Adapter
	Kernel driver in use: rtl8192ee
	Kernel modules: rtl8192ee

Offline

#6 2018-11-20 18:27:38

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: making preferred display resolution the default on startup

I'm thinking Xorg doesn't understand that you want to apply that particular monitor section you've written to your external monitor. You might have misunderstood what the "Identifier" in your config means. The identifier has nothing to do with the actual DP2 output of your GPU, it's just a name that you can set to anything you like. You have to connect your monitor section to the real monitor in the device section for your GPU.

Try this config here:

Section "OutputClass"
    Identifier "my intel settings"
    MatchDriver "intel"
    Option "Monitor-DP2" "my external monitor"
EndSection

Section "Monitor"
    Identifier "my external monitor"
    Option "PreferredMode" "1920x1200"
EndSection

Save this as a file in "/etc/X11/xorg.conf.d/". The filename has to end in ".conf". This kind of config here is using an "OutputClass" section which will make it work on top of any other config files you might have, so you can leave all your other files alone, just add this snippet here to a new file and try it.

I got the driver name and the output name out of that short Xorg log snippet you shared. If that's wrong, the correct names should be mentioned somewhere else in the log file.

Offline

#7 2018-11-20 18:51:09

shulamy
Member
From: israel
Registered: 2010-09-11
Posts: 453

Re: making preferred display resolution the default on startup

i still think that xfce override X settings

ezik

Offline

#8 2018-11-20 22:38:59

karna
Member
Registered: 2015-02-02
Posts: 25

Re: making preferred display resolution the default on startup

OK thanks for the suggestion. I will try your changes at the end of the work day.

Ropid wrote:

I'm thinking Xorg doesn't understand that you want to apply that particular monitor section you've written to your external monitor. You might have misunderstood what the "Identifier" in your config means. The identifier has nothing to do with the actual DP2 output of your GPU, it's just a name that you can set to anything you like. You have to connect your monitor section to the real monitor in the device section for your GPU.

Try this config here:

Section "OutputClass"
    Identifier "my intel settings"
    MatchDriver "intel"
    Option "Monitor-DP2" "my external monitor"
EndSection

Section "Monitor"
    Identifier "my external monitor"
    Option "PreferredMode" "1920x1200"
EndSection

Save this as a file in "/etc/X11/xorg.conf.d/". The filename has to end in ".conf". This kind of config here is using an "OutputClass" section which will make it work on top of any other config files you might have, so you can leave all your other files alone, just add this snippet here to a new file and try it.

I got the driver name and the output name out of that short Xorg log snippet you shared. If that's wrong, the correct names should be mentioned somewhere else in the log file.

Offline

#9 2018-11-20 22:41:48

karna
Member
Registered: 2015-02-02
Posts: 25

Re: making preferred display resolution the default on startup

The monitor resolution is set at 1920x1080 at the first instant when it is recognized (based on messages in /var/log/Xorg.0.log). Why do you think xfce could be overriding these settings? Is there a way to verify that? Thanks.

shulamy wrote:

i still think that xfce override X settings

ezik

Offline

#10 2018-11-21 10:44:56

shulamy
Member
From: israel
Registered: 2010-09-11
Posts: 453

Re: making preferred display resolution the default on startup

try xfce display settings

ezik

Offline

#11 2018-11-22 09:02:29

digitalone
Member
Registered: 2011-08-19
Posts: 328

Re: making preferred display resolution the default on startup

I had a similar issue with Plasma and managed to set the preferred resolution and refresh rate running an autostart bash script when Plasma is executing. I tried with xorg.conf, but something went wrong, it's easier from xrandr. Look for the correct command with xrandr and just let it execute when the DE is starting (I think XFCE could do this like in Plasma).

Offline

Board footer

Powered by FluxBB