Bug 42484 - Sandy Bridge does not correctly drive dual heads (DVI & HDMI)
Summary: Sandy Bridge does not correctly drive dual heads (DVI & HDMI)
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: low normal
Assignee: Daniel Vetter
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-01 11:26 UTC by Rogan Dawes
Modified: 2017-07-24 23:03 UTC (History)
7 users (show)

See Also:
i915 platform:
i915 features:


Attachments
intel_reg_dump of a working configuration (11.41 KB, text/plain)
2011-11-01 11:27 UTC, Rogan Dawes
no flags Details
intel_reg_dump of a non-working configuration (11.41 KB, text/plain)
2011-11-01 11:28 UTC, Rogan Dawes
no flags Details
xrandr --verbose of a working configuration (17.13 KB, text/plain)
2011-11-01 11:28 UTC, Rogan Dawes
no flags Details
xrandr --verbose of a non-working configuration (8.56 KB, text/plain)
2011-11-01 11:29 UTC, Rogan Dawes
no flags Details

Description Rogan Dawes 2011-11-01 11:26:08 UTC
I have an Asus P8Z68 motherboard, with an Intel 2500k CPU, and no additional graphics hardware.

I have a Samsung T260 connected to the HDMI output of the motherboard, and a Dell 2007WFP connected to the DVI output. The BIOS successfully displays at boot on both screens. However, when the OS takes over, the Dell displays an error message indicating that the screen is being driven at settings outside of its acceptable range.

It is possible to get both screens working (under Ubuntu Oneiric), by turning off the Dell monitor using the Displays control panel, then cancelling the change when the control panel asks if the display is correctly set. Upon reverting to the "previous settings", the Dell display is correctly initialised, and both screens can be used.

It appears from initial observation of the differences in xrandr --verbose that the active CRTC seems to play a role. They appear to be swapped between working and non-working configurations. This is also reflected in the intel_reg_dumper output, I think.
Comment 1 Rogan Dawes 2011-11-01 11:27:22 UTC
Created attachment 53012 [details]
intel_reg_dump of a working configuration
Comment 2 Rogan Dawes 2011-11-01 11:28:00 UTC
Created attachment 53013 [details]
intel_reg_dump of a non-working configuration
Comment 3 Rogan Dawes 2011-11-01 11:28:35 UTC
Created attachment 53014 [details]
xrandr --verbose of a working configuration
Comment 4 Rogan Dawes 2011-11-01 11:29:13 UTC
Created attachment 53015 [details]
xrandr --verbose of a non-working configuration
Comment 5 Daniel Vetter 2012-03-26 06:34:29 UTC
You can force a specific output on the xrandr cmdline by adding --crtc, e.g.

xrandr --output HDMI1 --auto --crtc 0

Can you try out whether this helps in any fashion?
Comment 6 Rogan Dawes 2012-03-26 06:48:57 UTC
On 2012/03/26 3:34 PM, bugzilla-daemon@freedesktop.org wrote:
> https://bugs.freedesktop.org/show_bug.cgi?id=42484
>
> --- Comment #5 from Daniel Vetter<daniel@ffwll.ch>  2012-03-26 06:34:29 PDT ---
> You can force a specific output on the xrandr cmdline by adding --crtc, e.g.
>
> xrandr --output HDMI1 --auto --crtc 0
>
> Can you try out whether this helps in any fashion?
>

Can I configure both at the same time?

Thanks

Rogan
Comment 7 Daniel Vetter 2012-03-26 07:05:47 UTC
> --- Comment #6 from Rogan Dawes <rogan@dawes.za.net> 2012-03-26 06:48:57 PDT ---
> > --- Comment #5 from Daniel Vetter<daniel@ffwll.ch>  2012-03-26 06:34:29 PDT ---
> > You can force a specific output on the xrandr cmdline by adding --crtc, e.g.
> >
> > xrandr --output HDMI1 --auto --crtc 0
> >
> > Can you try out whether this helps in any fashion?
> >
> 
> Can I configure both at the same time?

Yep, should work with

xrandr --output HDMI1 --auto --crtc 0 --output HDMI3 --auto --crtc 1
Comment 8 Rogan Dawes 2012-03-26 08:27:43 UTC
On 26/03/2012 16:05, bugzilla-daemon@freedesktop.org wrote:
> https://bugs.freedesktop.org/show_bug.cgi?id=42484
> 
> --- Comment #7 from Daniel Vetter <daniel@ffwll.ch> 2012-03-26 07:05:47 PDT ---
>> --- Comment #6 from Rogan Dawes <rogan@dawes.za.net> 2012-03-26 06:48:57 PDT ---
>>> --- Comment #5 from Daniel Vetter<daniel@ffwll.ch>  2012-03-26 06:34:29 PDT ---
>>> You can force a specific output on the xrandr cmdline by adding --crtc, e.g.
>>>
>>> xrandr --output HDMI1 --auto --crtc 0
>>>
>>> Can you try out whether this helps in any fashion?
>>>
>>
>> Can I configure both at the same time?
> 
> Yep, should work with
> 
> xrandr --output HDMI1 --auto --crtc 0 --output HDMI3 --auto --crtc 1
> 

I get:

$ xrandr --output HDMI1 --auto --crtc 0 --output HDMI3 --auto --crtc 1
xrandr: cannot find crtc for output HDMI1

I then tried:

$ xrandr --output HDMI3 --auto --crtc 0
$ xrandr --output HDMI3 --auto --crtc 1
xrandr: cannot find crtc for output HDMI1
$

Not entirely sure what that signifies?

Rogan
Comment 9 Daniel Vetter 2012-03-26 12:02:11 UTC
> --- Comment #8 from Rogan Dawes <rogan@dawes.za.net> 2012-03-26 08:27:43 PDT ---
> I get:
> 
> $ xrandr --output HDMI1 --auto --crtc 0 --output HDMI3 --auto --crtc 1
> xrandr: cannot find crtc for output HDMI1
> 
> I then tried:
> 
> $ xrandr --output HDMI3 --auto --crtc 0
> $ xrandr --output HDMI3 --auto --crtc 1
> xrandr: cannot find crtc for output HDMI1
> $
> 
> Not entirely sure what that signifies?

You might need to switch off the other output, then set the crtc of the
current one, then enable the other output. Due to lack of atomic modeset,
you sometimes need to tell the kernel/X explicitly in which order it needs
to reconfigure the displays to make it work.
Comment 10 Rogan Dawes 2012-04-15 07:24:26 UTC
On 2012/04/15 7:12 AM, bugzilla-daemon@freedesktop.org wrote:
> https://bugs.freedesktop.org/show_bug.cgi?id=42484
>
> Daniel Vetter<daniel@ffwll.ch>  changed:
>
>             What    |Removed                     |Added
> ----------------------------------------------------------------------------
>               Status|NEW                         |NEEDINFO
>

> You might need to switch off the other output, then set the crtc of the
> current one, then enable the other output. Due to lack of atomic modeset,
> you sometimes need to tell the kernel/X explicitly in which order it needs
> to reconfigure the displays to make it work.

Hi,

Sorry, I had not realised you were waiting on me for info.

So, I had tried the suggestions given in the previous emails, but had 
not been able to figure out how to execute the suggestion quoted above.

Unfortunately, I will only have access to that system in a week's time, 
so I will revert then.

Rogan
Comment 11 Daniel Vetter 2012-04-15 07:35:55 UTC
> --- Comment #10 from Rogan Dawes <rogan@dawes.za.net>
> So, I had tried the suggestions given in the previous emails, but had
> not been able to figure out how to execute the suggestion quoted above.

Ok, let me try to explain. The kernel/driver is too dumb to figure out
the correct order when switching crtcs between 2 active outputs, so
you have to help a bit by manually disabling one output before
switching the other, i.e.

xrandr --output HDMI1 --off
xrandr --output HDMI3 --crtc 0 --auto
xrandr --output HDMI1 --crtc 1 --auto

or therearbouts.
Comment 12 Rogan Dawes 2012-04-15 08:16:11 UTC
On 2012/04/15 9:35 AM, bugzilla-daemon@freedesktop.org wrote:
> https://bugs.freedesktop.org/show_bug.cgi?id=42484
>
> --- Comment #11 from Daniel Vetter<daniel@ffwll.ch>  2012-04-15 07:35:55 PDT ---
>> --- Comment #10 from Rogan Dawes<rogan@dawes.za.net>
>> So, I had tried the suggestions given in the previous emails, but had
>> not been able to figure out how to execute the suggestion quoted above.
>
> Ok, let me try to explain. The kernel/driver is too dumb to figure out
> the correct order when switching crtcs between 2 active outputs, so
> you have to help a bit by manually disabling one output before
> switching the other, i.e.
>
> xrandr --output HDMI1 --off
> xrandr --output HDMI3 --crtc 0 --auto
> xrandr --output HDMI1 --crtc 1 --auto
>
> or therearbouts.
>

Aha! Ok, got it.

I might be able to test this remotely, if I can get my wife to confirm 
whether the screen is displaying correctly or not.

Will revert shortly.

Thanks for the step-by-step instructions.
Comment 13 Rogan Dawes 2012-04-26 12:52:12 UTC
On 15/04/2012 16:35, bugzilla-daemon@freedesktop.org wrote:
> https://bugs.freedesktop.org/show_bug.cgi?id=42484
> 
> --- Comment #11 from Daniel Vetter <daniel@ffwll.ch> 2012-04-15 07:35:55 PDT ---
>> --- Comment #10 from Rogan Dawes <rogan@dawes.za.net>
>> So, I had tried the suggestions given in the previous emails, but had
>> not been able to figure out how to execute the suggestion quoted above.
> 
> Ok, let me try to explain. The kernel/driver is too dumb to figure out
> the correct order when switching crtcs between 2 active outputs, so
> you have to help a bit by manually disabling one output before
> switching the other, i.e.
> 
> xrandr --output HDMI1 --off
> xrandr --output HDMI3 --crtc 0 --auto
> xrandr --output HDMI1 --crtc 1 --auto
> 
> or therearbouts.

Hi,

I can confirm that the following commands correctly set up my display:

$ xrandr --output HDMI3 --off --output HDMI1 --off && \
  xrandr --output HDMI3 --crtc 0 --auto \
         --output HDMI1 --crtc 1 --auto --pos 1920x0 --right-of HDMI3

Does this imply that some change to the kernel driver will be required
in order to make this happen automatically?

Currently, if I log out, or switch user, or shut down, the old incorrect
configuration gets restored, and my second display (--HDMI1) goes out of
spec again.

Thanks for all the assistance so far!

Rogan
Comment 14 Daniel Vetter 2012-05-11 06:11:41 UTC
Ok, this sounds like we fail to properly clear a register bit somewhere, and depending upon which screen we're driving from which crtc, things fail horribly.

In the course of the interlace enabling work we've found a few such places, and especially with hdmi screens that could be it. Can you please retest on kernel v3.4-rc? If that does not help, I'll have to dig into the register dumps - but atm I'm swamped, so that might take some time.
Comment 15 Daniel Vetter 2012-08-22 15:50:11 UTC
Reporter seems to be awol, but given the symptoms I'm fairly confident that this is fixed on recent kernels. If this is still an issue for you, please reopen.


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.