Open ivanp7 opened 1 year ago
ldd reports that the binary is linked to the wide ncurses
FWIW, being on Gentoo by itself doesn't cause what you see, nor does using unicode ncurses:
In fact, unicode ncurses is preferred: https://github.com/Syllo/nvtop/blob/37f1b16bebbe8bb08da3d1f74a9cdbdbd7e4316a/CMakeLists.txt#L27-L35
Hello, Using ncursesw should be the default, so I don't think that it comes from a ncurses vs ncursesw issue.
This could be a bug in the drawing routine. @ivanp7 does it happen with any terminal size? Can you give me the terminal size used when the issue happens?
Could be related to #192
@Syllo Indeed, it is related to #192. I have tried tabs -8
and it worked flawlessly (my terminal uses 4 chars for tabs by default). However, I use the same terminal with the same tab setting on Artix Linux, and nvtop does not reproduce the bug there. As for the terminal size, it happens with any size.
P.S. I use manually compiled st with patches.
Could it be a terminal emulator issue? Is it the same on both systems?
It is compiled from the same source and uses the same configuration. Generally, it does work without glitches in ncurses applications. It does not cause the nvtop bug on Artix Linux (where tab is 4 chars).
I have just noticed that nvtop graph still glitches even with tabs -8
, just less often with less artifacts.
This only seems to happen to me (Pop_OS 22.04, nvtop 1.2.2) if I have sort set to GPU or GPU MEM, and seems to be triggered by nvtop trying to print "Comparing GPU rates" somewhere on screen and getting layout messed up as a result.
If I sort by PID, CPU, or anything else I've tried so far that message is never displayed, and the rendering never gets corrupted.
Happens both in and out of tmux, and in all terminal emulators that I have installed (gnome-term, alacritty, wezterm, cool-retro-term)
@WhiskeyTuesday, yes that was a known issue where I left a debug print in the release by inadvertence! I think that this could be worked around by redirecting the standard error, i.e., nvtop 2>/dev/null
.
I don't think that it is related to the plot code: The method starts with a window erase and the plot code does never print any tabulation. The fact that changing tabulation size somehow diminishes the problem leads me to think that there could be a curses issue or that I am not using it right. I don't seem to be able to reproduce with ncurses 6.4 on Arch Linux using gnome-terminal.
Have you tried other terminal emulators, e.g., gnome-terminal, konsole, etc?
I have tried on several terminals both in and out of tmux. The messed up plotting seems to happen at the same time as the vertical shift that is caused by the debug message. When it happens the top line of information at the top of the display cuts off, and the various other issues occur at the same time, including shifting the "tops" of each spike on the graphs up by what looks to me like one line, and from then on they persist where they are with the correct graph still being drawn underneath (and continuing to scroll to the left).
Hitting F6 to bring up the sort menu, or Esc if it is already open, either of which trigger a full page refresh I suspect, fixes the problem for a few ticks until the debug message is printed again.
@WhiskeyTuesday the debug print has been removed in a patch already and made it in nvtop versions >= 2. So I would advise you to use a more recent version of nvtop (e.g., use the AppImage).
Are you guys still experiencing this issue?
Unfortunately, yes
I've installed nvtop 3.0.1 on Gentoo using ebuild from the GURU repository, and the graph drawing is broken like this
ncurses version is 6.3. Is there something that can be done?
P.S. Looks like Gentoo ncurses has force enabled unicode support (I have libncursesw.so installed).