Bug 101302 - [HSW] no Intel HDMI video output with kernel 4.4 and 4.9
Summary: [HSW] no Intel HDMI video output with kernel 4.4 and 4.9
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: high major
Assignee: anusha
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard: ReadyForDev
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-05 14:26 UTC by stef@zechner77.de
Modified: 2019-02-27 13:33 UTC (History)
4 users (show)

See Also:
i915 platform: HSW
i915 features: display/HDMI


Attachments
dmesg output (28.52 KB, application/gzip)
2017-06-18 13:03 UTC, stef@zechner77.de
no flags Details
dmesg output: monitor connected to HDMI is working (26.81 KB, application/gzip)
2017-06-25 18:22 UTC, stef@zechner77.de
no flags Details
dmesg output (166.73 KB, text/plain)
2017-09-28 09:28 UTC, Jani Nikula
no flags Details
dmesg output: monitor connected to HDMI is working (139.57 KB, text/plain)
2017-09-28 09:28 UTC, Jani Nikula
no flags Details
dmesg output: picking bpc to 8 for HDMI output (25.16 KB, application/gzip)
2017-09-28 18:00 UTC, stef@zechner77.de
no flags Details
dmesg output: picking bpc to 8 for HDMI output (138.36 KB, text/plain)
2017-10-02 07:48 UTC, Jani Nikula
no flags Details

Description stef@zechner77.de 2017-06-05 14:26:16 UTC
Hi,

after kernel upgrade to 4.9 (Debian 9) I don't get any video signal for my onboard Intel HDMI output any more.
Grub menu and the first few seconds after loading the kernel are fine, but HDMI output is blanked at the time the console font size is changing and xorg is starting.
No issues with the monitor connected to DVI.

Loading old kernel 3.16 and everything is fine again.

System environment:
- Intel(R) Core(TM) i5-4570 CPU @ 3.20GHz (family: 0x6, model: 0x3c, stepping: 0x3)
- DMI: ASUS All Series/H87-PRO, BIOS 1101 03/03/2014

-- xserver-xorg-video-intel: 2:2.99.917+git20161206-1 
-- xserver: 1:7.7+19
-- mesa: 13.0.6-1+b2
-- libdrm: 2.4.74-1
-- kernel: 4.4 and 4.9
-- Linux distribution: Debian 9 and Ubuntu 16.04
-- Display connector: onboard HDMI

To check that this problem is not related to Debian 9, I installed Ubuntu 16.04 which is using kernel 4.4 and is shows the same issue. Old Ubuntu 14.04 with kernel 3.13 is ok again.
So I guess the HDMI output was screwed up for my system in the early versions of kernel 4.x

I don't see any related error messages (dmesg and xorg log)

BR
Stefan
Comment 1 krisman 2017-06-13 17:51:46 UTC
Can you boot with drm.debug=0xe and provide the full dmesg?  Also, please try the drm-intel-nightly branch to confirm it has not been fixed upstream already.
Comment 2 Elizabeth 2017-06-14 19:52:21 UTC
I'm changing the status to "NEEDINFO". Please, once you provide more information change the tag from "NEEDINFO" to "REOPEN". Thank you.
Comment 3 stef@zechner77.de 2017-06-18 13:03:42 UTC
Created attachment 132026 [details]
dmesg output

I compiled latest drm-intel-nightly (SHA 18d562c9) and still get no image.

I also attached the full dmesg output with "drm.debug=0xe log_buf_len=4M"
Comment 4 krisman 2017-06-19 13:52:35 UTC
(In reply to stef@zechner77.de from comment #3)
> Created attachment 132026 [details]
> dmesg output
> 
> I compiled latest drm-intel-nightly (SHA 18d562c9) and still get no image.
> 
> I also attached the full dmesg output with "drm.debug=0xe log_buf_len=4M"

Thanks for the information,

There are 3 things that caught my attention in your log:

1) The hotplug task is triggering every few seconds and (apparently) successfully detecting the monitor attached to HDMI-A-3 every time.

2) After each detection, errors like this occur:

 [drm:intel_engine_cmd_parser [i915]] CMD: Rejected register 0x00002360 in command: 0x11000001 (rcs0)
[   50.339786] [drm:intel_engine_cmd_parser [i915]] CMD: Rejected register 0x00002360 in command: 0x11000001 (rcs0)

3) Finally, we have:

 [drm:intel_prepare_plane_fb [i915]] failed to pin object

Which doesn't seem related to the rest.  

Since the monitor is identified and the connector modes are successfully probed,  I want to start by figuring out what made the register value to be rejected.
Comment 5 stef@zechner77.de 2017-06-21 20:56:19 UTC
thanks for investigating.

Please let me know if you want me to patch or modify anything in the sources to pin down this issue.

BTW.: The HDMI device is a 5 years old Samsung Video Beamer and the only special configuration in this computer might be the two satellite TV cards (DVB-S2)
Comment 6 krisman 2017-06-22 04:32:57 UTC
(In reply to krisman from comment #4)

> 2) After each detection, errors like this occur:
> 
>  [drm:intel_engine_cmd_parser [i915]] CMD: Rejected register 0x00002360 in
> command: 0x11000001 (rcs0)
> [   50.339786] [drm:intel_engine_cmd_parser [i915]] CMD: Rejected register
> 0x00002360 in command: 0x11000001 (rcs0)

So, if I'm not mistaken, this is oacontrol and it is expected to fail.  It is not related.
Comment 7 stef@zechner77.de 2017-06-25 18:22:55 UTC
Created attachment 132235 [details]
dmesg output: monitor connected to HDMI is working

I just tried to connect my LG monitor to HDMI output.
And I was surprised that it is working well. (see attachment dmesg_monitor_short_txt.gz)

So it seems to be an issue with Intel HDMI output and my Video Beamer "Samsung SP-A600XB".
Anyhow I also connected the HDMI beamer solely (no additional monitor) and the image disappeared during Linux boot like previously described.

Anybody has an idea what may be different between beamer and monitor? And how I can fix this with the latest kernel?

thanks
Stefan
Comment 8 Elizabeth 2017-07-20 16:38:30 UTC
Adding tag into "Whiteboard" field - ReadyForDev
*Status is correct
*Platform is included
*Feature is included
*Priority and Severity correctly set
*Logs included
Comment 9 sebastian kerckhof 2017-09-26 14:27:13 UTC
Any update on this? We've been experiencing the same issue with some Philips displays on kernal 4.9 (debian stretch)
Comment 10 Jani Nikula 2017-09-27 14:46:01 UTC
A shot in the dark, please try this debug patch on top of drm-tip:

diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index e6f8f30ce7bd..af309a6efb26 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -1547,6 +1547,8 @@ intel_hdmi_dp_dual_mode_detect(struct drm_connector *connector, bool has_edid)
 		}
 	}
 
+	type = DRM_DP_DUAL_MODE_TYPE1_DVI;
+
 	if (type == DRM_DP_DUAL_MODE_NONE)
 		return;
Comment 11 stef@zechner77.de 2017-09-27 20:25:35 UTC
thanks Jani,

I tried 4.14.0-rc2+ from branch drm-intel-nightly and your line makes the difference.
Comment 12 Jani Nikula 2017-09-28 09:11:43 UTC
Cc: Ville, he probably has some idea.
Comment 13 Jani Nikula 2017-09-28 09:28:24 UTC
Created attachment 134527 [details]
dmesg output
Comment 14 Jani Nikula 2017-09-28 09:28:54 UTC
Created attachment 134528 [details]
dmesg output: monitor connected to HDMI is working
Comment 15 Jani Nikula 2017-09-28 09:29:45 UTC
Please *always* attach files unpacked.
Comment 16 Jani Nikula 2017-09-28 10:08:43 UTC
(In reply to Jani Nikula from comment #10)
> +	type = DRM_DP_DUAL_MODE_TYPE1_DVI;

That really was a shot in the dark, and shouldn't really have made a difference... but I guess it works by forcing 165 MHz max clock, and therefore 8 bpc instead of 12 bpc. That's all I can think of. 12 bpc leads to 222.75 MHz clock which is pretty close to the 225 MHz limit.

So throw the old debug patch away, and try instead:

diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index e6f8f30ce7bd..5c99189e9ccf 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -1463,7 +1463,9 @@ bool intel_hdmi_compute_config(struct intel_encoder *encoder,
 
 		/* Need to adjust the port link by 1.5x for 12bpc. */
 		pipe_config->port_clock = clock_12bpc;
-	} else {
+	}
+
+	if (true) {
 		DRM_DEBUG_KMS("picking bpc to 8 for HDMI output\n");
 		desired_bpp = 8*3;
 

or alternatively set the "audio" property to "force-dvi" on the connector.

Please attach dmesg on the try.
Comment 17 stef@zechner77.de 2017-09-28 18:00:35 UTC
Created attachment 134552 [details]
dmesg output: picking bpc to 8 for HDMI output
Comment 18 stef@zechner77.de 2017-09-28 18:02:54 UTC
Hi Jani,

tried your new patch and it is working again.

I uploaded: dmesg_2017_09_28.txt.gz

it's compressed because of the 32k file size limit
Comment 19 krisman 2017-10-02 05:36:08 UTC
(In reply to stef@zechner77.de from comment #18)
> Hi Jani,
> 
> tried your new patch and it is working again.

Jani, reassigning to you since the patch fixes the issue.
Comment 20 Jani Nikula 2017-10-02 07:48:55 UTC
Created attachment 134614 [details]
dmesg output: picking bpc to 8 for HDMI output
Comment 21 Jani Nikula 2017-10-02 07:52:38 UTC
(In reply to krisman from comment #19)
> Jani, reassigning to you since the patch fixes the issue.

Sorry, I'm not taking it on. That was just a quick hack debug patch to prove a theory. It brings us one step closer to finding out what the problem is, but I have no idea what the fix should be. That patch is not the fix.
Comment 22 Jani Nikula 2017-10-02 09:02:34 UTC
(In reply to stef@zechner77.de from comment #18)
> it's compressed because of the 32k file size limit

There shouldn't be such a limit here. I hear it should be more like 4 MB limit.
Comment 23 stef@zechner77.de 2017-10-05 18:10:59 UTC
but do you have a workaround for me like setting a kernel parameter?

So that I can run the latest Debian kernel without recompiling.
Comment 24 stef@zechner77.de 2018-01-07 10:31:43 UTC
Hi,

here is the values in function intel_hdmi_compute_config() for the HDMI device:

pipe_config->pipe_bpp: 36
pipe_config->has_hdmi_sink: 1
hdmi_port_clock_valid(intel_hdmi, clock_12bpc, true): 0
hdmi_12bpc_possible(pipe_config): 1

anything suspicious? What do you need to go on?
Comment 25 Jani Saarinen 2018-03-29 07:11:26 UTC
First of all. Sorry about spam.
This is mass update for our bugs. 

Sorry if you feel this annoying but with this trying to understand if bug still valid or not.
If bug investigation still in progress, please ignore this and I apologize!

If you think this is not anymore valid, please comment to the bug that can be closed.
If you haven't tested with our latest pre-upstream tree(drm-tip), can you do that also to see if issue is valid there still and if you cannot see issue there, please comment to the bug.
Comment 26 Jani Saarinen 2018-05-08 06:43:00 UTC
Closing, please re-open if occurs again.
Comment 27 stef@zechner77.de 2018-05-14 19:59:27 UTC
problem still exists
Comment 28 Jani Nikula 2018-05-17 15:12:01 UTC
Ville should look at this.
Comment 29 Ville Syrjala 2018-05-17 15:53:21 UTC
8bpc vs. 12bpc eh? Which probably means there's a broken component somewhere in the signal path. Could be the level shifters in the source, cable, dongle, or the monitor itself.

The workaround I've been suggesting is to add a knob for the user to limit the color depth. The problem for cases like this where there is no output (as opposed to just glitchy output) is that a connector property would have to be changed by the user blind. The alternatives would be to change the default to 8bpc, or add a modparam (or something like it) to force the 8bpc already when the driver loads. Hmm. Maybe we should extend the "awesome" video= cmdline syntax a bit?
Comment 30 Piotr Wrzeciono 2018-07-17 19:39:24 UTC
I have ASUS Zenbook UX303U. This laptop has Intel i7-6500 CPU @2.5GHz, 12GB RAM, and the integrated graphics card. 
It's running under OpenSUSE 15.0 (kernel 4.17.7). Some time ago, I used OpenSUSE 42.3 with kernel 4.3 and HDMI worked fine with every my devices, e.g., TV set, monitor LCD, and projector.

After installing  Leap 15.0, the HDMI output works only with monitor LG LG FLATRON IPS234V-PN. The other devices (projector ACER H6518BD and TV set PANASONIC VIERA TX-42AS650E) aren't connecting to HDMI in my notebook.

On the other hand, if I try to connect the projector or the TV set after working with LG monitor, I observed that the settings of video outputs (xrandr) returned to the default states (disconnected).

I think that it is still the same issue as in the 4.4 kernel.
Comment 31 James Ausmus 2018-08-21 00:55:35 UTC
Anusha - what are the next steps here?
Comment 32 anusha 2018-09-11 16:55:30 UTC
@james(In reply to James Ausmus from comment #31)
> Anusha - what are the next steps here?


James, let me reproduce this on HSW. There could be some PLL calculation that we are doing wrong.
Comment 33 anusha 2018-09-20 18:59:22 UTC
(In reply to stef@zechner77.de from comment #23)
> but do you have a workaround for me like setting a kernel parameter?
> 
> So that I can run the latest Debian kernel without recompiling.
I could not reproduce the issue. But,

Can you try this 2 patch series https://patchwork.freedesktop.org/patch/251249/
and https://patchwork.freedesktop.org/patch/251248/ ?

It seems to be addressing your issue.
Comment 34 stef@zechner77.de 2018-12-21 08:04:19 UTC
(In reply to anusha from comment #33)
> Can you try this 2 patch series
> https://patchwork.freedesktop.org/patch/251249/
> and https://patchwork.freedesktop.org/patch/251248/ ?

and to which kernel version do I have to apply these patches?
Tried 4.9 and 4.19 and both don't even have a file drm_atomic_uapi.c
Comment 35 stef@zechner77.de 2018-12-21 12:02:49 UTC
Understood. I need the mainline.
Tried 4.20.0-rc7 with the two patches but it stops booting after 5s with several ACPI device range conflicts.
I will try again after some time when the kernel is more stable.
Comment 36 stef@zechner77.de 2019-01-03 11:36:46 UTC
Meanwhile the max_bpc patch reached the kernel master branch and brings back my beamer:
xrandr --output HDMI-3 --set "max bpc" 8

Thus issue is solved by future kernel v4.21
Comment 37 Lakshmi 2019-02-27 13:33:36 UTC
(In reply to stef@zechner77.de from comment #36)
> Meanwhile the max_bpc patch reached the kernel master branch and brings back
> my beamer:
> xrandr --output HDMI-3 --set "max bpc" 8
> 
> Thus issue is solved by future kernel v4.21

Closing this bug. Please reopen if this issue appers on drmtip.
(https://cgit.freedesktop.org/drm-tip)


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.