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 849975 - sysrq magic key combos are not passed to the guest
Summary: sysrq magic key combos are not passed to the guest
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: spice-gtk
Version: 6.3
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: beta
: 6.4
Assignee: Christophe Fergeau
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-08-21 11:48 UTC by David Jaša
Modified: 2014-02-28 12:58 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-02-19 14:17:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description David Jaša 2012-08-21 11:48:47 UTC
Description of problem:
sysrq magic key combos are not passed to the guest

Version-Release number of selected component (if applicable):
virt-viewer-0.5.2-9.el6.x86_64
spice-gtk-0.11-11.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1. open a terminal in a client and in a guest
2. in both terminals, run: tail -fn0 /var/log/messages
3. focus virt-viewer client window (both keyboard & mouse)
4. issue alt+sysrq+s (emergency sync) combo
  
Actual results:
only the client gets the combo:
# tail -fn0 /var/log/messages
Aug 21 13:10:44 dhcp-29-7 kernel: SysRq : Emergency Sync
Aug 21 13:10:44 dhcp-29-7 kernel: Emergency Sync complete

Expected results:
only the guest gets the combo (because the user doesn't want to send say alt+sysrq+c to both...)

Additional info:

Comment 1 David Jaša 2012-08-21 13:54:48 UTC
Few clarifications:

* in remote-viewer and spicy, the only way to pass a combo to the guest is to add shift key to is, like alt+shift+sysrq+s. Even then, the combo is passed to both client and guest

* old spice-client can issue the combos using its now-deprecated sticky alt feature

Comment 2 Christophe Fergeau 2012-08-29 16:21:37 UTC
I don't think we can intercept sysrq combinations, so we'd need a send-key menu, or sticky keys to implement this...

Comment 3 Marc-Andre Lureau 2012-11-18 16:55:34 UTC
(In reply to comment #1)
> Few clarifications:
> 
> * in remote-viewer and spicy, the only way to pass a combo to the guest is
> to add shift key to is, like alt+shift+sysrq+s. Even then, the combo is
> passed to both client and guest


lowering severity since it is not critical for the normal usage, no crash/leak etc either. Furthermore you found a solution to the issue.

Comment 4 RHEL Program Management 2012-12-14 07:23:51 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 6 Jonathon Jongsma 2013-09-09 16:40:42 UTC
We could add a menu item to the "Send key" menu, but that's only really feasible if we want to support a small number of these magic sysrq combinations.  if we had to add an item for each possible magic sysrq combination, that menu would get rather huge. Which combinations do we want to support?

On the other hand, the workaround mentioned above (including Shift) doesn't appear to work here (with a Fedora 19 host)

Comment 7 Christophe Fergeau 2013-09-10 07:19:09 UTC
Iirc virtualbox handles that by having scroll lock (iirc)  act as alt when pressed in a key combination.
spicec used to handle that using a sticky alt (hold alt for 5 seconds, release it, and then press the rest of the key combination).

Comment 8 RHEL Program Management 2013-10-14 04:50:31 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 9 Marc-Andre Lureau 2014-02-18 20:01:10 UTC
Otoh, if you disable sysrq on client side, it is working. Thus I would consider this as notabug, as this is certainly not a good idea to try a sysrq on both client and guest at the same time. Somebody disagree with that?

Comment 10 David Jaša 2014-02-19 14:11:58 UTC
(In reply to Marc-Andre Lureau from comment #9)
> Otoh, if you disable sysrq on client side, it is working. Thus I would
> consider this as notabug, as this is certainly not a good idea to try a
> sysrq on both client and guest at the same time. Somebody disagree with that?

Sure.

Would it make sense to have keyboard shortcuts for sysrq key combos similar to ctrl-alt-end for ctrl-alt-del - so that user can press e.g. alt+pause/break+<key>? If so, we could transform the bug so such a RFE.

Comment 11 Marc-Andre Lureau 2014-02-19 14:15:29 UTC
imho, someone doing sysrq with a guest should know that it is intercepted by client first. I don't see the need for extra shortcuts for something that is very much only for hackers (I even never use sysrq myself!).

Comment 12 Marc-Andre Lureau 2014-02-19 14:17:36 UTC
closing as worksforme, feel free to reopen if you have valid reasons..

Comment 13 Christophe Fergeau 2014-02-20 12:13:06 UTC
(In reply to Marc-Andre Lureau from comment #9)
> Otoh, if you disable sysrq on client side, it is working.

Fwiw, no idea how you disable sysrq on client side, this would probably deserve some documentation, or a kb article...

Comment 14 Christophe Fergeau 2014-02-20 12:14:28 UTC
(In reply to David Jaša from comment #10)
> Would it make sense to have keyboard shortcuts for sysrq key combos similar
> to ctrl-alt-end for ctrl-alt-del - so that user can press e.g.
> alt+pause/break+<key>? If so, we could transform the bug so such a RFE.

Imo it would be nice to have.

Comment 15 Marc-Andre Lureau 2014-02-20 12:23:29 UTC
I just google:

http://en.wikipedia.org/wiki/Magic_SysRq_key

There are also alternate way to do sysrq,

I disagree having keymaps/translation by default, we should have 1-1 whenever possible. In this case, the combination works when the client side is configured to permit it.

Comment 16 Christophe Fergeau 2014-02-28 12:58:30 UTC
(In reply to Marc-Andre Lureau from comment #15)
> I just google:
> 
> http://en.wikipedia.org/wiki/Magic_SysRq_key
> 

For anyone reading this bug

https://en.wikipedia.org/wiki/Magic_SysRq_key#Configuration

"The feature is controlled both by a compile-time option in the kernel configuration, CONFIG_MAGIC_SYSRQ, and a sysctl kernel parameter, kernel.sysrq. To be able to use this functionality the CONFIG_MAGIC_SYSRQ option has to be enabled at kernel compile time.

The SysRq key can be disabled with the following command:

echo 0 > /proc/sys/kernel/sysrq

To re-enable:

echo 1 > /proc/sys/kernel/sysrq"

> There are also alternate way to do sysrq,
> 
> I disagree having keymaps/translation by default, we should have 1-1
> whenever possible. In this case, the combination works when the client side
> is configured to permit it.

Except that this cannot be configured by regular users. And if this is our 'official' answer for people asking how to achieve that, this imo should be documented.


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