Bug 69083 - [NV84] specifying higher than EDID-preferred 4:3 mode on DVI-I -> VGA adapter causes output to be compressed into small fraction of CRT's top scan lines
Summary: [NV84] specifying higher than EDID-preferred 4:3 mode on DVI-I -> VGA adapter...
Status: RESOLVED WORKSFORME
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/nouveau (show other bugs)
Version: unspecified
Hardware: All All
: medium normal
Assignee: Nouveau Project
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-08 03:50 UTC by Felix Miata
Modified: 2015-11-07 20:53 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Xorg.0.log from openSUSE 13.1 milestone 4 (51.72 KB, text/plain)
2013-09-08 03:50 UTC, Felix Miata
no flags Details
verbose xrandr output per comment infra (28.64 KB, text/plain)
2013-09-08 07:18 UTC, Felix Miata
no flags Details

Description Felix Miata 2013-09-08 03:50:26 UTC
Created attachment 85416 [details]
Xorg.0.log from openSUSE 13.1 milestone 4

Initial summary:
using DVI to VGA adapter for CRT and specifying supported "PreferredMode" >EDID preferred mode, screen output is compressed into small fraction of top scan lines

To reproduce:
1-connect DVI-I out from NVidia PCI express card (G84 here with only dual DVI out; DVI-I-1 connected) to CRT supporting up to 2048x1536 but with 1600x1200 preferred (NEC FE2111SB here) via PCI to VGA adapter
2-set 'Option "PreferredMode" "1920x1440"' in 'Section "Monitor"' in /etc/X11/xorg.conf*
3-start X server

Actual results:
1-entirety of video output displays into top scan lines, approximately 4mm or less in height
2-usable desktop only for those who can use it without seeing video output

Expected results:
1-normal display output
2-normally usable desktop
3-"normal" even if fallback to EDID preferred 1600x1200 is necessary to do so due to gfx hardware device limitation

Notes:
1-Does not happen with pure VGA connection with any gfxchip or driver.
2-Does not happen with same 3 DVI-to-VGA adapters connected to Radeon (rv380; S-video, VGA-0 & DVI-0 available; DVI-0 connected) DVI output.
3-Problem dates back at least to openSUSE 11.4 with xorg-x11-driver-video-nouveau-0.0.16_20110115_b795ca6-3.1.i586 installed and server 1.9.3.
4-Problem remains at least through server 1.14.2 and xorg-x11-driver-video-nouveau-1.0.9-1.3 on openSUSE 13.1M4, and server 1.14.1 on Fedora 19 with xorg-x11-drv-nouveau-1.0.7-1.fc19.
5-Happens with or without specific port specified via Option in 'Section "Device"'.
6-Happens on both 32 and 64 bit x86 installations.
Comment 1 Ilia Mirkin 2013-09-08 04:18:50 UTC
Are you sure that the display is actually compressed into the top few scanlines? e.g. do you see the mouse cursor in there when you move it around? Does it show your normal background? Or is it just garbage that happens to not have 0's for the top few scanlines' worth of data?

I've never used PreferredMode before. If you remove it, I assume everything works fine? What happens if you run something like

xrandr --output DVI-I-1 --mode 1920x1440

does that fix things for you? Can you supply the output of

xrandr --verbose

after X has started? (You can e.g. ssh in and run DISPLAY=:0 xrandr --verbose)
Comment 2 Felix Miata 2013-09-08 07:18:01 UTC
Created attachment 85420 [details]
verbose xrandr output per comment infra

(In reply to comment #1)
> Are you sure that the display is actually compressed into the top few
> scanlines? e.g. do you see the mouse cursor in there when you move it
> around?

I started working out this problem 3 months ago. I spent mucho hours trying to separate it from other bugs at the time. It took me more than two days. A small sample of the 93 saved logs from that time:
http://fm.no-ip.com/Tmp/Linux/Xorg/PrefMode/

As the session begins to open I see the wallpaper colors, which later change as Konsole and the panel should be painted. But, I can see the tip of the mouse pointer in it at times.

> Does it show your normal background?

Can't really tell. My *normal* background is usually hidden under a pile of windows.

> Or is it just garbage that
> happens to not have 0's for the top few scanlines' worth of data?

It's clearly a color pattern based upon the wallpaper and the panel and Konsole.
 
> I've never used PreferredMode before. If you remove it, I assume everything
> works fine?

Yup. Without it happily uses the EDID preference instead of mine.

> What happens if you run something like

> xrandr --output DVI-I-1 --mode 1920x1440
 
> does that fix things for you? Can you supply the output of
 
> xrandr --verbose
 
> after X has started? (You can e.g. ssh in and run DISPLAY=:0 xrandr
> --verbose)

Instead of trying to figure out ssh, I made this script:

xrandr --verbose  > xrandrout.txt
echo mark >> xrandrout.txt
xrandr --output DVI-I-1 --mode 1920x1440
echo mark >> xrandrout.txt
xrandr --verbose  >> xrandrout.txt

I closed a working prior session with Konsole open, added back to configfile the non-working PreferredMode, started new session, and after a short wait for Konsole to get open I ran the script.

It changed nothing WRT to the bug, display still mostly just black. Good thing Ctrl-Alt-BS works.
Comment 3 Ilia Mirkin 2013-09-08 07:29:19 UTC
What if you run

xrandr -s 1920x1440 -r 60

I wonder if something's breaking down at the 75Hz refresh rate it ends up picking. (You can do this from a "working" session, it should just switch resolutions... you can also be careful about it and do like xrandr -s 1920x1440 -r 60 && sleep 10 && xrandr -s 1600x1200 to make sure that you get back to a working state.)
Comment 4 Felix Miata 2013-09-08 07:56:43 UTC
'xrandr -s 1920x1440 -r 60 && sleep 10 && xrandr -s 1600x1200' scrunched everything into the top 1/8" of the display and after a brief sleep restored the working EDID preferred 1600x1200 state.
Comment 5 Ilia Mirkin 2013-09-08 08:23:27 UTC
OK, so this has nothing to do with setting the PreferredMode. Good, that would have been weird. Something's not being computed correctly. I wouldn't be surprised if the mode data in the EDID were somehow wrong for those modes, and other drivers are just better at dealing with the incorrectness. Or perhaps we're setting some clock incorrectly.
Comment 6 Felix Miata 2013-09-08 09:32:02 UTC
1920x1440 was an example of a broken mode >EDID preferred. The broader description is xorg.conf* PreferredMode is broken WRT all traditional 4:3 modes higher than the EDID preferred mode, same as those modes set via xrandr -s. Other broken modes on this FE2111SB/G84 combination include 1792x1344 and 1856x1392, proven using comment 4 method. Interestingly, this CRT has previously proven to have no objection to non-4:3 modes, and 'xrandr -s 1920x1200 -r 60 && sleep 10 && xrandr -s 1600x1200' does not produce this bug, just a normal 1920x1200 squeezed into a 4:3 space for the sleep duration. 1920x1080, 1440x900 and 1680x1050 also work in same manner. Both 1920x1200 and 1920x1080 (and presumably 1440x900 and 1680x1050) work via PreferredMode as well.

Considering the dozens of gfxchips using non-nouveau drivers I've connected via VGA outputs to this CRT exhibiting no such trouble, I doubt EDID is the root. Using this very same G84 and DVI to VGA adapter with nv driver and disabled KMS this CRT works as well as Intel and Radeon and even does 2048x1536@60.
Comment 7 Ilia Mirkin 2015-11-07 08:09:47 UTC
Up until recently, we defaulted to forcing panel scaling by default (except for VGA). Perhaps we were misdetecting something wrt auto-enabling it (normally disabled for VGA). Does this still happen with recent kernels? Or with the randr property 'scaling mode' set to 'None'?
Comment 8 Felix Miata 2015-11-07 20:53:44 UTC
The NEC FE2111SB of comment 0 is no longer available. With a Sony Trinitron G520 this is not reproducible with any kernel/server/nouveau combination tried, including k3.7.10/s1.13.2/n1.0.6, k3.11.10/s1.14.3/n1.0.9, k3.16.7/s1.16.1/n1.0.11 and k4.2.3/s1.17.2/n1.0.11 among others, all using the same G84 and 32 bit Prescott host. So I'm of the opinion this was more likely a CRT quirk than a nouveau bug.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.