Bug 49761

Summary: Media Players stop playing when monitor is in power saving mode (dpms off)
Product: xorg Reporter: Nikola Šnele <n.schnelle>
Component: Driver/RadeonAssignee: xf86-video-ati maintainers <xorg-driver-ati>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: major    
Priority: medium CC: n.schnelle
Version: git   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Don't wait on CRTC if it's disabled or we're VT switched away none

Description Nikola Šnele 2012-05-10 14:41:50 UTC
When monitor is in dpms off state, media players stop playing after a wile (after few minutes or few hours). It seems that my system is only affected by this when using KDE + radeon driver. 

More details on KDE bug report: https://bugs.kde.org/show_bug.cgi?id=287580

All affected users with this bug (in KDE bug report and in forum threads) are using ati opensorce driver.

My card is mobility radeon hd 2400.
Comment 1 Michel Dänzer 2012-05-11 01:00:20 UTC
Does this only happen when kwin is using OpenGL for effects?
Comment 2 pablow.1422 2012-05-19 07:56:10 UTC
(In reply to comment #1)
> Does this only happen when kwin is using OpenGL for effects?

Yes. I've tried Xrender and I can confirm that this issue only presents with OpenGL for effects.
Comment 3 Nikola Šnele 2012-05-20 10:44:51 UTC
(In reply to comment #1)
> Does this only happen when kwin is using OpenGL for effects?

It seems that it only happens with OpenGL. It doesn't happen with Xrender.

Yet another strange problem happens while display is turned off. I set kshutdown before sleep to turn off laptop after 2 hours (dpms off is set to 10 min). In the morning, laptop is still working. I move mouse, display turns on and then immediately laptop shuts down (kshutdown shuts down laptop). So it seems that laptop is somehow frozen or in sleep while monitor is in dpms off state for some time. And this only seems to happen while kwin uses OpenGl. With Xrender I cannot reproduce this. 

Also with fglrx I cannot reproduce this problems no matter what compositing type kwin uses.
Comment 4 Michel Dänzer 2012-05-22 03:25:17 UTC
Created attachment 61946 [details] [review]
Don't wait on CRTC if it's disabled or we're VT switched away

Does this patch help?
Comment 5 Alex Deucher 2012-05-22 12:33:26 UTC
To apply the patch, download the radeon driver (xf86-video-ati) and build deps and save a copy of the patch.

1. git clone git://anongit.freedesktop.org/xorg/driver/xf86-video-ati
2. cd xf86-video-ati
3. patch -p1 -i fdo49761.diff

you many need to adjust the configure options below depending on your distro
4. ./autogen.sh --prefix=/usr --libdir=/usr/lib64

5. make
6. make install
Comment 6 Nikola Šnele 2012-05-23 14:05:31 UTC
Hi Michel. Your patch seem to brake compilation. When I apply your patch, make gives me this error: http://paste.kde.org/485402/

Without your patch, make works without errors.
Comment 7 Nikola Šnele 2012-05-23 14:11:41 UTC
Alex Deucher suggested to add line #include "drmmode_display.h" to /src/radeon_video.c but it doesn't help.
Comment 8 Nikola Šnele 2012-05-24 05:31:14 UTC
Ignore my previous 2 posts. I managed to fix compilation. I will test the patch in next few days and report back.
Comment 9 Nikola Šnele 2012-05-30 01:46:50 UTC
After days of testing I can now confirm that the patch fixes all my problems I have mentioned in this bug report.

Thank you very much Michel!
Comment 10 Michel Dänzer 2012-06-06 03:39:16 UTC
commit 1d9f1eb7e65c57c52759ccbfa51e8bdd5a10acac
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Jun 6 12:16:08 2012 +0200

    Don't wait on a CRTC which has been disabled via DPMS (bug #49761).
Comment 11 madbiologist 2012-06-08 09:48:47 UTC
This patch is included in xf86-video-ati 6.14.5

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.