Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Desktop Environments
  • Search

xorg does not pick up configured modes

Problems with GUI applications? Questions about X, KDE, Gnome, Fluxbox, etc.? Come on in. NOTE: For multimedia, go up one forum
Post Reply
Advanced search
10 posts • Page 1 of 1
Author
Message
highland
n00b
n00b
Posts: 71
Joined: Wed Nov 05, 2008 7:50 am

xorg does not pick up configured modes

  • Quote

Post by highland » Sun Jan 18, 2015 11:42 am

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: Select all

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: Select all

[  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,
Top
silentplummet
n00b
n00b
Posts: 58
Joined: Mon Jun 14, 2004 9:33 pm

  • Quote

Post by silentplummet » Sun Jan 18, 2015 7:14 pm

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: Select all

#!/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
Top
highland
n00b
n00b
Posts: 71
Joined: Wed Nov 05, 2008 7:50 am

  • Quote

Post by highland » Sun Jan 18, 2015 8:06 pm

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,
Top
lost+found
Guru
Guru
User avatar
Posts: 514
Joined: Mon Nov 15, 2004 6:56 pm
Location: North~Sea~Coa~s~~t~~~

  • Quote

Post by lost+found » Sun Jan 18, 2015 8:23 pm

It will probably work with this line added to the Monitor section

Code: Select all

Option		"Monitor-DVI-I-1" "eDP1"
or

Code: Select all

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

Code: Select all

Option		"Monitor-VGA-1" "eDP1"
etc.

The right connector should be mentioned in /var/log/Xorg.0.log, as something like:

Code: Select all

[ 13377.103] (II) NOUVEAU(0): Output HDMI-1 has no monitor section
Cheers!
Top
highland
n00b
n00b
Posts: 71
Joined: Wed Nov 05, 2008 7:50 am

  • Quote

Post by highland » Sun Jan 18, 2015 8:36 pm

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

Connector is eDP1 ?:

Code: Select all

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: Select all

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,
Top
lost+found
Guru
Guru
User avatar
Posts: 514
Joined: Mon Nov 15, 2004 6:56 pm
Location: North~Sea~Coa~s~~t~~~

  • Quote

Post by lost+found » Sun Jan 18, 2015 8:45 pm

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: Select all

Option      "Monitor-eDP1" "eDP1"
Top
highland
n00b
n00b
Posts: 71
Joined: Wed Nov 05, 2008 7:50 am

  • Quote

Post by highland » Sun Jan 18, 2015 8:54 pm

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

Code: Select all

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: Select all

[  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,
Top
lost+found
Guru
Guru
User avatar
Posts: 514
Joined: Mon Nov 15, 2004 6:56 pm
Location: North~Sea~Coa~s~~t~~~

  • Quote

Post by lost+found » Sun Jan 18, 2015 9:18 pm

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: Select all

Virtual		1600 900
If it doesn't work, I'm out of clues...
Top
Jaglover
Watchman
Watchman
User avatar
Posts: 8291
Joined: Sun May 29, 2005 1:57 am
Location: Saint Amant, Acadiana

  • Quote

Post by Jaglover » Sun Jan 18, 2015 9:28 pm

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!
Top
highland
n00b
n00b
Posts: 71
Joined: Wed Nov 05, 2008 7:50 am

  • Quote

Post by highland » Sun Jan 18, 2015 9:39 pm

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

Code: Select all

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/sh ... i?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: Select all

[  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 !
Top
Post Reply

10 posts • Page 1 of 1

Return to “Desktop Environments”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy