Bug 82829 - [hsw Color] Intel Haswell GPU HD4400 has wrong color management on external screen
Summary: [hsw Color] Intel Haswell GPU HD4400 has wrong color management on external s...
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: XOrg git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Ville Syrjala
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-19 22:07 UTC by timshel
Modified: 2017-07-24 22:52 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
dmesg with drm.debug=0x0e of monitor with wrong colors (46.80 KB, text/plain)
2014-08-19 22:07 UTC, timshel
no flags Details
dmesg with drm.debug=0x0e of monitor with correct colors (46.45 KB, text/plain)
2014-08-19 22:08 UTC, timshel
no flags Details
xrandr --verbose of monitor with wrong colors (7.00 KB, text/plain)
2014-08-19 22:08 UTC, timshel
no flags Details
Xorg.0.log of monitor with wrong colors (28.21 KB, text/plain)
2014-08-19 22:09 UTC, timshel
no flags Details
Xorg.0.log of monitor with correct colors (21.93 KB, text/plain)
2014-08-19 22:10 UTC, timshel
no flags Details

Description timshel 2014-08-19 22:07:09 UTC
Created attachment 104922 [details]
dmesg with drm.debug=0x0e of monitor with wrong colors

I have a weird graphic issue that if I connect my laptop to my external screen, a Samsung PX2370, the colors on the external one have a low contrast and it looks like if the gamma value is way to high. Black is grey and so on.

This happens independently if I use a VGA or digital connection via Displayport.

In grub 2 and before KMS is started the background is in regular black but as soon as KMS starts the backrgound becomes grey. If I disable KMS via the kernel parameter "nomodeset" the booting shows normal contrast until X is started, then everything is in low contrast again.

If I connect my laptop to another monitor the issue doesn't happen.

But the PX2370 can't be the only source of the issue since I never had this problem before with my previous laptop and if I connect another PC to the PX2370 and boot the same distribution the colors are also normal.

I am using openSUSE Factory with the following versions:

xf86-video-intel-2.99.914-1.1.x86_64
xorg-x11-server-7.6_1.16.0-4.1.x86_64
Mesa-10.2.5-89.1.x86_64
kernel-desktop-3.16.0-1.1.x86_64

My laptop is a T440s with a i7-4600U.

Let me know, if you need any additional information.
Comment 1 timshel 2014-08-19 22:08:04 UTC
Created attachment 104923 [details]
dmesg with drm.debug=0x0e of monitor with correct colors

These are only the drm messages.
Comment 2 timshel 2014-08-19 22:08:51 UTC
Created attachment 104924 [details]
xrandr --verbose of monitor with wrong colors
Comment 3 timshel 2014-08-19 22:09:30 UTC
Created attachment 104925 [details]
Xorg.0.log of monitor with wrong colors
Comment 4 timshel 2014-08-19 22:10:04 UTC
Created attachment 104926 [details]
Xorg.0.log of monitor with correct colors
Comment 5 timshel 2014-09-15 16:22:05 UTC
The screen is even flickering every few seconds as if the frequency is too low or something,.
Comment 6 Jani Nikula 2014-09-16 07:25:12 UTC
Shot in the dark, try setting the Broadcast RGB property to Full on DP2.
Comment 7 Jani Nikula 2014-09-16 08:03:34 UTC
I'd also be interested in dmesg with drm.debug=0xe running this patch on top of drm-intel-nightly.

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 9c0ebf62c0cc..929fde9e5f6a 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -3744,6 +3744,10 @@ intel_dp_get_dpcd(struct intel_dp *intel_dp)
                                    DP_MAX_DOWNSTREAM_PORTS) < 0)
                return false; /* downstream port status fetch failed */
 
+       DRM_DEBUG_KMS("DPCD downstream ports: %*ph\n",
+                     (int) sizeof(intel_dp->downstream_ports),
+                     intel_dp->downstream_ports);
+
        return true;
 }
Comment 8 timshel 2014-09-16 20:22:53 UTC
Many thanks, running `xrandr --output DP2 --set "Broadcast RGB" Full` seems to fix the issue for the session.
Finally colors look proper again on Linux.

Do you still need the debug messages with the patch applied? If so I will try to set this up tomorrow.
Comment 9 Jani Nikula 2014-09-17 10:58:54 UTC
We do this with Broadcast RGB Automatic because DPv1.2 says, "When a Source device is transmitting a RGB stream with a video timing format called out in CEA-861C Section 5 as using CEA range RGB, it must use the CEA range RGB."

However it also says, "However, a Source device may transmit all code values from zero to the maximum even when it declares the CEA range in the Main Stream Attributes. It is the responsibility of the Sink device to limit the pixel value
range as needed."

I wonder if we could do that. Ville?
Comment 10 Jani Nikula 2014-09-17 11:00:10 UTC
I'm inclined to close this as something along the lines of INVALID or WONTFIX.
Comment 11 timshel 2014-09-17 22:00:21 UTC
I didn't had the issue with the same monitor and my old laptop, which had a i5-M520 (first generation core i).

So it is not just the monitor. I have also seen a similar report with an Intel graphic card: https://lists.fedoraproject.org/pipermail/users/2013-June/436691.html
Comment 12 timshel 2014-09-17 22:01:33 UTC
Just for the records I had the same issue with the analog output.
Comment 13 Jani Nikula 2014-09-18 10:22:02 UTC
One for Ville to clarify.
Comment 14 Ville Syrjala 2014-09-18 10:39:58 UTC
(In reply to comment #9)
> We do this with Broadcast RGB Automatic because DPv1.2 says, "When a Source
> device is transmitting a RGB stream with a video timing format called out in
> CEA-861C Section 5 as using CEA range RGB, it must use the CEA range RGB."
> 
> However it also says, "However, a Source device may transmit all code values
> from zero to the maximum even when it declares the CEA range in the Main
> Stream Attributes. It is the responsibility of the Sink device to limit the
> pixel value
> range as needed."
> 
> I wonder if we could do that. Ville?

My interpretation of the latter clause is that the source is allowed to include "invalid" pixel values in the data and the sink must be ready to receive them and clamp them to the limited range. So if we would send full range data and tell the sink it's limited range the sink will just clamp it and you get the "crushed blacks" syndrome.

I really wonder how so many display get away with ignoring the spec. I can only assume that the compliance tests don't check for this issue, and thus you can get the DP sticker on your product even if it doesn't do as the spec says.
Comment 15 timshel 2014-11-03 09:10:50 UTC
Did something change recently with Kernel 3.17.1 in relation to this issue?
I had installed 3.16 before and after every restart I had to run `xrandr --output DP2 --set "Broadcast RGB" Full` to get regular colors.

Now after the new Kernel was installed and I rebooted the command had no effect and the colors looked normal from the beginning.

Marking it as resolved for now unless it randomly pop ups again. Thanks.


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.