Syllo / nvtop

GPU & Accelerator process monitoring for AMD, Apple, Huawei, Intel, NVIDIA and Qualcomm
Other
7.95k stars 291 forks source link

Function keys not working, but displays are #123

Closed jpm5830 closed 2 years ago

jpm5830 commented 2 years ago

Ubuntu 20.04, I've cloned the repo and built/installed with no warnings or errors. When launched, it works properly except that NONE of the function keys work (see attached screenshot). I have to kill the process manually to exit the app. Note F10, Esc, or q keys will also do nothing. More info below. Any ideas? Thanks, Jim!

nvidia-smi screenshot

$ nvtop --version nvtop version 1.2.2

$ which nvtop /usr/local/bin/nvtop

$ ldd which nvtop linux-vdso.so.1 (0x00007ffc4bbac000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f09e7a52000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f09e7a4c000) libncursesw.so.6 => /lib/x86_64-linux-gnu/libncursesw.so.6 (0x00007f09e7a12000) libtinfo.so.6 => /lib/x86_64-linux-gnu/libtinfo.so.6 (0x00007f09e79e200 libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f09e77f0000) /lib64/ld-linux-x86-64.so.2 (0x00007f09e7be5000)

$ uname -a Linux p620 5.11.0-37-generic #41~20.04.2-Ubuntu SMP Fri Sep 24 09:06:38 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

thesunexpress commented 2 years ago

That would be an issue with your terminal emulator and/or how your keyboard interacts with libinput/evdev. Check with xev to see what codes your keyboard(s) send when pressing the various F(n) keys.

Syllo commented 2 years ago

Do you get the same issue with other tools based on ncurses, for example htop?

jpm5830 commented 2 years ago

I installed htop, and it gives the exact same behavior as nvtop. It works, but ignores keyboard. Output from xev below for F10 and q keys:

KeyPress event, serial 37, synthetic NO, window 0x2a00001, root 0x241, subw 0x0, time 600759, (25,-20), root:(76,94), state 0x10, keycode 76 (keysym 0xffc7, F10), same_screen YES, XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False

KeyRelease event, serial 37, synthetic NO, window 0x2a00001, root 0x241, subw 0x0, time 600855, (25,-20), root:(76,94), state 0x10, keycode 76 (keysym 0xffc7, F10), same_screen YES, XLookupString gives 0 bytes: XFilterEvent returns: False

KeyPress event, serial 37, synthetic NO, window 0x2a00001, root 0x241, subw 0x0, time 584215, (25,-20), root:(76,94), state 0x10, keycode 24 (keysym 0x71, q), same_screen YES, XLookupString gives 1 bytes: (71) "q" XmbLookupString gives 1 bytes: (71) "q" XFilterEvent returns: False

KeyRelease event, serial 37, synthetic NO, window 0x2a00001, root 0x241, subw 0x0, time 584279, (25,-20), root:(76,94), state 0x10, keycode 24 (keysym 0x71, q), same_screen YES, XLookupString gives 1 bytes: (71) "q" XFilterEvent returns: False

jpm5830 commented 2 years ago

Solved: Pressing the F10 key on my Ubuntu 20.04 system causes the focus to move outside the nvtop ncurses window (see highlighted screenshot below). Once you click back into the main window following an F10 keypress, all other functions work as expected. To quit, you need to use the Esc key or press 'q' key.

Workspace 1_001

joezhouchenye commented 5 months ago

This is not fixed for gnome-termianl on Ubuntu 23.04. Clicking back doesn't work.

joezhouchenye commented 5 months ago

This is a keyboard shortcut conflict issue.

In the gnome-terminal configuration, I tried to disable all keyboard shortcuts in the "Keyboard Shortcut" Tab. However, the setting for the F10 key is actually in the "General" Tab. Disabling the menu keyboard shortcut feature there works.