You are not logged in.

#1 2016-12-30 14:30:22

kiv
Member
Registered: 2015-10-08
Posts: 8

Add custom modeline for my monitor

I have ThinkPad X230T and LG 25UM58 monitor. It connected via DisplayPort -> HDMI passive converter and X.org don't see 2560x1080 resolution.
I can switch to native resolution by commands:

xrandr --newmode "2560x1080" 185.580 2560 2624 2688 2784 1080 1083 1093 1111 -HSync -VSync
xrandr --addmode HDMI1 "2560x1080"
xrandr --output HDMI1 --mode "2560x1080"

I want to add this to X.org configuration.

$ cat /etc/X11/xorg.conf.d/99-lg-25um58.conf 
Section "Monitor"
        Identifier "Monitor0"
        VendorName "LGD"
        #ModelName "???"
        Modeline "2560x1080" 185.580 2560 2624 2688 2784 1080 1083 1093 1111 -HSync -VSync
        Option "PreferredMode" "2560x1080"
EndSection

This does not working. Why?
Also where I can get correct ModelName?

$ grep LG /var/log/Xorg.0.log
[     8.417] (II) intel(0): EDID vendor "LGD", prod id 728

Offline

#2 2016-12-31 12:15:14

seth
Member
Registered: 2012-09-03
Posts: 49,992

Re: Add custom modeline for my monitor

This does not working. Why?

How do you determine that it *is* ;-) not working? Is the mode absent or just not selected (by your desktop environment)?
Also look into your Xorg log for error messages and everything related to that modeline.

Online

#3 2016-12-31 15:35:08

kiv
Member
Registered: 2015-10-08
Posts: 8

Re: Add custom modeline for my monitor

Right resolution is not available in xrandr before I add modeline manually by those 3 commands. KDE also cannot set this resolution before I add it manually.
Contents of my /var/log/Xorg.0.log: http://pastebin.com/T7feeX3U
I don't see any relevant errors or warnings here. But Xorg reads my config-file -  I get an error if the error in the configuration file.

P. S. Sorry for my English. It is not my native language.

Last edited by kiv (2016-12-31 15:48:22)

Offline

#4 2016-12-31 16:10:05

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Add custom modeline for my monitor

My only remark here is that you should double check that it is a passive converter, I was under the impression that DisplayPort <-> HDMI conversion required an active converter, while DVI <-> HDMI can be done with a passive adapter.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#5 2016-12-31 16:40:50

seth
Member
Registered: 2012-09-03
Posts: 49,992

Re: Add custom modeline for my monitor

One might need to either disable mode validation or add a "Modes" entry to the "Display" section of the "Screen" (i've never had to write modelines since the config got split ;-)
However, it might be simpler to just perform the (working) xrandr calls with the DM/DE startup.

Online

#6 2016-12-31 16:52:49

kiv
Member
Registered: 2015-10-08
Posts: 8

Re: Add custom modeline for my monitor

Yes, it is an active converter DisplayPort -> HDMI. I disassembled it and looked. I was wrong.

entry to the "Display" section of the "Screen"

Can you give me an example?

However, it might be simpler to just perform the (working) xrandr calls with the DM/DE startup.

I do not want to add 2560x1080 resolution to every monitor, only for one specific (vendor == LGD, prod id == 728).

Last edited by kiv (2016-12-31 16:55:22)

Offline

#7 2016-12-31 17:22:22

kiv
Member
Registered: 2015-10-08
Posts: 8

Re: Add custom modeline for my monitor

I have wrote this config:

Section "Device"
    Identifier "Card0"
    Option "Monitor-HDMI1" "Monitor-HDMI1"
EndSection

Section "Monitor"
    Identifier "Monitor-HDMI1"
    VendorName "LGD"
    ModelName "ULTRAWIDE"
    Modeline "2560x1080" 185.580 2560 2624 2688 2784 1080 1083 1093 1111 -HSync -VSync
    Option "PreferredMode" "2560x1080"
EndSection

It works fine. But can I do so that these settings are not applied to other monitors connected to the HDMI (I have not another monitor now for test)?

Offline

#8 2016-12-31 19:37:48

seth
Member
Registered: 2012-09-03
Posts: 49,992

Re: Add custom modeline for my monitor

Sorry, no idea - the input section has vast MatchVendor/MatchProduct caps, but the Monitor section apparently doesn't. At best, you can limit this to an output.
You'll have to resort querying the vendor/model at runtime and invoke known xrandr scripts conditionally (eg. in a bash script)

Online

#9 2016-12-31 19:41:07

kiv
Member
Registered: 2015-10-08
Posts: 8

Re: Add custom modeline for my monitor

Any idea how I can detect monitor plugging and unplugging and run some command?

Offline

#10 2016-12-31 22:19:05

seth
Member
Registered: 2012-09-03
Posts: 49,992

Online

#11 2017-01-01 00:31:56

DTA7
Member
Registered: 2016-12-31
Posts: 4

Re: Add custom modeline for my monitor

I do not think your modeline is applied, as your Xorg.0.log says:

[     6.080] (==) No Layout section.  Using the first Screen section.
[     6.080] (==) No screen section available. Using defaults.
[     6.080] (**) |-->Screen "Default Screen Section" (0)
[     6.080] (**) |   |-->Monitor "<default monitor>"
[     6.080] (==) No monitor specified for screen "Default Screen Section".
        Using a default monitor configuration.

Try adding a "Screen" section to your xorg.conf.d files which specifies the monitor (or monitors), like in https://wiki.archlinux.org/index.php/Mu … solutions.
I got my configuration to work with the line

Option "Monitor-HDMI-0" "monitor section identifier"

in the "Screen" section to specify the connector.

Offline

Board footer

Powered by FluxBB