You are not logged in.

#1 2013-07-23 12:15:20

SamSpade
Member
Registered: 2012-10-29
Posts: 9

[SOLVED] KMS and X11 same resolution but different timings -> slow swi

Problem:
Kernel mode setting (KMS) and X11 sets same 1920x1080 resolution, but uses different timings so switching between X11 and virtual tty is not instant.

Background:
Viewsonic 1920x1080 monitor is connected to an Intel Q965 on-board graphics controller via VGA1 (the only graphics output of my old desktop). No EDID retrievable in X11 (and probably KMS too).

I get 1920x1080 successfully in both KMS on boot and X11 after startx, by adding the "video=" kernel parameter in GRUB and Modeline (via cvt) in Xorg:

# /boot/grub/grub.cfg
linux /boot/vmlinuz-linux root=UUID=xxxx...xx ro  video=VGA-1:1920x1080
# Monitor info shows: h=67.1 kHz, v=60.0 Hz, pixel clock: 172.7 MHz


# /etc/X11/xorg.conf.d/10-monitor.conf
Section "Monitor"
    Identifier   "VGA1"
    Modeline     "1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync
    Option       "PreferredMode"  "1920x1080_60.00"
EndSection
# Monitor info shows: h=67.1 kHz, v=59.9 Hz, pixel clock: 172.8 MHz

Even using the same resolution but slightly different timings, switching between X11 and tty still involves resetting the graphics card to 'change' resolution. Note that using the same monitor with a laptop via HDMI the switching is perfect and instant. The laptop does retrieve the EDID monitor info successfully through its HDMI connection.

So apparently, KMS (linux kernel) and Xorg (cvt/xrandr) use different timings even for the same resolution when they can't get the EDID.

Question:
How can I make them use the exact same timings so that switching between X11 and virtual tty is instant? Is there a Modeline equivalent in KMS?

Last edited by SamSpade (2013-07-23 16:57:38)

Offline

#2 2013-07-23 13:10:03

fsckd
Forum Moderator
Registered: 2009-06-15
Posts: 3,550

Re: [SOLVED] KMS and X11 same resolution but different timings -> slow swi

Moving from Installation to Kernel & Hardware.


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#3 2013-07-23 16:43:29

SamSpade
Member
Registered: 2012-10-29
Posts: 9

Re: [SOLVED] KMS and X11 same resolution but different timings -> slow swi

SOLVED!! Switching between X11 and virtual tty (or after executing startx) is seamless and instant!

The solution is to make a custom EDID file and feed it both to KMS and Xorg.

- - - - - - - - - - - - - - - - 
# /boot/grub/grub.cfg
linux /boot/vmlinuz-linux root=UUID=xxxx...xxxx ro   drm_kms_helper.edid_firmware=VGA-1:edid/vx2453.bin video=VGA-1:1920x1080
- - - - - - - - - - - - - - - - 
# /etc/X11/xorg.conf.d/10-monitor.conf
Section "Monitor"
    Identifier      "VGA1"
    Option          "PreferredMode" "1920x1080"
    Option          "CustomEDID" "/usr/lib/firmware/edid/vx2453.bin"
EndSection
- - - - - - - - - - - - - - - - 

Helpful resources:
- Arch Linux Wiki article on KMS features the 'drm_kms_helper.edid_firmware' kernel parameter.
- The "CustomEDID" Xorg.conf option is not very well documented. Strangely enough, it's better documented in one of nVidia's release notes than in x.org or freedesktop.org.
- The WIkipedia entry on EDID is very helpful, and gives a detailed breakdown of the EDID structure,

Some tips:
- There's info out there that says "CustomEDID" is not supported by the intel driver. It's either outdated or false. The important thing is to put it in the 'Monitor' section and not in the 'Device', although it may still work in some setups.
- The "PreferredMode" option in Xorg.conf is optional, but will produce more predictable results in cases like multi-monitor setups.

Offline

Board footer

Powered by FluxBB