RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1121446 - screensaver cannot start when the input is grabbed by spice guest
Summary: screensaver cannot start when the input is grabbed by spice guest
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: spice-gtk
Version: 6.6
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: 6.8
Assignee: Default Assignee for SPICE Bugs
QA Contact: SPICE QE bug list
URL: https://bugs.freedesktop.org/show_bug...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-21 02:06 UTC by CongDong
Modified: 2015-10-17 16:57 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-10-17 16:57:43 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description CongDong 2014-07-21 02:06:58 UTC
Description of problem:
When mouse is grabed by spice guest, the screensaver of host won't start.

Version-Release number of selected component (if applicable):
libvirt-0.10.2-41.el6.x86_64
virt-manager-0.9.0-26.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Prepare a spice guest with qxl:
...
    <input type='tablet' bus='usb'/>
...
    <graphics type='spice' port='5900' autoport='yes' listen='127.0.0.1'>
      <listen type='address' address='127.0.0.1'/>
    </graphics>
...
    <video>
      <model type='qxl' ram='65536' vram='65536' heads='1'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
...

2. Set the host screensaver start as the machine idle after "1 minute"
System -> Preferences -> Screensaver -> "Regard the computer as idle after: 1 mintue"
Screensaver theme: Blank screen

3. start the guest and click mouse on the guest's desktop, then wait 1 minute.
#virsh start $vm
#virt-manager
double click the name of #vm, then click the desktop of guest, so the guest window is foucsed(the guest window has a black title bar).

Actual results:
After 1 minute, notice that the guest window is not foucsed(the guest window title bar changed to white), but the screensaver is not start.

Expected results:
The screensaver should start after 1 minute.

Additional info:
use virt-viewer get the same problem.
guest with vnc doesn't have the problem.

Comment 2 Martin Kletzander 2014-07-21 05:22:25 UTC
I'm sorry to say that, but if your mouse pointer gets grabbed, you have the guest configured badly.  It should not grab the pointer at all (maybe first few seconds before the kernel is fully loaded or something).  Is the guest installed?

Comment 3 CongDong 2014-07-21 05:35:33 UTC
(In reply to Martin Kletzander from comment #2)
> I'm sorry to say that, but if your mouse pointer gets grabbed, you have the
> guest configured badly.  It should not grab the pointer at all (maybe first
> few seconds before the kernel is fully loaded or something).  Is the guest
> installed?

The guest is already installed.

In step3, after 1 minute, the window is not fcoused any more(the window title bar changed to white background), is that mean the mouse pointer is ungrabed?

Comment 4 Martin Kletzander 2014-07-21 08:46:22 UTC
pointer is grabbed when the titlebar has information about how to ungrab it. After the guest boots the screensaver should work. Because is doesn't with spice, but does with VNC, I'm moving it to spice-gtk (that is used by virt-manager).

Comment 5 Marc-Andre Lureau 2014-07-21 10:06:09 UTC
In client mode, only the keyboard is grabbed (to be able to receive win keys, alt-tab etc) The grab prevent the screenscaver from starting

When the screensaver is activated, spice-gtk continuously process those events:  

(remote-viewer:4369): GSpice-DEBUG: spice-widget.c:1436 leave_event
(remote-viewer:4369): GSpice-DEBUG: spice-widget.c:771 ungrab keyboard
(remote-viewer:4369): GSpice-DEBUG: spice-widget.c:1475 focus_out_event
(remote-viewer:4369): GSpice-DEBUG: spice-widget.c:1252 release_keys
(remote-viewer:4369): GSpice-DEBUG: spice-widget.c:1422 enter_event
(remote-viewer:4369): GSpice-DEBUG: spice-widget.c:1452 focus_in_event
(remote-viewer:4369): GSpice-DEBUG: spice-widget.c:1252 release_keys
(remote-viewer:4369): GSpice-DEBUG: spice-widget.c:743 grab keyboard

If spice-gtk wouldn't receive the enter event and focus-in, the screensaver would probably start, since the keyboard and pointer would not be grabbed.

Note that this "bug" has always happened in spice-gtk, and that leaving the pointer from spice-gtk will start the screensaver, so it is considered a minor bug.

Comment 6 Marc-Andre Lureau 2014-07-21 10:19:54 UTC
tbh, I think it is equally a interesting to prevent the client from logging out / screensaver automatically. In general the guest is also configured to log out / screensaver on idle, and it is annoying if you need to log back 2 times.

Comment 8 Pavel Grunt 2015-03-03 05:56:37 UTC
According to the upstream https://bugs.freedesktop.org/show_bug.cgi?id=34793 it requires changes in spice-gtk and spice-vdagent - I don't think it will be solved in rhel-6.7

Comment 9 Fabiano Fidêncio 2015-03-17 23:51:21 UTC
As far I understand it is not going to happen on RHEL-6 cycle.
Can we close it here and open the same bug for RHEL-7 cycle?

Comment 10 Marc-Andre Lureau 2015-03-19 11:08:12 UTC
(In reply to Fabiano Fidêncio from comment #9)
> As far I understand it is not going to happen on RHEL-6 cycle.
> Can we close it here and open the same bug for RHEL-7 cycle?

I would even move the bug upstream.  I am not even sure spice-gtk will be able to solve it properly. Fundamentally, it's Xorg grab and screensaver design that is broken, it's not just a spice client issue.

Comment 11 fwu 2015-04-10 09:04:19 UTC
The problem can be reproduced in newer version of virt-manager

package version:
libvirt-0.10.2-51.el6.x86_64
virt-manager-0.9.0-29.el6.x86_64

Operating System:
RHEL 6.7


Steps:
1. Prepare a spice guest with qxl:
...
    <input type='tablet' bus='usb'/>
...
    <graphics type='spice' port='5900' autoport='yes' listen='127.0.0.1'>
      <listen type='address' address='127.0.0.1'/>
    </graphics>
...
    <video>
      <model type='qxl' ram='65536' vram='65536' heads='1'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
...

2. Set the host screensaver start as the machine idle after "1 minute"
System -> Preferences -> Screensaver -> "Regard the computer as idle after: 1 mintue"
Screensaver theme: Blank screen

3. start the guest and click mouse on the guest's desktop, then wait 1 minute.
#virsh start $vm
#virt-manager
Double click the name of #vm, then click the desktop of guest, ensure that the guest window is focused.

results:
1. After step3, the guest window is not focused after 1 minute(the guest window title bar turned white) and the screensaver will not be started unless the mouse was moved.

2. Guest with VNC have the same problem as well.

Comment 13 David Blechter 2015-06-18 13:43:10 UTC
moving to 6.8 for now, and we'll  evaluate the next step later

Comment 15 David Blechter 2015-10-17 16:57:43 UTC
it is too low severity in order to address in rhel 6.x


Note You need to log in before you can comment on or make changes to this bug.