Bug 53391 - nouveau: wrong display output order
Summary: nouveau: wrong display output order
Status: RESOLVED OBSOLETE
Alias: None
Product: Drivers
Classification: Unclassified
Component: Video(DRI - non Intel) (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: drivers_video-dri
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-03 18:20 UTC by Stijn Tintel
Modified: 2021-12-08 09:47 UTC (History)
0 users

See Also:
Kernel Version: 3.8-rc6
Subsystem:
Regression: No
Bisected commit-id:


Attachments
dmesg (83.65 KB, text/plain)
2013-02-03 18:22 UTC, Stijn Tintel
Details
Output of "lspci -vn -d 10de:" with nvidia.ko loaded (1.12 KB, text/plain)
2013-02-09 17:43 UTC, Stijn Tintel
Details
quirk (765 bytes, patch)
2013-02-09 17:59 UTC, Marcin Slusarz
Details | Diff
quirk v2 (839 bytes, patch)
2013-02-09 20:11 UTC, Marcin Slusarz
Details | Diff
quirk v3 (755 bytes, patch)
2013-02-12 21:36 UTC, Marcin Slusarz
Details | Diff

Description Stijn Tintel 2013-02-03 18:20:49 UTC
My graphics card is a Gainward GTX480 (http://www.gainward.com/main/vgapro.php?id=238). It has 2 DVI outputs, and 1 mini HDMI output. The DVI outputs are numbered on the card, with DVI 1 being the closest to the PCIe slot, then DVI 2, and finally the mini HDMI.

My primary (left) monitor, is connected to DVI 1, my secondary (right) monitor to DVI 2. When I boot the computer, the BIOS initializes and uses the monitor on DVI 1. Grub is displayed on the primary monitor, and the kernel initially outputs to the primary monitor as well.

However, as soon as the nouveau module is loaded, the primary monitor goes to standby and the kernel now uses the secondary monitor (on DVI 2) as primary.
When X starts (no Xorg.conf file), it is also displayed on the secondary monitor.

When using either efifb, vesafb or uvesafb, the monitor on DVI 1 is always the primary monitor. X with nvidia.ko also uses DVI 1 as the primary display. Finally, when booting Windows, the startup screen is also displayed on the monitor connected to DVI 1.

Here comes the weird part: when I am in X, and run xrandr, it does show 3 connected devices: DVI-I-1, DVI-I-2, and HDMI-1, with DVI-I-2 being the only active one. So it seems that in X, the output order is correct, but with nouveaufb the DVI connectors are swapped.

I will attach the output of dmesg here. If anything else is needed, please let me know and I'll be happy to add it.
Comment 1 Stijn Tintel 2013-02-03 18:22:04 UTC
Created attachment 92501 [details]
dmesg
Comment 2 Marcin Slusarz 2013-02-09 16:46:42 UTC
Can I see the output of "lspci -vn -d 10de:"?
Comment 3 Stijn Tintel 2013-02-09 17:43:08 UTC
Created attachment 92791 [details]
Output of "lspci -vn -d 10de:" with nvidia.ko loaded

This is with nvidia.ko loaded, since I reverted back to the proprietary driver. If you need it with nouveau loaded instead, let me know.

One more thing I noticed with the proprietary driver: xrandr shows DVI-I-0, DVI-I-1, DVI-I-2, DVI-I-3, and HDMI-0, with DVI-I-2 being connector 1 and DVI-I-3 connector 2 on the card.
Comment 4 Marcin Slusarz 2013-02-09 17:59:44 UTC
Created attachment 92801 [details]
quirk

Does it work correctly with this patch?

Can you check whether the same bug occurs with analog cables?
(In this case replace "if 0" with "if 1" and test it too).
Comment 5 Stijn Tintel 2013-02-09 19:00:44 UTC
The patch seems to fix it for nouveaufb. When starting X I still see strange behavior. When KDM starts, it is displayed on the correct monitor (the left monitor on DVI connector 1 on the card). However, when I log into KDE, xrandr says it is the monitor on DVI-I-2 that is connected. Maybe this needs a fix (an bugreport) somewhere else?

I am unable to test with analog cables right now, as I am lacking DVI->VGA convertors. I have one, and should be able to find a 2nd one somewhere, but that will be for later. If you need any other info meanwhile ...

And thanks for looking into this!
Comment 6 Marcin Slusarz 2013-02-09 20:11:56 UTC
Created attachment 92811 [details]
quirk v2

This patch should give you "correct" output numbers (although it's a cosmetic issue and should not matter).
Comment 7 Stijn Tintel 2013-02-09 22:09:53 UTC
The 2nd patch seems to give the same behaviour as the 1st patch. And I do not entirely agree it is only a cosmetic issue.

With nvidia.ko, I use an Xorg.conf just with the Device section to have X use the proprietary driver. There are no screen or serverlayout sections, and I let kwin configure my monitors. With nouveau, I use no Xorg.conf at all, because X autodetects the nouveau driver. The difference with the nouveau driver is that even when I save the monitor layout in the KDE settings, when I log out and back in, the settings are forgotten. I would call that a KDE/kwin bug, but this does not happen with the proprietary driver.
Comment 8 Stijn Tintel 2013-02-09 22:37:26 UTC
Meanwhile I went up the attick to get me a 2nd DVI->VGA convertor.

With your 2nd patch applied without modifications, and using VGA cables, the monitor on the right (DVI connector 2 on the card) is used by nouveaufb as soon as it's loaded. This is wrong. In KDE and xrandr however it is recognized as DVI-I-2, which seems correct.

With your 2nd patch, "#if 0" changed into "#if 1", and using VGA cables, the monitor on the left (DVI connector 1 on the card) is used by nouveaufb as soon as it's loaded. This is good. KDE and xrandr recognize it as DVI-I-2 though, while it should be DVI-I-1.

Do you want me to test your first patch as well, with "#if 0" changed into "#if 1"?
Comment 9 Marcin Slusarz 2013-02-11 22:12:35 UTC
Yes, please do it. I think it will fix all issues (both VGA and DVI setups will work and output numbering will be correct).
Comment 10 Stijn Tintel 2013-02-12 12:54:22 UTC
Unfortunately with the first patch and #if 0 -> #if 1 nouveau and X start on the 2nd monitor again (with DVI cables). shall I test with vga cables again too ?
Comment 11 Marcin Slusarz 2013-02-12 21:36:52 UTC
Created attachment 93171 [details]
quirk v3

maybe this one?
Comment 12 Stijn Tintel 2013-02-13 00:53:57 UTC
Still not good, the 2nd monitor is initialized first, both by nouveaufb and X. It is recognized as DVI-I-2 though.
Comment 13 Stijn Tintel 2021-12-08 09:47:51 UTC
Not sure if this is still an issue, and as I no longer own the card, I'll just close this.

Note You need to log in before you can comment on or make changes to this bug.