Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
xorg does not pick up configured modes
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
highland
n00b
n00b


Joined: 05 Nov 2008
Posts: 71

PostPosted: Sun Jan 18, 2015 11:42 am    Post subject: xorg does not pick up configured modes Reply with quote

Hello Team,

When i play with randr everything is working fine. But i wanted to make my config permanent and keep it in xorg.conf.

I have:

Code:

Section "Monitor"
    Identifier     "eDP1"
    #VendorName     "Unknown"
    #ModelName      "Unknown"
    #HorizSync       28.0 - 33.0
    #VertRefresh     43.0 - 72.0
    Option         "DPMS"
    Modeline    "1600x1200_59.90" 160.69  1600 1704 1880 2160  1200 1201 1204 1242  -HSync +Vsync
    Modeline    "1600x900_59.90" 118.80  1600 1696 1864 2128  900 901 904 932  -HSync +Vsync
    Modeline   "2880x1620_59.90"  396.75  2880 3096 3416 3952  1620 1621 1624 1676  -HSync +Vsync
    Modeline    "1920x1080_59.90"  172.51  1920 2040 2248 2576  1080 1081 1084 1118  -HSync +Vsync
    Option "PreferredMode" "1600x900_59.90"

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "eDP1"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
        Modes      "1600x900_59.90"
    EndSubSection
EndSection


But still when launching xorg the biggest resolution is selected. In logs i can see:
Code:

[  1345.219] (II) intel(0): Output eDP1 using monitor section eDP1
[  1345.219] (**) intel(0): Option "PreferredMode" "1600x900_59.90"
[  1345.219] (--) intel(0): found backlight control interface intel_backlight (type 'raw')
[  1345.219] (II) intel(0): Output VGA1 has no monitor section
[  1345.219] (II) intel(0): Output DP1 has no monitor section
[  1345.219] (II) intel(0): Output HDMI1 has no monitor section
[  1345.219] (II) intel(0): Output DP2 has no monitor section
[  1345.219] (II) intel(0): Output HDMI2 has no monitor section
[  1345.219] (--) intel(0): Output eDP1 using initial mode 2880x1620 on pipe 0


Why ? How to select 1600x900 ?

After having xorg with 2880x1620 i can switch manually to 1600x900 without any problem (using "xrandr --output eDP1 --mode 1600x900_59.90")

Thanks,
Back to top
View user's profile Send private message
silentplummet
n00b
n00b


Joined: 14 Jun 2004
Posts: 58

PostPosted: Sun Jan 18, 2015 7:14 pm    Post subject: Reply with quote

Probably the easiest way is to create a quick shell script that runs the xrandr commands to add the modes and set them, and have it run on startup.

example:

Code:
#!/bin/sh
xrandr --newmode "2048x1536_68" 315.50  2048 2368 2546 2896  1536 1539 1543 1601 +hsync +vsync
xrandr --newmode "1600x1200_80" 222.01  1600 1728 1896 2192  1200 1203 1207 1266 +hsync +vsync
xrandr --newmode "1440x1080_80"  166.78  1440 1560 1592 1840  1080 1083 1087 1133 +hsync +vsync
xrandr --newmode "1440x1080_90"  195.78  1440 1560 1632 1920  1080 1083 1087 1133 +hsync +vsync
xrandr --newmode "512x384_150"   42.50  512 544 592 672  384 387 391 422 -hsync +vsync
# SNES emulation mode 29.97 * 4 vblank
xrandr --newmode "512x448_120"   38.91  512 544 592 672  448 451 461 483 +hsync +vsync
# NTSC emulation mode 59.94 hz interlaced
xrandr --newmode "ntsc" 25.2 640 664 720 800  483 486 496 525 +hsync +vsync Interlace
xrandr --newmode "640x400_120"   43.13  640 672 736 832  400 403 409 432 +hsync +vsync
xrandr --addmode DVI-0 "2048x1536_68"
xrandr --addmode DVI-0 "1600x1200_80"
xrandr --addmode DVI-0 "1440x1080_80"
xrandr --addmode DVI-0 "1440x1080_90"
xrandr --addmode DVI-0 "640x400_120"
xrandr --addmode DVI-0 "512x448_120"
xrandr --addmode DVI-0 "512x384_150"
xrandr --addmode DVI-0 "ntsc"

xrandr --output DVI-0 --mode 1440x1080_90 --pos 0x0 --rotate normal --output HDMI-0 --mode 1920x1200 --pos 1440x0 --rotate normal
Back to top
View user's profile Send private message
highland
n00b
n00b


Joined: 05 Nov 2008
Posts: 71

PostPosted: Sun Jan 18, 2015 8:06 pm    Post subject: Reply with quote

So - it's a bug of xorg (i have fresh version recommended by gentoo portage) - or what ? It's very simple change - i would like to have it working
(i will have multiple different scenarios/configs and having them in some startup file is very ugly solution)

Which startup script would you recommend ?
How can i run xrandr before xorg ?

I would like to have first login screen already with the correct resolution.

Thanks,
Back to top
View user's profile Send private message
lost+found
Guru
Guru


Joined: 15 Nov 2004
Posts: 509
Location: North~Sea~Coa~s~~t~~~

PostPosted: Sun Jan 18, 2015 8:23 pm    Post subject: Reply with quote

It will probably work with this line added to the Monitor section
Code:
Option      "Monitor-DVI-I-1" "eDP1"

or
Code:
Option      "Monitor-HDMI-1" "eDP1"

or
Code:
Option      "Monitor-VGA-1" "eDP1"

etc.

The right connector should be mentioned in /var/log/Xorg.0.log, as something like:
Code:
[ 13377.103] (II) NOUVEAU(0): Output HDMI-1 has no monitor section


Cheers!
Back to top
View user's profile Send private message
highland
n00b
n00b


Joined: 05 Nov 2008
Posts: 71

PostPosted: Sun Jan 18, 2015 8:36 pm    Post subject: Reply with quote

I believe eDP1 is my internal laptop display (on older laptop i had LVDS-0).

Connector is eDP1 ?:

Code:

arrakis ~ # cat /var/log/Xorg.0.log | grep -i output
[    76.841] (II) intel(0): Output eDP1 using monitor section eDP1
[    76.841] (II) intel(0): Output VGA1 has no monitor section
[    76.841] (II) intel(0): Output DP1 has no monitor section
[    76.841] (II) intel(0): Output HDMI1 has no monitor section
[    76.841] (II) intel(0): Output DP2 has no monitor section
[    76.841] (II) intel(0): Output HDMI2 has no monitor section
[    76.841] (--) intel(0): Output eDP1 using initial mode 2880x1620 on pipe 0


Also xrandr shows:
Code:

arrakis ~ # xrandr
Screen 0: minimum 320 x 200, current 2880 x 1620, maximum 32767 x 32767
eDP1 connected 2880x1620+0+0 (normal left inverted right x axis y axis) 344mm x 193mm
   1600x900_59.90   59.9 +
   2880x1620      60.0*+   50.0 
   2048x1536      60.0 
   1920x1440      60.0 
   1856x1392      60.0 
   1792x1344      60.0 
   1920x1080_59.90   59.9 
   1600x1200      60.0 
   1600x1200_59.90   59.9 
   1400x1050      60.0 
   1280x1024      60.0 
   1280x960       60.0 
   1024x768       60.0 
   800x600        60.3     56.2 
   640x480        59.9 
VGA1 disconnected (normal left inverted right x axis y axis)
DP1 disconnected (normal left inverted right x axis y axis)
HDMI1 disconnected (normal left inverted right x axis y axis)
DP2 disconnected (normal left inverted right x axis y axis)
HDMI2 disconnected (normal left inverted right x axis y axis)


So - should i add something to my xorg.conf ? What exactly ?

Thanks,
Back to top
View user's profile Send private message
lost+found
Guru
Guru


Joined: 15 Nov 2004
Posts: 509
Location: North~Sea~Coa~s~~t~~~

PostPosted: Sun Jan 18, 2015 8:45 pm    Post subject: Reply with quote

It looks like the Monitor has the same name as the connector you currently use. That's OK. The line can be added to the Monitor section in xorg.conf of your first post. So that would be:
Code:
Option      "Monitor-eDP1" "eDP1"
Back to top
View user's profile Send private message
highland
n00b
n00b


Joined: 05 Nov 2008
Posts: 71

PostPosted: Sun Jan 18, 2015 8:54 pm    Post subject: Reply with quote

OK, i have added that line to monitor section, so right now it looks like this:

Code:

Section "Monitor"
    Identifier     "eDP1"
    Option         "DPMS"
    Option      "Monitor-eDP1" "eDP1"
    Modeline    "1600x1200_59.90" 160.69  1600 1704 1880 2160  1200 1201 1204 1242  -HSync +Vsync
    Modeline    "1600x900_59.90" 118.80  1600 1696 1864 2128  900 901 904 932  -HSync +Vsync
    Modeline    "1920x1080_59.90"  172.51  1920 2040 2248 2576  1080 1081 1084 1118  -HSync +Vsync
    Option "PreferredMode" "1600x900_59.90"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "intel"
    VendorName     "Intel Corporation"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "eDP1"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
        Modes      "1600x900_59.90"
    EndSubSection
EndSection


But i still have the same problem - i am using 2880x1620 resolution. Logs are identical:
Code:

[  1278.717] (II) intel(0): Output eDP1 using monitor section eDP1
[  1278.717] (**) intel(0): Option "PreferredMode" "1600x900_59.90"
[  1278.717] (--) intel(0): found backlight control interface intel_backlight (type 'raw')
[  1278.717] (II) intel(0): Output VGA1 has no monitor section
[  1278.717] (II) intel(0): Output DP1 has no monitor section
[  1278.717] (II) intel(0): Output HDMI1 has no monitor section
[  1278.717] (II) intel(0): Output DP2 has no monitor section
[  1278.717] (II) intel(0): Output HDMI2 has no monitor section
[  1278.717] (--) intel(0): Output eDP1 using initial mode 2880x1620 on pipe 0


What else can i do to not have that maximum resolution ?
Might that problem be related with intel drivers which i am forced to use ? (i am having lenovo W540 and Nvidia card is not detected here - because of changed design of graphics cards operation).
Also - i have framebuffer running in max resolution (2880x1620) - can it somehow impact xorg ?

Thanks,
Back to top
View user's profile Send private message
lost+found
Guru
Guru


Joined: 15 Nov 2004
Posts: 509
Location: North~Sea~Coa~s~~t~~~

PostPosted: Sun Jan 18, 2015 9:18 pm    Post subject: Reply with quote

Sorry, it didn't work.

Another thing to try is maybe adding a virtual size to the Subsection "Display" in xorg.conf. But that's a guess. If it works, it's ugly.
Code:
Virtual      1600 900


If it doesn't work, I'm out of clues...
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Sun Jan 18, 2015 9:28 pm    Post subject: Reply with quote

You can put the xrandr command into ~/.xinitrc, although I'm not sure if it works with desktop environments. Works for me with plain OpenBox.
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
highland
n00b
n00b


Joined: 05 Nov 2008
Posts: 71

PostPosted: Sun Jan 18, 2015 9:39 pm    Post subject: Reply with quote

Yes - i have tried Virtual. Does not help.
Also setting:

Code:

xrandr --output eDP1 --mode "1600x900_59.90"


in ~/.xinitrc does not help.

I am suspecting i am hitting this bugs:
https://www.libreoffice.org/bugzilla/show_bug.cgi?id=16927
https://bugzilla.redhat.com/show_bug.cgi?id=536686

Matches my logs. But how to disable xrandr from overriding preferred settings ?
And why so few people have the same problem ?

Thanks,

UPDATE: That is expected. All new drivers ignore ModeLine and few other settings:
https://wiki.debian.org/XStrikeForce/HowToRandR12

And my logs confirm that PreferredMode is skipped:
Code:

[  5356.230] (**) intel(0): Depth 24, (--) framebuffer bpp 32
[  5356.230] (==) intel(0): RGB weight 888
[  5356.230] (==) intel(0): Default visual is TrueColor
[  5356.230] (--) intel(0): Integrated Graphics Chipset: Intel(R) HD Graphics 4600
[  5356.230] (--) intel(0): CPU: x86-64, sse2, sse3, ssse3, sse4.1, sse4.2, avx, avx2
[  5356.230] (**) intel(0): Framebuffer tiled
[  5356.230] (**) intel(0): Pixmaps tiled
[  5356.230] (**) intel(0): "Tear free" disabled
[  5356.230] (**) intel(0): Forcing per-crtc-pixmaps? no
[  5356.231] (II) intel(0): Output eDP1 using monitor section eDP1
[  5356.231] (**) intel(0): Option "PreferredMode" "1600x900_59.90"
[  5356.231] (**) intel(0): Option "Enable" "True"
[  5356.231] (--) intel(0): found backlight control interface intel_backlight (type 'raw')
[  5356.231] (II) intel(0): Output VGA1 has no monitor section
[  5356.231] (II) intel(0): Output DP1 has no monitor section
[  5356.231] (II) intel(0): Output HDMI1 has no monitor section
[  5356.231] (II) intel(0): Output DP2 has no monitor section
[  5356.231] (II) intel(0): Output HDMI2 has no monitor section
[  5356.231] (--) intel(0): Output eDP1 using initial mode 2880x1620 on pipe 0
[  5356.231] (==) intel(0): DPI set to (96, 96)
[  5356.231] (II) Loading sub module "dri2"
[  5356.231] (II) LoadModule: "dri2"
[  5356.231] (II) Module "dri2" already built-in
[  5356.231] (==) Depth 24 pixmap format is 32 bpp
[  5356.231] (II) intel(0): SNA initialized with Haswell (gen7.5, gt2) backend
[  5356.231] (==) intel(0): Backing store enabled
[  5356.231] (==) intel(0): Silken mouse enabled
[  5356.231] (II) intel(0): HW Cursor enabled
[  5356.231] (II) intel(0):[b] RandR 1.2 enabled, ignore the following RandR disabled message.[/b]
[  5356.231] (**) intel(0): DPMS enabled
[  5356.231] (II) intel(0): [DRI2] Setup complete
[  5356.231] (II) intel(0): [DRI2]   DRI driver: i965
[  5356.231] (II) intel(0): direct rendering: DRI2 Enabled
[  5356.231] (WW) intel(0): [b]Option "PreferredMode" is not used[/b]
[  5356.231] (==) intel(0): hotplug detection: "enabled"
[  5356.231] (--) RandR disabled
[  5356.234] (EE) Failed to initialize GLX extension (Compatible NVIDIA X driver not found)
[  5356.237] (II) intel(0): switch to mode 2880x1620@60.0 on pipe 0 using eDP1, position (0, 0), rotation normal
[  5356.273] (II) intel(0): Setting screen physical size to 762 x 428
[  5356.290] (II) config/udev: Adding input device Power Button (/dev/input/eve


But that documentation is not consistent, because later on they are suggesting to use both Modelines and Preferred mode :(

So far i have succeeded executing xrandr from /usr/share/config/kdm/Xsetup (i am using xdm with kdm) - so at least during startup i have a correct resolution.
Will try to write some xrandr scripts detecting new monitors and applying correct settings.

Thanks for the help !
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum