Opened 16 years ago

Closed 16 years ago

#937 closed enhancement (fixed)

gnome-screensaver starts while MPlayer is running

Reported by: jagec.igor@… Owned by: reimar
Priority: normal Component: core
Version: 1.0rc2 Severity: minor
Keywords: Cc: adam@…
Blocked By: Blocking:
Reproduced by developer: no Analyzed by developer: no

Description

gnome-screensaver starts while MPlayer is running, what ever I do. That's an old issue, but I never saw that someone had report it. I've read on the Internet that other GNOME users have the same problem too.

http://bugs.archlinux.org/task/5371
http://ubuntuforums.org/showthread.php?t=146534

I'd like to provide you more information, but I don't know how to get it. I use openSUSE 10.3 with GNOME 2.20 and Packman's supplied MPlayer package. BTW I experienced the issue on all distros I was playing with, and on all versions of GNOME with gnome-screensaver.

Attachments (1)

mplayer-gnome-screensaver.patch (4.4 KB ) - added by adam@… 16 years ago.
Patch to disable gnome screensaver

Download all attachments as: .zip

Change History (12)

comment:1 by jagec.igor@…, 16 years ago

I forgot to mention, If I disable gnome-screensaver in GNOME settings, then my monitor goes into sleep state.

comment:2 by adam@…, 16 years ago

Cc: adam@… added

A patch for this seems to be available here:
http://bugs.archlinux.org/task/7002

I've fixed the patch up a little to make it apply to -rc2.

by adam@…, 16 years ago

Patch to disable gnome screensaver

comment:3 by adam@…, 16 years ago

comment:4 by jagec.igor@…, 16 years ago

(In reply to comment #3)

Created an attachment (id=401) [details]
Patch to disable gnome screensaver

How can I apply the patch?

Thanks!

comment:5 by adam@…, 16 years ago

(In reply to comment #4)

How can I apply the patch?

Unpack the mplayer sources.
cd into the source directory.
patch -p1 < /path/to/patchfile.patch

comment:6 by reimar, 16 years ago

Please note that the patch will not be applied since it is fundamentally wrong (though the same is true for the kde-screensaver hack rotting in our code): it disables the screensaver on the system on which MPlayer is executed, not on the one where it is displayed, which may differ.

comment:7 by adam@…, 16 years ago

(In reply to comment #6)

it disables the screensaver on the system on which MPlayer is executed, not on
the one where it is displayed, which may differ.

Good point.

Since the only way to fiddle the Gnome screensaver appears to be via DBus, and whilst it does appear to be possible to network it, it certainly isn't configured that way by default.

This seems to suggest two approaches. The quicker hack would be to only use the DBus methods if mplayer is using the local display (which would likely cover 99% of real-world users). The more correct method would seem to be to attempt to connect to the DBus instance on the X server. Would either of these seem more acceptable? (As is likely obvious, I'm entirely inexperienced in the ways of hacking X and GLib, but I'm willing to give it a go so long as I'm heading in roughly the right direction.)

comment:8 by reimar, 16 years ago

Instead of reinventing the wheel you could just use one of the many functions already available for that: XResetScreenSaver, XScreenSaverSuspend, and probably a few more based on window attributes.

comment:9 by reimar, 16 years ago

XScreenSaverSuspend support was added to MPlayer.

comment:10 by reimar, 16 years ago

Priority: very importantnormal
Severity: criticalenhancement

This is an enhancement/feature request anyway.
And beyond XScreenSaverSuspend this: http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2007-December/055756.html is the best you will get if it goes after me. I certainly don't intend to play the "a different piece of code for each screensaver in the whole world"-game that we are already doing with window-managers - at a strong expense of overall code quality.

comment:11 by reimar, 16 years ago

Resolution: fixed
Status: newclosed

Use the method described under heartbeat-cmd in the man page.

Note: See TracTickets for help on using tickets.