Bug 55556 - [965GM SDVO HDMI regression] no video on external monitor without audio
Summary: [965GM SDVO HDMI regression] no video on external monitor without audio
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: Daniel Vetter
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-02 23:14 UTC by Charles Lahaine
Modified: 2017-07-24 23:00 UTC (History)
5 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Xorg log file (35.64 KB, text/plain)
2012-10-02 23:14 UTC, Charles Lahaine
no flags Details
dmesg output (56.28 KB, text/plain)
2012-10-02 23:18 UTC, Charles Lahaine
no flags Details
intel_reg_dumper output (11.05 KB, text/plain)
2012-10-02 23:19 UTC, Charles Lahaine
no flags Details
VBIOS dump (64.00 KB, application/octet-stream)
2012-10-02 23:20 UTC, Charles Lahaine
no flags Details
dmesg with drm.debug=0xe (122.86 KB, text/plain)
2012-10-04 07:43 UTC, Charles Lahaine
no flags Details
Bad commit, full description (4.49 KB, text/plain)
2012-10-12 02:44 UTC, Charles Lahaine
no flags Details
git bisect log output (2.54 KB, text/plain)
2012-10-12 02:51 UTC, Charles Lahaine
no flags Details
clear the entire infoframe buffer (4.24 KB, patch)
2012-10-18 22:12 UTC, Daniel Vetter
no flags Details | Splinter Review
Patch to set HDMI audio pins on constantly (3.00 KB, patch)
2012-12-14 09:29 UTC, Takashi Iwai
no flags Details | Splinter Review

Description Charles Lahaine 2012-10-02 23:14:51 UTC
Created attachment 68010 [details]
Xorg log file

When I plug my Gateway laptop's HDMI output to a Sony Bravia LED TV (or any other TV), the TV screen shows no video, neither on boot nor on log in, and even though it's getting a signal, it shows an "incompatible signal" message no matter which mode is set by desktop.

External monitor stays blank *unless* audio is played through HDMI either from media file or from system sound, then desktop momentarily appears on screen but as soon as sound stops, monitor gets back to blank state (incompatible signal). So the only way to use external monitor is to keep sending an audio signal through HDMI port.

External monitor via HDMI used to work just fine under kernel branch 3.0, only issue was this branch doesn't have intel backlight patch. HDMI output stopped working nice from kernel 3.2 onwards. Only workaround is to open a flash player in web browser and desktop will show up as long as flash player is kept open even if paused.

-System environment:
  Chipset: 965GM
  System architecture: x86_64
  xf86-video-intel: 2.19.0
  xserver: 1.12.1.902
  mesa: 8.0.3
  libdrm: 2.4.33
  kernel: 3.2.0-3-amd64
  Linux distribution: LMDE UP5
  Machine model: Gateway M-6804m
  Display connector: HDMI

-Reproducing steps:
 1. Plug HDMI connector to external monitor (TV)
 2. TV screen is blank, says incompatible signal
 3. Play a sound via HDMI port
 4. TV screen shows desktop
 5. Sound stops playing
 6. TV screen gets blank again

-Additional info:
 ·Same behavior on any digital TV/external monitor
 ·Started somewhere between branches 3.0 and 3.2
 ·Internal monitor has no problem.
 ·All log files with TV plugged to laptop
 ·Tested kernels:
  a) Work OK: 3.0.24
  b) Don't work: 3.2.30, 3.4.11, 3.5.4, 3.6-rc7
Comment 1 Charles Lahaine 2012-10-02 23:18:37 UTC
Created attachment 68012 [details]
dmesg output
Comment 2 Charles Lahaine 2012-10-02 23:19:35 UTC
Created attachment 68013 [details]
intel_reg_dumper output
Comment 3 Charles Lahaine 2012-10-02 23:20:35 UTC
Created attachment 68014 [details]
VBIOS dump
Comment 4 Daniel Vetter 2012-10-03 07:25:53 UTC
Can you please attach dmesg with drm.debug=0xe added to your kernel cmdline?
Comment 5 Charles Lahaine 2012-10-04 07:43:42 UTC
Created attachment 68067 [details]
dmesg with drm.debug=0xe
Comment 6 Daniel Vetter 2012-10-04 07:54:57 UTC
I've quickly looked through the relevant sdvo/hdmi commits between 3.0 and 3.2 and couldn't find anything that would explain this. Can you please attempt to bisect this regression?
Comment 7 Charles Lahaine 2012-10-04 09:34:47 UTC
Of course, as soon as I have some time. I'm still learning to git-bisect and I have yet to find the exact kernel version which introduced the regression for the first time.
Comment 8 Charles Lahaine 2012-10-09 00:49:16 UTC
Confirmed, this regression started right in kernel 3.1.0, so I started to git-bisect like this:

[good] v3.0.44
[bad]  v3.1

I'll report back the results as soon as the bisecting process finishes.
Comment 9 Charles Lahaine 2012-10-12 02:44:04 UTC
Created attachment 68467 [details]
Bad commit, full description

I've finally found the culprit, according to git-bisect this is the bad commit:

384a48d71520ca569a63f1e61e51a538bedb16df is the first bad commit
commit 384a48d71520ca569a63f1e61e51a538bedb16df
Author: Stephen Warren <swarren@nvidia.com>
Date:   Wed Jun 1 11:14:21 2011 -0600

    ALSA: hda: HDMI: Support codecs with fewer cvts than pins
    Signed-off-by: Stephen Warren <swarren@nvidia.com>
    Signed-off-by: Takashi Iwai <tiwai@suse.de>

So it's not a drm/i915 related issue but an alsa/hda related one.

Regressions concerning this commit were reported, but none of the reports describe the same behavior as my machine's. Should I submit a new bug report?
Comment 10 Charles Lahaine 2012-10-12 02:51:49 UTC
Created attachment 68468 [details]
git bisect log output
Comment 11 Charles Lahaine 2012-10-12 03:03:07 UTC
Comment on attachment 68012 [details]
dmesg output

Made obsolete by dmesg with drm.debug=0xe
Comment 12 Daniel Vetter 2012-10-18 22:12:56 UTC
Created attachment 68767 [details] [review]
clear the entire infoframe buffer

Can you please test this patch?
Comment 13 Charles Lahaine 2012-10-23 00:44:06 UTC
Patch tested on clone of Linus' kernel tree (v3.7.0-rc2). It didn't work, there is still the same odd behavior: no video on external monitor except when an application plays audio via HDMI. Let me know if you need extra info.
Comment 14 Jesse Barnes 2012-12-12 19:08:28 UTC
Takashi, do you have any ideas about this?
Comment 15 Takashi Iwai 2012-12-12 19:21:17 UTC
Hmm.... It's obviously a change only to HD-audio codec, and I see no link how it affects the video output.

Maybe the SVDO HDMI is enabled only when the audio codec's pin is turned on by some reason?  The recent HD-audio HDMI driver sets the audio pin only when used.

If this is the case, try the following:

- get hda-verb program (described in Documentation/sound/alsa/HD-Audio.txt)

- build the kernel with CONFIG_SND_HDA_HWDEP=y

- check the codec number of HDMI codecs; you can find /proc/asound/card*/codec#* files, and one of them must contain "HDMI" codec name.  The number after '#' is the codec address.

- Check "Pin" widget nodes.  The codec#* proc file contains the list of widgets, and some of them must be pin widgets, e.g. 0x03.

- Run the command to each pin widget like below:
   hda-verb /dev/snd/hwC0D3 0x03 SET_PIN_WID 0x40

  where /dev/snd/hwC0D3 is the hwdep device corresponding to card0/codec#3.
  The second argument (0x03) is the pin widget NID to apply.
Comment 16 Takashi Iwai 2012-12-14 09:28:50 UTC
Or if you prefer patching the kernel, try the patch below.

It stopped flickering on another machine, at least.
   https://bugzilla.kernel.org/show_bug.cgi?id=51421
Comment 17 Takashi Iwai 2012-12-14 09:29:59 UTC
Created attachment 71493 [details] [review]
Patch to set HDMI audio pins on constantly
Comment 18 Charles Lahaine 2012-12-16 11:14:07 UTC
(In reply to comment #15)
> Hmm.... It's obviously a change only to HD-audio codec, and I see no link
> how it affects the video output.
> 
> Maybe the SVDO HDMI is enabled only when the audio codec's pin is turned on
> by some reason?  The recent HD-audio HDMI driver sets the audio pin only
> when used.
> 
> If this is the case, try the following:
> 
> - get hda-verb program (described in Documentation/sound/alsa/HD-Audio.txt)
> 
> - build the kernel with CONFIG_SND_HDA_HWDEP=y
> 
> - check the codec number of HDMI codecs; you can find
> /proc/asound/card*/codec#* files, and one of them must contain "HDMI" codec
> name.  The number after '#' is the codec address.
> 
> - Check "Pin" widget nodes.  The codec#* proc file contains the list of
> widgets, and some of them must be pin widgets, e.g. 0x03.
> 
> - Run the command to each pin widget like below:
>    hda-verb /dev/snd/hwC0D3 0x03 SET_PIN_WID 0x40
> 
>   where /dev/snd/hwC0D3 is the hwdep device corresponding to card0/codec#3.
>   The second argument (0x03) is the pin widget NID to apply.

Finally, it worked! I ran the command

    hda-verb /dev/snd/hwC0D2 0x03 SET_PIN_WID 0x40

and that solved the problem, and I suppose the patch to set pins on should also work. Thank you so much, Takashi.

Will that patch be committed in future kernel releases? Or will patching kernel be needed every time a new one is released in order to make the fix permanent?

Regards, Charles.
Comment 19 Takashi Iwai 2012-12-17 15:17:17 UTC
Good to hear.  The patch was already queued to sound git tree, and will be included in 3.8-rc1 in this week.  Then it'll be eventually backported to stable kernels.
Comment 20 Daniel Vetter 2012-12-18 10:55:36 UTC
Takashi, can you please add a git commit citation here for the sound patch and close the bug?

Thanks, Daniel
Comment 21 Takashi Iwai 2012-12-18 11:00:19 UTC
The commit ID is included in the attached patch :)

commit 6169b673618bf0b2518ce413b54925782a603f06
Author: Takashi Iwai <tiwai@suse.de>
Date:   Fri Dec 14 10:22:35 2012 +0100

    ALSA: hda - Always turn on pins for HDMI/DP
Comment 22 Daniel Vetter 2012-12-18 11:02:09 UTC
On Tue, Dec 18, 2012 at 12:00 PM,  <bugzilla-daemon@freedesktop.org> wrote:
> --- Comment #21 from Takashi Iwai <tiwai@suse.de> ---
> The commit ID is included in the attached patch :)

Ah, didn't notice that it's the patch which goes upstream - usually I
attach random patches from random trees, so the sha1 will be totally
different when merged.

Thanks, Daniel
Comment 23 Charles Lahaine 2012-12-18 14:45:47 UTC
It's good to know the patch will be backported to stable kernels in the future. Thanks to you all guys for helping to solve this issue.

Regards, Charles.


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.