Opened 12 years ago

Closed 12 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: Analyzed by developer:

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@… 12 years ago.
Patch to disable gnome screensaver

Download all attachments as: .zip

Change History (12)

comment:1 Changed 12 years ago by jagec.igor@…

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

comment:2 Changed 12 years ago by adam@…

  • 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.

Changed 12 years ago by adam@…

Patch to disable gnome screensaver

comment:3 Changed 12 years ago by adam@…

comment:4 Changed 12 years ago by jagec.igor@…

(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 Changed 12 years ago by adam@…

(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 Changed 12 years ago by reimar

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 Changed 12 years ago by adam@…

(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 Changed 12 years ago by reimar

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 Changed 12 years ago by reimar

XScreenSaverSuspend support was added to MPlayer.

comment:10 Changed 12 years ago by reimar

  • Priority changed from very important to normal
  • Severity changed from critical to enhancement

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 Changed 12 years ago by reimar

  • Resolution set to fixed
  • Status changed from new to closed

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

Note: See TracTickets for help on using tickets.