Bug 1031234

Summary: VMs sometimes behave as if alt or control keys were held down
Product: [Fedora] Fedora Reporter: Adam Williamson <awilliam>
Component: spice-gtkAssignee: Marc-Andre Lureau <marcandre.lureau>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 24CC: alon, awilliam, berrange, cfergeau, crobinso, hdegoede, loganjerry, marcandre.lureau, sandmann, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-08 11:44:08 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Adam Williamson 2013-11-16 01:11:55 UTC
This is a bizarre bug I've been just 'coping with' for years, but it seems to be happening more frequently in F20-on-F20 - almost every time I switch away from / back to a VM, today.

The symptom is that I'll go into a VM window and try and type something and it 'won't work'. Sometimes weird stuff will happen to windows and/or apps inside the VM, but you won't get the string of text you expected.

I'm fairly sure what's happening is that the VM believes the ctrl and/or alt keys are stuck down and is inputting combinations - so if I type 'hello' it'd pass ctrl-h, ctrl-e, ctrl-l... (or alt-h, alt-e, alt-l - I've not quite figured out yet if it's always ctrl or always alt or sometimes one and sometimes the other). Sometimes these combos trigger stuff to happen, depending on what app and desktop you're running.

If you just press both ctrl and alt normally, one time for each, it seems to 'reset' things and everything works fine again, so it's not a showstopper bug. But it's weird, and annoying.

For a long time I assumed this only happened after I'd actually pressed ctrl/alt 'legitimately' inside the VM, and it was just losing track of the key's state, but I've definitely seen cases in F20 where I definitely hadn't pressed either of those keys inside the VM at all and the bug still happens. It only seems to happen when switching back into the VM's window after switching away from it, not 'spontaneously' - if I'm continuously working inside the VM window, the bug won't suddenly occur. I think.

Comment 1 Cole Robinson 2014-01-18 00:42:42 UTC
Still seeing this as frequently?

Since it sounds easy for you to reproduce, could you also try and reproduce with virt-viewer? sudo virt-viewer $vmname, continue as usual.

Another potential way to narrow it down is to see if switching to vnc makes any difference.

Comment 2 Adam Williamson 2014-01-18 00:45:39 UTC
Haven't been using VMs as much lately as we're between releases now. I'll try and keep an eye out for it when I do.

Comment 3 Cole Robinson 2014-03-24 21:50:48 UTC
Adam, have you been seeing this over the past few months, or did it disappear?

Comment 4 Adam Williamson 2014-03-24 22:40:15 UTC
Still as per c#2, with the F21 schedules :/

Comment 5 Adam Williamson 2014-04-02 19:30:55 UTC
Just saw this in a VM running F20 on an F21 host. I recently recreated the actual virtual machine itself, too, so the machine isn't a very old one.

I'll see if I can try some of the things from c#1.

Comment 6 Jerry James 2014-05-07 21:11:27 UTC
So Adam knows it isn't just him, I have this happen sometimes with RHEL 6 guests on a F-20 host, using spice.  I can confirm that the guest thinks both ctrl and alt are pressed.  It happens infrequently enough that I forget about it, and when weird stuff starts happening as I type, my brain is hardwired to push backspace.  When I do that, the X server gets killed and takes my session with it, and then I slap my forehead and remind myself to push ctrl and alt, NOT backspace, and then promptly forget my own advice.

I have never seen this happen with my Rawhide guests, btw.

Comment 7 Cole Robinson 2014-09-20 23:44:27 UTC
The reality is, all this modifier stuff is handled by the graphical widget. It's not impossible that virt-manager could be at fault here, but I'm really not sure how. So reassigning to spice-gtk

Would be interesting to know if people are still hitting this with latest f21

Comment 8 Cole Robinson 2014-09-22 14:28:05 UTC
Yesterday I got this into a fully reproducible state with virt-manager:

- Run f21 guest, logged in to gnome-shell
- With the console window focused and the mouse over the window, press alt
- Move the mouse off the console window, press tab: this activates alt tab on the host
- Alt tab to a non-virt-manager window
- Click on the VM window to focus it
- Alt is stuck down in the VM

I couldn't reproduce with virt-viewer however, so I started looking at virt-manager code. But when I went to reproduce the bug vanished, despite the fact that I reproduced probably 30 times across multiple runs of virt-manager an hour earlier :/ So I'm again thinking it isn't virt-manager specific and there's something else at play

Comment 9 Adam Williamson 2014-09-27 05:07:43 UTC
yeah, it's weird, right? like the greying-out bug I definitely haven't seen this one as much lately, so I have a very tentative idea it may be to do with debug kernels, but then when we're in debug-kernel time I tend to run with rawhide-nodebug, so...I just don't know. it's odd.

Comment 10 Jerry James 2014-09-27 17:00:45 UTC
See comment 6.  No debug kernels in sight there, yet I see the same bug.  Or saw.  This hasn't actually happened to me recently.

Comment 11 Fedora End Of Life 2015-11-04 15:07:15 UTC
This message is a reminder that Fedora 21 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 21. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '21'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 21 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 12 Adam Williamson 2015-11-04 20:33:33 UTC
Still happens to me occasionally.

Comment 13 Jan Kurik 2016-02-24 15:34:58 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle.
Changing version to '24'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora24#Rawhide_Rebase

Comment 14 Fedora End Of Life 2017-07-25 18:36:25 UTC
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '24'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 24 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 15 Marc-Andre Lureau 2017-07-31 17:08:49 UTC
is this still happening? wayland or X? I'd bet this is gtk or gnome-shell/mutter bug, but this may be hard to debug.

Comment 16 Adam Williamson 2017-08-01 17:46:06 UTC
Well, I don't recall seeing it for a bit, but I don't run VMs anywhere near as often as I used to (thanks, automation!) IIRC it affected ttys too, so I don't think it was to do with GNOME.

Comment 17 Fedora End Of Life 2017-08-08 11:44:08 UTC
Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.