qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [Bug 583462] [NEW] qemu disables screensaver
@ 2010-05-20 18:13 Jaap Versteegh
  2010-05-20 18:13 ` [Qemu-devel] [Bug 583462] " Jaap Versteegh
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Jaap Versteegh @ 2010-05-20 18:13 UTC (permalink / raw)
  To: qemu-devel

Public bug reported:

lucid, with compiz and fglrx:

Screensaver on host will not kick in when qemu is running (kvm or no
kvm). It seems to be related to the fact that the idle time reported by
libXss.so on the host is being reset every four seconds or so when qemu
is running, eventhough there is no activity on either guest or host.

** Affects: qemu
     Importance: Undecided
         Status: New

-- 
qemu disables screensaver
https://bugs.launchpad.net/bugs/583462
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.

Status in QEMU: New

Bug description:
lucid, with compiz and fglrx:

Screensaver on host will not kick in when qemu is running (kvm or no kvm). It seems to be related to the fact that the idle time reported by libXss.so on the host is being reset every four seconds or so when qemu is running, eventhough there is no activity on either guest or host.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Qemu-devel] [Bug 583462] Re: qemu disables screensaver
  2010-05-20 18:13 [Qemu-devel] [Bug 583462] [NEW] qemu disables screensaver Jaap Versteegh
@ 2010-05-20 18:13 ` Jaap Versteegh
  2010-05-21 16:10 ` Michael Tokarev
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 12+ messages in thread
From: Jaap Versteegh @ 2010-05-20 18:13 UTC (permalink / raw)
  To: qemu-devel


** Attachment added: "Code used to check idle time."
   http://launchpadlibrarian.net/48825708/idletime

-- 
qemu disables screensaver
https://bugs.launchpad.net/bugs/583462
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.

Status in QEMU: New

Bug description:
lucid, with compiz and fglrx:

Screensaver on host will not kick in when qemu is running (kvm or no kvm). It seems to be related to the fact that the idle time reported by libXss.so on the host is being reset every four seconds or so when qemu is running, eventhough there is no activity on either guest or host.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Qemu-devel] [Bug 583462] Re: qemu disables screensaver
  2010-05-20 18:13 [Qemu-devel] [Bug 583462] [NEW] qemu disables screensaver Jaap Versteegh
  2010-05-20 18:13 ` [Qemu-devel] [Bug 583462] " Jaap Versteegh
@ 2010-05-21 16:10 ` Michael Tokarev
  2010-05-22 18:25 ` Jaap Versteegh
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 12+ messages in thread
From: Michael Tokarev @ 2010-05-21 16:10 UTC (permalink / raw)
  To: qemu-devel

Debian bugreport about this: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=578672 (#578672).
I tried it here again, with your program (using 0.12.4 from debian) - and it works as expected for me, no resets every 4 secs, screen saver triggers after configured time even if the input is grabbed by kvm window (Ctrl+Alt).  Hmmm?

** Bug watch added: Debian Bug tracker #578672
   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=578672

-- 
qemu disables screensaver
https://bugs.launchpad.net/bugs/583462
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.

Status in QEMU: New

Bug description:
lucid, with compiz and fglrx:

Screensaver on host will not kick in when qemu is running (kvm or no kvm). It seems to be related to the fact that the idle time reported by libXss.so on the host is being reset every four seconds or so when qemu is running, eventhough there is no activity on either guest or host.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Qemu-devel] [Bug 583462] Re: qemu disables screensaver
  2010-05-20 18:13 [Qemu-devel] [Bug 583462] [NEW] qemu disables screensaver Jaap Versteegh
  2010-05-20 18:13 ` [Qemu-devel] [Bug 583462] " Jaap Versteegh
  2010-05-21 16:10 ` Michael Tokarev
@ 2010-05-22 18:25 ` Jaap Versteegh
  2010-05-22 23:47 ` Jaap Versteegh
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 12+ messages in thread
From: Jaap Versteegh @ 2010-05-22 18:25 UTC (permalink / raw)
  To: qemu-devel

When I run 
$xtrace qemu

I get:
001:<:00xx:  4: Request(115): ForceScreenSaver mode=Reset(0x00)

every 4 seconds, which explains things I suppose.
Why is that??

-- 
qemu disables screensaver
https://bugs.launchpad.net/bugs/583462
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.

Status in QEMU: New

Bug description:
lucid, with compiz and fglrx:

Screensaver on host will not kick in when qemu is running (kvm or no kvm). It seems to be related to the fact that the idle time reported by libXss.so on the host is being reset every four seconds or so when qemu is running, eventhough there is no activity on either guest or host.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Qemu-devel] [Bug 583462] Re: qemu disables screensaver
  2010-05-20 18:13 [Qemu-devel] [Bug 583462] [NEW] qemu disables screensaver Jaap Versteegh
                   ` (2 preceding siblings ...)
  2010-05-22 18:25 ` Jaap Versteegh
@ 2010-05-22 23:47 ` Jaap Versteegh
  2010-05-23  8:29   ` [Qemu-devel] [PATCH] sdl: Do not disable screensaver by default Jan Kiszka
  2010-05-24 20:29 ` [Qemu-devel] [Bug 583462] Re: qemu disables screensaver Anthony Liguori
  2011-02-20 17:13 ` Aurelien Jarno
  5 siblings, 1 reply; 12+ messages in thread
From: Jaap Versteegh @ 2010-05-22 23:47 UTC (permalink / raw)
  To: qemu-devel

Looks like it is SDL related, because setting
SDL_VIDEO_ALLOW_SCREENSAVER=1 
fixes it. 

I understand disabling the screensaver is the default in SDL so the
screensaver won't activate while watching a movie or playing a game.
http://www.libsdl.org/faq.php?action=listentries&category=9#90

Since I don't think this behaviour is desirable for qemu, I guess it
would be useful to prevent the disabling of the screensaver in code.

-- 
qemu disables screensaver
https://bugs.launchpad.net/bugs/583462
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.

Status in QEMU: New

Bug description:
lucid, with compiz and fglrx:

Screensaver on host will not kick in when qemu is running (kvm or no kvm). It seems to be related to the fact that the idle time reported by libXss.so on the host is being reset every four seconds or so when qemu is running, eventhough there is no activity on either guest or host.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Qemu-devel] [PATCH] sdl: Do not disable screensaver by default
  2010-05-22 23:47 ` Jaap Versteegh
@ 2010-05-23  8:29   ` Jan Kiszka
  2010-05-24 20:28     ` Anthony Liguori
  2010-05-24 21:40     ` Michael Tokarev
  0 siblings, 2 replies; 12+ messages in thread
From: Jan Kiszka @ 2010-05-23  8:29 UTC (permalink / raw)
  To: qemu-devel; +Cc: j.r.versteegh, Michael Tokarev

From: Jan Kiszka <jan.kiszka@siemens.com>

Unless we are running in full-screen mode, QEMU's SDL window should not
disable the host's screensaver. The user can still change this behaviour
by setting the environment variable SDL_VIDEO_ALLOW_SCREENSAVER as
desired.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---

Cool, thanks for digging out SDL_VIDEO_ALLOW_SCREENSAVER. I came across
by this issue as well but I was too lazy to analyze to reason. This
patch solves it for me.

 sdl.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/sdl.c b/sdl.c
index 16a48e9..3bdd518 100644
--- a/sdl.c
+++ b/sdl.c
@@ -855,6 +855,10 @@ void sdl_display_init(DisplayState *ds, int full_screen, int no_frame)
     if (no_frame)
         gui_noframe = 1;
 
+    if (!full_screen) {
+        setenv("SDL_VIDEO_ALLOW_SCREENSAVER", "1", 0);
+    }
+
     flags = SDL_INIT_VIDEO | SDL_INIT_NOPARACHUTE;
     if (SDL_Init (flags)) {
         fprintf(stderr, "Could not initialize SDL(%s) - exiting\n",
-- 
1.6.0.2

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [Qemu-devel] [PATCH] sdl: Do not disable screensaver by default
  2010-05-23  8:29   ` [Qemu-devel] [PATCH] sdl: Do not disable screensaver by default Jan Kiszka
@ 2010-05-24 20:28     ` Anthony Liguori
  2010-05-24 21:40     ` Michael Tokarev
  1 sibling, 0 replies; 12+ messages in thread
From: Anthony Liguori @ 2010-05-24 20:28 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: j.r.versteegh, Michael Tokarev, qemu-devel

On 05/23/2010 03:29 AM, Jan Kiszka wrote:
> From: Jan Kiszka<jan.kiszka@siemens.com>
>
> Unless we are running in full-screen mode, QEMU's SDL window should not
> disable the host's screensaver. The user can still change this behaviour
> by setting the environment variable SDL_VIDEO_ALLOW_SCREENSAVER as
> desired.
>
> Signed-off-by: Jan Kiszka<jan.kiszka@siemens.com>
>    

Applied.  Thanks.

This also fixes https://bugs.launchpad.net/qemu/+bug/583462.

Regards,

Anthony Liguori

> ---
>
> Cool, thanks for digging out SDL_VIDEO_ALLOW_SCREENSAVER. I came across
> by this issue as well but I was too lazy to analyze to reason. This
> patch solves it for me.
>
>   sdl.c |    4 ++++
>   1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/sdl.c b/sdl.c
> index 16a48e9..3bdd518 100644
> --- a/sdl.c
> +++ b/sdl.c
> @@ -855,6 +855,10 @@ void sdl_display_init(DisplayState *ds, int full_screen, int no_frame)
>       if (no_frame)
>           gui_noframe = 1;
>
> +    if (!full_screen) {
> +        setenv("SDL_VIDEO_ALLOW_SCREENSAVER", "1", 0);
> +    }
> +
>       flags = SDL_INIT_VIDEO | SDL_INIT_NOPARACHUTE;
>       if (SDL_Init (flags)) {
>           fprintf(stderr, "Could not initialize SDL(%s) - exiting\n",
>    

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Qemu-devel] [Bug 583462] Re: qemu disables screensaver
  2010-05-20 18:13 [Qemu-devel] [Bug 583462] [NEW] qemu disables screensaver Jaap Versteegh
                   ` (3 preceding siblings ...)
  2010-05-22 23:47 ` Jaap Versteegh
@ 2010-05-24 20:29 ` Anthony Liguori
  2011-02-20 17:13 ` Aurelien Jarno
  5 siblings, 0 replies; 12+ messages in thread
From: Anthony Liguori @ 2010-05-24 20:29 UTC (permalink / raw)
  To: qemu-devel

This is now fixed by:

commit 111f8ec99b67aeef152c71a5db12f0c0cb2422bd
Author: Jan Kiszka <jan.kiszka@siemens.com>
Date:   Sun May 23 10:29:34 2010 +0200

    sdl: Do not disable screensaver by default
    
    Unless we are running in full-screen mode, QEMU's SDL window should not
    disable the host's screensaver. The user can still change this behaviour
    by setting the environment variable SDL_VIDEO_ALLOW_SCREENSAVER as
    desired.
    
    Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


** Changed in: qemu
       Status: New => Fix Committed

-- 
qemu disables screensaver
https://bugs.launchpad.net/bugs/583462
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.

Status in QEMU: Fix Committed

Bug description:
lucid, with compiz and fglrx:

Screensaver on host will not kick in when qemu is running (kvm or no kvm). It seems to be related to the fact that the idle time reported by libXss.so on the host is being reset every four seconds or so when qemu is running, eventhough there is no activity on either guest or host.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Qemu-devel] [PATCH] sdl: Do not disable screensaver by default
  2010-05-23  8:29   ` [Qemu-devel] [PATCH] sdl: Do not disable screensaver by default Jan Kiszka
  2010-05-24 20:28     ` Anthony Liguori
@ 2010-05-24 21:40     ` Michael Tokarev
  2010-05-24 21:42       ` Michael Tokarev
  2010-05-24 21:52       ` Anthony Liguori
  1 sibling, 2 replies; 12+ messages in thread
From: Michael Tokarev @ 2010-05-24 21:40 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: j.r.versteegh, qemu-devel

23.05.2010 12:29, Jan Kiszka wrote:
> From: Jan Kiszka<jan.kiszka@siemens.com>
>
> Unless we are running in full-screen mode, QEMU's SDL window should not
> disable the host's screensaver. The user can still change this behaviour
> by setting the environment variable SDL_VIDEO_ALLOW_SCREENSAVER as
> desired.
>
> Signed-off-by: Jan Kiszka<jan.kiszka@siemens.com>
> ---
>
> Cool, thanks for digging out SDL_VIDEO_ALLOW_SCREENSAVER. I came across
> by this issue as well but I was too lazy to analyze to reason. This
> patch solves it for me.
>
>   sdl.c |    4 ++++
>   1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/sdl.c b/sdl.c
> index 16a48e9..3bdd518 100644
> --- a/sdl.c
> +++ b/sdl.c
> @@ -855,6 +855,10 @@ void sdl_display_init(DisplayState *ds, int full_screen, int no_frame)
>       if (no_frame)
>           gui_noframe = 1;
>
> +    if (!full_screen) {
> +        setenv("SDL_VIDEO_ALLOW_SCREENSAVER", "1", 0);
> +    }
> +

I think it's conceptually wrong.

It's trivial to toggle full-screen mode by hitting Ctrl+Alt+F.
Following this logic, on each toggle we should toggle the
environment variable (which wont work).  Or else the next bug
report to be filed is that screen saver isn't re-enabled when
switching from fullscreen to window and it isn't re-disabled
when switching to fullscreen.

How about not poking at screensaver by default unconditionally?
To me it sound more correct.  I.e., the above setenv(), but
without the if part...

Thanks!

/mjt

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Qemu-devel] [PATCH] sdl: Do not disable screensaver by default
  2010-05-24 21:40     ` Michael Tokarev
@ 2010-05-24 21:42       ` Michael Tokarev
  2010-05-24 21:52       ` Anthony Liguori
  1 sibling, 0 replies; 12+ messages in thread
From: Michael Tokarev @ 2010-05-24 21:42 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: j.r.versteegh, qemu-devel

25.05.2010 01:40, Michael Tokarev wrote:
> 23.05.2010 12:29, Jan Kiszka wrote:
>> From: Jan Kiszka<jan.kiszka@siemens.com>
>>
>> Unless we are running in full-screen mode, QEMU's SDL window should not
>> disable the host's screensaver. The user can still change this behaviour
>> by setting the environment variable SDL_VIDEO_ALLOW_SCREENSAVER as
>> desired.
>>
>> Signed-off-by: Jan Kiszka<jan.kiszka@siemens.com>
>> ---
>>
>> Cool, thanks for digging out SDL_VIDEO_ALLOW_SCREENSAVER. I came across
>> by this issue as well but I was too lazy to analyze to reason. This
>> patch solves it for me.
>>
>> sdl.c | 4 ++++
>> 1 files changed, 4 insertions(+), 0 deletions(-)
>>
>> diff --git a/sdl.c b/sdl.c
>> index 16a48e9..3bdd518 100644
>> --- a/sdl.c
>> +++ b/sdl.c
>> @@ -855,6 +855,10 @@ void sdl_display_init(DisplayState *ds, int
>> full_screen, int no_frame)
>> if (no_frame)
>> gui_noframe = 1;
>>
>> + if (!full_screen) {
>> + setenv("SDL_VIDEO_ALLOW_SCREENSAVER", "1", 0);
>> + }
>> +
>
> I think it's conceptually wrong.
>
> It's trivial to toggle full-screen mode by hitting Ctrl+Alt+F.
> Following this logic, on each toggle we should toggle the
> environment variable (which wont work). Or else the next bug
> report to be filed is that screen saver isn't re-enabled when
> switching from fullscreen to window and it isn't re-disabled
> when switching to fullscreen.

One more data point: guest can not turn off our monitor anyway,
even in full-screen mode.  So I think that by default our local
screen saver should continue working regardless.

> How about not poking at screensaver by default unconditionally?
> To me it sound more correct. I.e., the above setenv(), but
> without the if part...
>
> Thanks!
>
> /mjt

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Qemu-devel] [PATCH] sdl: Do not disable screensaver by default
  2010-05-24 21:40     ` Michael Tokarev
  2010-05-24 21:42       ` Michael Tokarev
@ 2010-05-24 21:52       ` Anthony Liguori
  1 sibling, 0 replies; 12+ messages in thread
From: Anthony Liguori @ 2010-05-24 21:52 UTC (permalink / raw)
  To: Michael Tokarev; +Cc: j.r.versteegh, Jan Kiszka, qemu-devel

On 05/24/2010 04:40 PM, Michael Tokarev wrote:
> 23.05.2010 12:29, Jan Kiszka wrote:
>> From: Jan Kiszka<jan.kiszka@siemens.com>
>>
>> Unless we are running in full-screen mode, QEMU's SDL window should not
>> disable the host's screensaver. The user can still change this behaviour
>> by setting the environment variable SDL_VIDEO_ALLOW_SCREENSAVER as
>> desired.
>>
>> Signed-off-by: Jan Kiszka<jan.kiszka@siemens.com>
>> ---
>>
>> Cool, thanks for digging out SDL_VIDEO_ALLOW_SCREENSAVER. I came across
>> by this issue as well but I was too lazy to analyze to reason. This
>> patch solves it for me.
>>
>>   sdl.c |    4 ++++
>>   1 files changed, 4 insertions(+), 0 deletions(-)
>>
>> diff --git a/sdl.c b/sdl.c
>> index 16a48e9..3bdd518 100644
>> --- a/sdl.c
>> +++ b/sdl.c
>> @@ -855,6 +855,10 @@ void sdl_display_init(DisplayState *ds, int 
>> full_screen, int no_frame)
>>       if (no_frame)
>>           gui_noframe = 1;
>>
>> +    if (!full_screen) {
>> +        setenv("SDL_VIDEO_ALLOW_SCREENSAVER", "1", 0);
>> +    }
>> +
>
> I think it's conceptually wrong.
>
> It's trivial to toggle full-screen mode by hitting Ctrl+Alt+F.

I don't think it's worth jumping through hoops to conditionally 
disable/enable screensaver.

More sophisticated screen saver behavior should be implemented in 
upstream SDL.

Regards,

Anthony Liguori

> Following this logic, on each toggle we should toggle the
> environment variable (which wont work).  Or else the next bug
> report to be filed is that screen saver isn't re-enabled when
> switching from fullscreen to window and it isn't re-disabled
> when switching to fullscreen.
>
> How about not poking at screensaver by default unconditionally?
> To me it sound more correct.  I.e., the above setenv(), but
> without the if part...
>
> Thanks!
>
> /mjt

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Qemu-devel] [Bug 583462] Re: qemu disables screensaver
  2010-05-20 18:13 [Qemu-devel] [Bug 583462] [NEW] qemu disables screensaver Jaap Versteegh
                   ` (4 preceding siblings ...)
  2010-05-24 20:29 ` [Qemu-devel] [Bug 583462] Re: qemu disables screensaver Anthony Liguori
@ 2011-02-20 17:13 ` Aurelien Jarno
  5 siblings, 0 replies; 12+ messages in thread
From: Aurelien Jarno @ 2011-02-20 17:13 UTC (permalink / raw)
  To: qemu-devel

** Changed in: qemu
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/583462

Title:
  qemu disables screensaver

Status in QEMU:
  Fix Released

Bug description:
  lucid, with compiz and fglrx:

  Screensaver on host will not kick in when qemu is running (kvm or no
  kvm). It seems to be related to the fact that the idle time reported
  by libXss.so on the host is being reset every four seconds or so when
  qemu is running, eventhough there is no activity on either guest or
  host.

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2011-02-20 17:21 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-20 18:13 [Qemu-devel] [Bug 583462] [NEW] qemu disables screensaver Jaap Versteegh
2010-05-20 18:13 ` [Qemu-devel] [Bug 583462] " Jaap Versteegh
2010-05-21 16:10 ` Michael Tokarev
2010-05-22 18:25 ` Jaap Versteegh
2010-05-22 23:47 ` Jaap Versteegh
2010-05-23  8:29   ` [Qemu-devel] [PATCH] sdl: Do not disable screensaver by default Jan Kiszka
2010-05-24 20:28     ` Anthony Liguori
2010-05-24 21:40     ` Michael Tokarev
2010-05-24 21:42       ` Michael Tokarev
2010-05-24 21:52       ` Anthony Liguori
2010-05-24 20:29 ` [Qemu-devel] [Bug 583462] Re: qemu disables screensaver Anthony Liguori
2011-02-20 17:13 ` Aurelien Jarno

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).