You are not logged in.
Hello!
While Linux support for the (utterly terrible!) Asus ROG Zephyrus G14 has become a bit better (does not longer freeze instantly when playing hardware accelerated HEVC-video for example) , there still is a complete system freeze about twice a month, most probably still related to using the Ryzen's internal GPU.
I wanted to try the MagicSysRq for rebooting the then unresponive notebook instead of just brute-force powering it off, but as the 2000$ for this notebook did not enable Asus to put a PrtScr/SysyRq key in, this sadly is not possible.
There are some special keys on the notebook, which I never use anyway.
More precisely there are:
1. Volume down
2. Volume up
3. Microphone toggle
4. A key with some Asus logo on it which does not do anything, yet
So, is there a ways I could put the functionality of the PrtScr/SysyRq key onto this fourth special key?
And would Magic SysRq even work using this key through the remapping needed for doing so (as Magic SysRq seems to be a rather low level feature) ?
Thankl you!
Last edited by Elmario (2025-01-07 17:33:15)
Offline
I have it working on a Honor laptop using the 'NumLock' key, as it also doesn't have 'SysRq key'
I can't say if it will be simple in your case, all I had to do was enter in the terminal...
setkeycodes 0x45 99
I had already enabled the 'magickey' and rebooted before setting the keycode as above, then tested and found it works.
To make it stick after a reboot I put a script in /usr/local/bin setting the keycode as above, then a service module in /usr/lib/systemd/system to run it at boot, and it's up an running.
If you test and it works I'll share the script and modules
Offline
Hello!
Thanks for your help!
I did not have success in my experiments, yet:
1. Trying setkeycodes does not accept any of the keys I'd like to use, because they probably seem to use, as I read: 'extended scancodes'. I.e. that's '0xe0 0x9f' for the Asus logo key.
I tried different methods für supplying two hey bytes to setkeycodes, like:
sudo setkeycodes 'e0 9f' 9
but none of these trials where accepted by setkeycodes.
(Scancode could not be set)
2. Just for testing purposes I tired using a 'normal' key with a single byte scancode, like you did using NumLock (just other way around, as this in theory should toggle the NumLock light by pressing PrtScr on an external keyboard):
setkeycodes 0x63 99
This was accepted by setkeycodes, but it did not work, meaning: It did not change PrtScr on the external keyvboard to function as NumLock.
Edit:
Aftersome searches to 'setkeycodes' I encountered the udev-Method.
Following some instructions I ended with adding:
evdev:input:b0003v0B05p19B6*
KEYBOARD_KEY_ff310038=sysrq
to
/etc/udev/hwdb.d/99-Asus-SysRq.hwdb
There is an actual effect: The ROG key now act as PrtSc, as I can see because of the XFCE Screenshot Window opening.
But it still does not work as SysRq (CTRL+ALT+REISUB has no effect).
In general SysRq IS working at my notebook, as I can see when testing with an external keyboard, so that's not the reason.
Last edited by Elmario (2025-01-15 23:56:37)
Offline