After installing Ubuntu 21.04 on an asus rog laptop (ryzen 7 5800h, nvidia rtx 3070) and the proprietary nvidia drivers, when I type with the built-in keyboard the power off pop-up appears.
alguien ha conseguido solucionarlo? i tried kernel from 5.10 to 5.12
I had same issue. Laptop Asus ROG-STRING G513QM.
I tried to install different ubuntu version (18.04, 20.01) but only 21.04 works. But when you press any key power-off pop up appears.
Your problem is hopefully something simple (notebook firmware, kernel problem, Xinput driver compatibility issue, whatever) causing those keys to be "perceived" as "soft" power off key signals (XF86PowerOff) or "hard" power off signals (virtual POWR key).
Try these fixes:
Based of XF86PowerOff:
Code:
$ xmodmap -e "keysym XF86PowerOff = <fill in the key it should be>"
// You can find standard keysyms and codes listed on the internet.
Based on POWR virtual key:
Code:
$ xinput
// From the list, find "Power Button" and get the id, eg: id=X
$ xinput disable <power button's id>
*Note: It could be a reset button, too. Just it's most commonly the power key.
If the keys causing the Power Off dialogue are now not typing anything, first check that they are returning a value:
Code:
$ xev
// Type on those keys, see if the console outputs anything.
Now try changing your keymap, since this can be caused by regional disparity (I see you're not English):
Code:
# dpkg-reconfigure keyboard-configuration
Set it to the region that the notebook came from. This is important! I really hope that works for you.
The last resort is to try mapping your entire keyboard with Xmodmap which should be easy, but very ardious. You'll have to map your keyboard yourself and that'll require some reading, starting here: Xmodmap (from Arch Wiki, best place for answers, no matter your distro).
If the keys still don't do anything:
Looks like you have a serious problem. I had this with my mum's notebook. Luckily a backported kernel fixed everything. That's all I can think of. I really hope for your sake that it isn't this serious, and if it is, that the next kernel fixes it. Otherwise you'll be stuck with a USB keyboard and mouse and have to blacklist your laptop's one with a modprobe rule.
So, good news: Your "d" key works fine. This means you don't have to worry about reconfiguring your keyboard/layout entirely.
As for the below output, looks like your system's default is Wayland (this explains nVidia bugs in your linked post). IDK much about Wayland, I've never had a system running Wayland (and probably won't until it's forced on me, much like systemd, at which point, I'll look into what I have to, purely to keep the system working). Apparently Wayland uses xwayland as means to keep a little X compatibility.
Last "soft" attempt before moving onto desperate measures:
Okay, please not the following is guesswork, so close and save anything, just in case. It should restore anything broken, but always be cautious. Run the below. You'll have 1 minute to open ANY app (like gedit, mousepad, etc.) and try typing "d" and any other keys causing the POWR button signal. Do not close the terminal until it says you can:
Code:
xinput disable 8 && sleep 60 && xinput enable 8 && echo "Bruh, you can close the console"
If this works, albeit for a minute, you can stop here. Although I still don't exactly the cause (it still could be a number of things, including a libinput bug) of your error, at least we have a solution (albeit hacky). Let me know how it goes. If it doesn't do anything...
Final act of desperation:
Before we do this, you need to know:
1) Your power buttons (power/suspend/hibernate/etc) will no longer work as "soft" poweroff buttons. They will still work as "hard" buttons. Extra info:
- You'll need to click "Power Off" or whatever to power down.
- You'll still be able to use the "hard" Power button. That's when you press and hold the power button for 10-15 seconds and it shuts down your PC by force. This is done by the BIOS, so OS configs won't affect it.
- The "Suspend" function might, and I stress, only _might_ be affected as far as waking. But IIRC, the WAKE function is handled at BIOS level (the power button sends a signal to the BIOS, the BIOS checks if suspend mode is active and then, executes the WAKE protocol -- including necessary signals to the OS
2) Your laptop lid may not work to suspend, poweroff, etc. your PC (which is fine). Everything in the first point applies to the lid unless the BIOS handles it completely independently (the lid is a button, too).
"Yeah, yeah, cool, get to the point"... Okay.
As root, open /etc/systemd/logind.conf (always backup first) and you'll notice it's full of commented-out lines (most of the time. If it is not, please post the contents here before proceeding. Okay, assuming it is as it should be, there may/may not already be these lines. If they are, umcomment and modify their values, otherwise just add them:
Then reboot and pray.
If it works (it should), while it may be inconvenient, at least you can use your machine. If you're still at a loss, we'll try other things, although it may be a bug without a workaround.
You'll have to either use the generic/default, or try similar models. Example, the keyboards of the Inspiron 3000 series will probably work with the "Dell 6000 series" layout.
My first fix was to use xmodmap to remap the keyboard's power button which the X11 input driver refers to symbolically as "XF86PowerOff". Remapping it to another button or "d" would mean when XF86PowerOff was pressed, it would send a different keycode. You can reassign many keys you don't use this way (it may even be useful to customize your keyboard).