Bug 89327 - Loss of HDMI audio on auto screen off (energy saving)
Summary: Loss of HDMI audio on auto screen off (energy saving)
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Radeon (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-25 22:45 UTC by John
Modified: 2018-07-20 09:01 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
dmesg-drm-next-4.1-wip.log.xz (14.57 KB, application/octet-stream)
2015-02-25 22:58 UTC, Dieter Nützel
no flags Details
Xorg.0.log-drm-next-4.1-wip.xz (8.04 KB, application/octet-stream)
2015-02-25 22:59 UTC, Dieter Nützel
no flags Details
john's dmesg (95.16 KB, text/plain)
2015-02-26 03:42 UTC, John
no flags Details
john's xorg.log (195.02 KB, text/plain)
2015-02-26 03:42 UTC, John
no flags Details
patch 1/5 (9.60 KB, patch)
2015-02-27 16:14 UTC, Alex Deucher
no flags Details | Splinter Review
patch 2/5 (2.06 KB, patch)
2015-02-27 16:15 UTC, Alex Deucher
no flags Details | Splinter Review
patch 3/5 (1.48 KB, patch)
2015-02-27 16:15 UTC, Alex Deucher
no flags Details | Splinter Review
patch 4/5 (2.37 KB, patch)
2015-02-27 16:15 UTC, Alex Deucher
no flags Details | Splinter Review
patch 5/5 (2.12 KB, patch)
2015-02-27 16:16 UTC, Alex Deucher
no flags Details | Splinter Review

Description John 2015-02-25 22:45:14 UTC
Since moving to 4.0-rc1 when my screen goes off (energy saving), I lose the hdmi audio, standard stuff. 
When I move the mouse I get the screen back but not the audio anymore.
Switching it back on with xrandr works.

Thanks
Comment 1 Alex Deucher 2015-02-25 22:50:34 UTC
Please attach your xorg log and dmesg output.
Comment 2 Dieter Nützel 2015-02-25 22:57:38 UTC
(In reply to John from comment #0)
> Since moving to 4.0-rc1 when my screen goes off (energy saving), I lose the
> hdmi audio, standard stuff. 
> When I move the mouse I get the screen back but not the audio anymore.
> Switching it back on with xrandr works.
> 
> Thanks

Can you please attach the 'right' xrandr line, please?
I do not hear anything after screen goes off (energy saving) with drm-next-4.1-wip on r600/NI/Turks, too.

So it seems to be not only with radeonsi.

-Dieter
Comment 3 Dieter Nützel 2015-02-25 22:58:43 UTC
Created attachment 113830 [details]
dmesg-drm-next-4.1-wip.log.xz
Comment 4 Dieter Nützel 2015-02-25 22:59:39 UTC
Created attachment 113831 [details]
Xorg.0.log-drm-next-4.1-wip.xz
Comment 5 Alex Deucher 2015-02-25 23:01:05 UTC
Please don't compress attachments unless they are really large, it makes them much harder to review.
Comment 6 Alex Deucher 2015-02-25 23:02:41 UTC
Can you bisect?
Comment 7 Dieter Nützel 2015-02-25 23:05:40 UTC
(In reply to Alex Deucher from comment #6)
> Can you bisect?

So I have to go before your -rc1 merge?
Comment 8 Dieter Nützel 2015-02-26 01:01:20 UTC
(In reply to Dieter Nützel from comment #7)
> (In reply to Alex Deucher from comment #6)
> > Can you bisect?
> 
> So I have to go before your -rc1 merge?

Alex,

my reportet drm-next-4.1-wip error
[drm:radeon_atom_pick_dig_encoder [radeon]] *ERROR* chosen encoder in use 4
is related to this.

If I reenable audio with
xrandr --output HDMI-0 --set audio on
I get next line in dmesg.

2cond time do NOT work but
xrandr --output HDMI-0 --set audio auto
do?!

Is this right?
[    4.722072] snd_hda_intel 0000:01:00.1: Handle VGA-switcheroo audio client

There is no other 'enable audio' in dmesg.
Comment 9 John 2015-02-26 03:42:11 UTC
Created attachment 113833 [details]
john's dmesg
Comment 10 John 2015-02-26 03:42:45 UTC
Created attachment 113834 [details]
john's xorg.log
Comment 11 John 2015-02-26 03:43:47 UTC
(In reply to Dieter Nützel from comment #2)
> (In reply to John from comment #0)
> > Since moving to 4.0-rc1 when my screen goes off (energy saving), I lose the
> > hdmi audio, standard stuff. 
> > When I move the mouse I get the screen back but not the audio anymore.
> > Switching it back on with xrandr works.
> > 
> > Thanks
> 
> Can you please attach the 'right' xrandr line, please?
> I do not hear anything after screen goes off (energy saving) with
> drm-next-4.1-wip on r600/NI/Turks, too.
> 
> So it seems to be not only with radeonsi.
> 
> -Dieter

xrandr --output HDMI-0 --set audio on
works for me
Comment 12 Dieter Nützel 2015-02-26 06:20:35 UTC
Bisected

6f945693be7eea24b1a8e5ce252a96df98d55a5c is the first bad commit
commit 6f945693be7eea24b1a8e5ce252a96df98d55a5c
Author: Slava Grigorev <slava.grigorev@amd.com>
Date:   Wed Dec 10 14:52:43 2014 -0500

    radeon/audio: applied audio_dpms() and audio_mode_set() calls
    
    Reviewed-by: Christian König <christian.koenig@amd.com>
    Signed-off-by: Slava Grigorev <slava.grigorev@amd.com>
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

:040000 040000 33622643fd03f2afac723aa1356fe9c638a8fb3c fac1a0f988f61f513a75af0b0e55cccc4246d500 M drivers

git bisect start
# bad: [308de41ba3bde80d50833718a2e37e49be868f5a] drm/radeon: use NULL rather then 0 in audio detect
git bisect bad 308de41ba3bde80d50833718a2e37e49be868f5a
# good: [49ead33b9f0e0ba0b528951a05986486196848ef] drm/radeon: comment out some currently unused 7xx dpm code
git bisect good 49ead33b9f0e0ba0b528951a05986486196848ef
# good: [64424d6e45aeee311a4231def7e125bcc2de0855] radeon/audio: consolidate update_acr() functions (v2)
git bisect good 64424d6e45aeee311a4231def7e125bcc2de0855
# good: [3be2e7d0e705621c1bb41eeabb63b122d50ecff3] radeon/audio: moved mute programming to a separate function
git bisect good 3be2e7d0e705621c1bb41eeabb63b122d50ecff3
# bad: [6f945693be7eea24b1a8e5ce252a96df98d55a5c] radeon/audio: applied audio_dpms() and audio_mode_set() calls
git bisect bad 6f945693be7eea24b1a8e5ce252a96df98d55a5c
# good: [6e72376dcc663e4b8a00cdd08f61a8623f572ef1] radeon/audio: consolidate audio_mode_set() functions
git bisect good 6e72376dcc663e4b8a00cdd08f61a8623f572ef1
# first bad commit: [6f945693be7eea24b1a8e5ce252a96df98d55a5c] radeon/audio: applied audio_dpms() and audio_mode_set() calls
Comment 13 Dieter Nützel 2015-02-26 06:33:14 UTC
But I can't revert commit 6f94569 on top of HEAD.

During some restarts I got this in dmesg:
[    4.159787] [drm:btc_dpm_set_power_state [radeon]] *ERROR* rv770_restrict_performance_levels_before_switch failed

And my reported
r600 - NI/Turks: flickering with 'geom-outlining-150'
seems to be related!?

It was first gone under drm-next-4.1-wip but arise with going bak to drm-next-3.20-wip (3.19-rc5). I had to power down my system to get it back after 'git bisect reset' and got the above messages during some power cycles.
Comment 14 John 2015-02-26 06:50:35 UTC
(In reply to Dieter Nützel from comment #12)
> Bisected
> 
> 6f945693be7eea24b1a8e5ce252a96df98d55a5c is the first bad commit
> commit 6f945693be7eea24b1a8e5ce252a96df98d55a5c
> Author: Slava Grigorev <slava.grigorev@amd.com>
> Date:   Wed Dec 10 14:52:43 2014 -0500
> 
>     radeon/audio: applied audio_dpms() and audio_mode_set() calls
>     
>     Reviewed-by: Christian König <christian.koenig@amd.com>
>     Signed-off-by: Slava Grigorev <slava.grigorev@amd.com>
>     Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> 
> :040000 040000 33622643fd03f2afac723aa1356fe9c638a8fb3c
> fac1a0f988f61f513a75af0b0e55cccc4246d500 M drivers
> 
> git bisect start
> # bad: [308de41ba3bde80d50833718a2e37e49be868f5a] drm/radeon: use NULL
> rather then 0 in audio detect
> git bisect bad 308de41ba3bde80d50833718a2e37e49be868f5a
> # good: [49ead33b9f0e0ba0b528951a05986486196848ef] drm/radeon: comment out
> some currently unused 7xx dpm code
> git bisect good 49ead33b9f0e0ba0b528951a05986486196848ef
> # good: [64424d6e45aeee311a4231def7e125bcc2de0855] radeon/audio: consolidate
> update_acr() functions (v2)
> git bisect good 64424d6e45aeee311a4231def7e125bcc2de0855
> # good: [3be2e7d0e705621c1bb41eeabb63b122d50ecff3] radeon/audio: moved mute
> programming to a separate function
> git bisect good 3be2e7d0e705621c1bb41eeabb63b122d50ecff3
> # bad: [6f945693be7eea24b1a8e5ce252a96df98d55a5c] radeon/audio: applied
> audio_dpms() and audio_mode_set() calls
> git bisect bad 6f945693be7eea24b1a8e5ce252a96df98d55a5c
> # good: [6e72376dcc663e4b8a00cdd08f61a8623f572ef1] radeon/audio: consolidate
> audio_mode_set() functions
> git bisect good 6e72376dcc663e4b8a00cdd08f61a8623f572ef1
> # first bad commit: [6f945693be7eea24b1a8e5ce252a96df98d55a5c] radeon/audio:
> applied audio_dpms() and audio_mode_set() calls

Based on the commit's name I'd say it looks like a good match.
Thank you for doing the bisecting instead of me :)
Comment 15 Alex Deucher 2015-02-27 16:14:57 UTC
Created attachment 113872 [details] [review]
patch 1/5

Please try the attached patch set.
Comment 16 Alex Deucher 2015-02-27 16:15:16 UTC
Created attachment 113873 [details] [review]
patch 2/5
Comment 17 Alex Deucher 2015-02-27 16:15:35 UTC
Created attachment 113874 [details] [review]
patch 3/5
Comment 18 Alex Deucher 2015-02-27 16:15:54 UTC
Created attachment 113875 [details] [review]
patch 4/5
Comment 19 Alex Deucher 2015-02-27 16:16:12 UTC
Created attachment 113876 [details] [review]
patch 5/5
Comment 20 Dieter Nützel 2015-02-27 21:42:29 UTC
Thank you Alex,

it is under works.
But could you offer a git tree?
Can't find them in drm-next-4.1-wip.
I couldn't apply patches to my old former drm-next-3.19 and now moved (during system change) to drm-next-4.1-wip tree any longer?! - Any hints?

Maybe I have to work with a new checked out one.
Or could it be, that I only have forgotten to add me to the git 'system'?
Have to investigate.

-Dieter
Comment 21 Alex Deucher 2015-02-27 22:37:08 UTC
These plus some additional fixes:
http://cgit.freedesktop.org/~agd5f/linux/log/?h=audio-fixes
Comment 22 Dieter Nützel 2015-02-27 23:26:49 UTC
Patches 1-5 are
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
on
drm-next-4.1-wip

Got all applied fine with 'git am ...'
I think that I couldn't apply 'extern' patches (e.g. from Dave) on the tree.

Thanks a lot Alex!

Cheers,
  Dieter
Comment 23 John 2015-03-05 11:38:09 UTC
I have patched rc2 and so far after more than a day I have not needed to re-enable the audio, so I'd guess the patches do work fine.

Thanks for the quick fix!
Comment 24 John 2015-03-11 13:15:53 UTC
It seems rc3 includes these already, so that's all good.


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.