PantherPoint HDMI - jack detection broken after suspend

Bug #1075882 reported by David Henningsson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Medium
David Henningsson
Precise
Won't Fix
Undecided
Unassigned
Quantal
Won't Fix
Undecided
Unassigned

Bug Description

We're seeing trouble with unsol events, i e detecting monitor
presence, especially when on battery and/or after suspend/resume.

This is a tracking bug, please do not triage.

Changed in linux (Ubuntu):
assignee: nobody → David Henningsson (diwic)
status: New → In Progress
Revision history for this message
David Henningsson (diwic) wrote : [RFC PATCH] ALSA: hda - Keep power link on for PantherPoint HDMI

On some of the PantherPoint HDMI machines we currently enable, we're seeing
trouble with unsol events, i e detecting monitor presence, especially when
on battery and after suspend/resume.

BugLink: https://bugs.launchpad.net/bugs/1075882
Tested-by: Cyrus Lien <email address hidden>
Signed-off-by: David Henningsson <email address hidden>
---
 sound/pci/hda/patch_hdmi.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

So far this is the workaround we have found to be working. Sometimes, it also
seems that "cat /proc/asound/cardx/codec#x" can also make the HDMI unsol event
trigger, so that the problem fixes itself.

We have not run any battery life tests to see if this causes more power consumption.

diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index 39ca100..3155267 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -1288,13 +1288,17 @@ static int hdmi_parse_codec(struct hda_codec *codec)
   }
  }

+#ifdef CONFIG_PM
+ /* We're seeing some problems with unsolicited hot plug events on
+ * PantherPoint after S3, if this is not enabled */
+ if (codec->vendor_id == 0x80862806)
+ codec->bus->power_keep_link_on = 1;
  /*
   * G45/IbexPeak don't support EPSS: the unsolicited pin hot plug event
   * can be lost and presence sense verb will become inaccurate if the
   * HDA link is powered off at hot plug or hw initialization time.
   */
-#ifdef CONFIG_PM
- if (!(snd_hda_param_read(codec, codec->afg, AC_PAR_POWER_STATE) &
+ else if (!(snd_hda_param_read(codec, codec->afg, AC_PAR_POWER_STATE) &
        AC_PWRST_EPSS))
   codec->bus->power_keep_link_on = 1;
 #endif
--
1.7.9.5

Revision history for this message
Takashi Iwai (tiwai) wrote :

At Wed, 7 Nov 2012 09:22:33 +0100,
David Henningsson wrote:
>
> On some of the PantherPoint HDMI machines we currently enable, we're seeing
> trouble with unsol events, i e detecting monitor presence, especially when
> on battery and after suspend/resume.
>
> BugLink: https://bugs.launchpad.net/bugs/1075882
> Tested-by: Cyrus Lien <email address hidden>
> Signed-off-by: David Henningsson <email address hidden>
> ---
> sound/pci/hda/patch_hdmi.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> So far this is the workaround we have found to be working. Sometimes, it also
> seems that "cat /proc/asound/cardx/codec#x" can also make the HDMI unsol event
> trigger, so that the problem fixes itself.
>
> We have not run any battery life tests to see if this causes more power consumption.

Looks safe at least, so I applied to for-next branch to give more
testing. If you find a better solution, let me know.

thanks,

Takashi

>
> diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
> index 39ca100..3155267 100644
> --- a/sound/pci/hda/patch_hdmi.c
> +++ b/sound/pci/hda/patch_hdmi.c
> @@ -1288,13 +1288,17 @@ static int hdmi_parse_codec(struct hda_codec *codec)
> }
> }
>
> +#ifdef CONFIG_PM
> + /* We're seeing some problems with unsolicited hot plug events on
> + * PantherPoint after S3, if this is not enabled */
> + if (codec->vendor_id == 0x80862806)
> + codec->bus->power_keep_link_on = 1;
> /*
> * G45/IbexPeak don't support EPSS: the unsolicited pin hot plug event
> * can be lost and presence sense verb will become inaccurate if the
> * HDA link is powered off at hot plug or hw initialization time.
> */
> -#ifdef CONFIG_PM
> - if (!(snd_hda_param_read(codec, codec->afg, AC_PAR_POWER_STATE) &
> + else if (!(snd_hda_param_read(codec, codec->afg, AC_PAR_POWER_STATE) &
> AC_PWRST_EPSS))
> codec->bus->power_keep_link_on = 1;
> #endif
> --
> 1.7.9.5
>

Revision history for this message
David Henningsson (diwic) wrote :

Upstream applied this workaround for the 3.8 kernel.

Changed in linux (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
David Henningsson (diwic) wrote :

This could be SRUed back to 3.5 and 3.2 kernels, but I would like a power consumption test before doing so, to make sure it has no negative effects on battery life on idle and in S3.

Revision history for this message
David Henningsson (diwic) wrote :

On 11/07/2012 09:36 AM, Takashi Iwai wrote:
> At Wed, 7 Nov 2012 09:22:33 +0100,
> David Henningsson wrote:
>>
>> On some of the PantherPoint HDMI machines we currently enable, we're seeing
>> trouble with unsol events, i e detecting monitor presence, especially when
>> on battery and after suspend/resume.
>>
>> BugLink: https://bugs.launchpad.net/bugs/1075882
>> Tested-by: Cyrus Lien <email address hidden>
>> Signed-off-by: David Henningsson <email address hidden>
>> ---
>> sound/pci/hda/patch_hdmi.c | 8 ++++++--
>> 1 file changed, 6 insertions(+), 2 deletions(-)
>>
>> So far this is the workaround we have found to be working. Sometimes, it also
>> seems that "cat /proc/asound/cardx/codec#x" can also make the HDMI unsol event
>> trigger, so that the problem fixes itself.
>>
>> We have not run any battery life tests to see if this causes more power consumption.
>
> Looks safe at least, so I applied to for-next branch to give more
> testing. If you find a better solution, let me know.

Jesse has now done a battery life test, both for idle machine and S3
machine, and both with HDMI connected and HDMI unconnected.

All differences in power consumption were within error margins. Given
that, should we consider sending this patch to stable?

--
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic

Revision history for this message
Takashi Iwai (tiwai) wrote :

At Mon, 19 Nov 2012 15:14:45 +0100,
David Henningsson wrote:
>
> On 11/07/2012 09:36 AM, Takashi Iwai wrote:
> > At Wed, 7 Nov 2012 09:22:33 +0100,
> > David Henningsson wrote:
> >>
> >> On some of the PantherPoint HDMI machines we currently enable, we're seeing
> >> trouble with unsol events, i e detecting monitor presence, especially when
> >> on battery and after suspend/resume.
> >>
> >> BugLink: https://bugs.launchpad.net/bugs/1075882
> >> Tested-by: Cyrus Lien <email address hidden>
> >> Signed-off-by: David Henningsson <email address hidden>
> >> ---
> >> sound/pci/hda/patch_hdmi.c | 8 ++++++--
> >> 1 file changed, 6 insertions(+), 2 deletions(-)
> >>
> >> So far this is the workaround we have found to be working. Sometimes, it also
> >> seems that "cat /proc/asound/cardx/codec#x" can also make the HDMI unsol event
> >> trigger, so that the problem fixes itself.
> >>
> >> We have not run any battery life tests to see if this causes more power consumption.
> >
> > Looks safe at least, so I applied to for-next branch to give more
> > testing. If you find a better solution, let me know.
>
> Jesse has now done a battery life test, both for idle machine and S3
> machine, and both with HDMI connected and HDMI unconnected.
>
> All differences in power consumption were within error margins. Given
> that, should we consider sending this patch to stable?

Well, once when it hits to Linus tree. It's in for-next branch, and I
don't want to rebase the branch. So, wait for the next merge window,
which will happen likely in a couple of weeks.

thanks,

Takashi

Changed in linux (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Andy Whitcroft (apw) wrote :

This has indeed hit 3.8 and should be therefore in the next raring upload, which will happen once we have tested binary graphics drivers.

Changed in linux (Ubuntu Precise):
status: New → Confirmed
Changed in linux (Ubuntu Quantal):
status: New → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux - 3.8.0-0.2

---------------
linux (3.8.0-0.2) raring; urgency=low

  [ Tim Gardner ]

  * [packaging] Add macro to selectively disable building perf
  * [packaging] Cannot depend on universe package libaudit-dev
 -- Tim Gardner <email address hidden> Thu, 10 Jan 2013 12:43:24 -0700

Changed in linux (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Adam Conrad (adconrad) wrote : Update Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Revision history for this message
Joseph Salisbury (jsalisbury) wrote : Closing unsupported series nomination.

This bug was nominated against a series that is no longer supported, ie quantal. The bug task representing the quantal nomination is being closed as Won't Fix.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu Quantal):
status: Confirmed → Won't Fix
Revision history for this message
Steve Langasek (vorlon) wrote :

The Precise Pangolin has reached end of life, so this bug will not be fixed for that release

Changed in linux (Ubuntu Precise):
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.