Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Monitor mode displays nothing under Python 3.12 in Windows 11 #104

Closed
3 tasks done
BigFatBass opened this issue Oct 31, 2023 · 8 comments
Closed
3 tasks done
Assignees
Labels
bug Something isn't working cli / gui Something related to the CLI upstream Something upstream related

Comments

@BigFatBass
Copy link

Required prerequisites

  • I have read the documentation https://nvitop.readthedocs.io.
  • I have searched the Issue Tracker that this hasn't already been reported. (comment there if it has.)
  • I have tried the latest version of nvitop in a new isolated virtual environment.

What version of nvitop are you using?

1.3.1

Operating system and version

Windows 11 Build 10.0.22631.2506

NVIDIA driver version

545.92

NVIDIA-SMI

Tue Oct 31 20:41:58 2023
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 545.92                 Driver Version: 545.92       CUDA Version: 12.3     |
|-----------------------------------------+----------------------+----------------------+
| GPU  Name                     TCC/WDDM  | Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |         Memory-Usage | GPU-Util  Compute M. |
|                                         |                      |               MIG M. |
|=========================================+======================+======================|
|   0  NVIDIA GeForce GTX 970       WDDM  | 00000000:01:00.0  On |                  N/A |
|  0%   45C    P8              21W / 163W |   1092MiB /  4096MiB |      6%      Default |
|                                         |                      |                  N/A |
+-----------------------------------------+----------------------+----------------------+

+---------------------------------------------------------------------------------------+
| Processes:                                                                            |
|  GPU   GI   CI        PID   Type   Process name                            GPU Memory |
|        ID   ID                                                             Usage      |
|=======================================================================================|
|    0   N/A  N/A      8196    C+G   C:\Windows\explorer.exe                   N/A      |
|    0   N/A  N/A      9240    C+G   ...m Files\Mozilla Firefox\firefox.exe    N/A      |
|    0   N/A  N/A      9692    C+G   ...CBS_cw5n1h2txyewy\TextInputHost.exe    N/A      |
|    0   N/A  N/A     10148    C+G   ...2txyewy\StartMenuExperienceHost.exe    N/A      |
|    0   N/A  N/A     10216    C+G   ...nt.CBS_cw5n1h2txyewy\SearchHost.exe    N/A      |
|    0   N/A  N/A     11196    C+G   ...t.LockApp_cw5n1h2txyewy\LockApp.exe    N/A      |
|    0   N/A  N/A     13836    C+G   ...werToys\PowerToys.ColorPickerUI.exe    N/A      |
|    0   N/A  N/A     13884    C+G   ...\PowerToys\PowerToys.FancyZones.exe    N/A      |
|    0   N/A  N/A     14004    C+G   ...ekyb3d8bbwe\PhoneExperienceHost.exe    N/A      |
|    0   N/A  N/A     14072    C+G   ...ys\WinUI3Apps\PowerToys.Peek.UI.exe    N/A      |
|    0   N/A  N/A     14160    C+G   ...werToys\PowerToys.PowerLauncher.exe    N/A      |
|    0   N/A  N/A     15240    C+G   ...on\118.0.2088.76\msedgewebview2.exe    N/A      |
|    0   N/A  N/A     15680    C+G   ...B\system_tray\lghub_system_tray.exe    N/A      |
|    0   N/A  N/A     16420    C+G   ....5185.0_x64__8j3eq9eme6ctt\IGCC.exe    N/A      |
|    0   N/A  N/A     17068    C+G   ...5n1h2txyewy\ShellExperienceHost.exe    N/A      |
|    0   N/A  N/A     17500    C+G   ...siveControlPanel\SystemSettings.exe    N/A      |
|    0   N/A  N/A     18772    C+G   ...pp_cw5n1h2txyewy\CHXSmartScreen.exe    N/A      |
+---------------------------------------------------------------------------------------+

Python environment

C:\>pip install -U nvitop nvidia-ml-py windows-curses

C:\>python -m pip freeze | python -c "import sys; print(sys.version, sys.platform); print(''.join(filter(lambda s: any(word in s.lower() for word in ('nvi', 'cuda', 'nvml', 'gpu', 'curses')), sys.stdin)))"
3.12.0 (tags/v3.12.0:0fb18b0, Oct 2 2023, 13:03:39) [MSC v.1935 64 bit (AMD64)] win32
nvidia-ml-py==12.535.108
nvitop==1.3.1
windows-curses==2.3.2

Problem description

The nvitop starts, thinks for a couple of seconds, and just silently exits on any example at Resource Monitor.
There is no GUI or a text message in the terminal. The terminal or Windows does not crash/fail.

The windows-curses has been updated due to support Python 3.12. So, it seems the issue depends on the windows-curses.

Notes:

Steps to Reproduce

C:>nvitop

Traceback

No response

Logs

No response

Expected behavior

The nvitop should work as resource monitor in Windows similar as shown in the figure at https://user-images.githubusercontent.com/16078332/129374533-fe06c01a-630d-4994-b54b-821cccd0d33c.png

Additional context

No response

@BigFatBass BigFatBass added the bug Something isn't working label Oct 31, 2023
@XuehaiPan XuehaiPan added the cli / gui Something related to the CLI label Nov 1, 2023
@XuehaiPan
Copy link
Owner

The windows-curses has been updated due to support Python 3.12. So, it seems the issue depends on the windows-curses.

Hi @BigFatBass, could you try to run:

nvitop -1

to verify if this is an issue related to nvitop rather than windows-curses?

Also, have you ever tried to use nvitop with Python 3.11?

@BigFatBass
Copy link
Author

Hi Xuehai Pan, please find my two comments below:

  1. All examples at Device and Process Status work as expected.
    Here is the output of nvitop -1:
    изображение

Please note I've updated the NVIDIA driver to 546.01 but it does not matter.

  1. I used nvitop as the monitor with Python 3.11 and I did not observed any problems til Python 3.12. Moreover, there is no an issue in Ubuntu 23.10 (and NVIDIA driver 535) and WSL2 Ubuntu 22.04 with Python 3.12 at the same HW environment.
    In any rate, I've installed Python 3.11.6 on the Windows and nvitop under Python 3.11.6.
    PS C:\> python -m pip freeze | python -c "import sys; print(sys.version, sys.platform); print(''.join(filter(lambda s: any(word in s.lower() for word in ('nvi', 'cuda', 'nvml', 'gpu', 'curses')), sys.stdin)))"
    3.11.6 (tags/v3.11.6:8b6ee5b, Oct 2 2023, 14:57:12) [MSC v.1935 64 bit (AMD64)] win32
    nvidia-ml-py==12.535.108
    nvitop==1.3.1
    windows-curses==2.3.2

I successfully ran nvitop in monitor mode with Python 3.11.
Here is the expected output with Python 3.11 in Windows:
изображение

@XuehaiPan XuehaiPan added the upstream Something upstream related label Nov 1, 2023
@XuehaiPan
Copy link
Owner

I used nvitop as the monitor with Python 3.11 and I did not observed any problems til Python 3.12.

@BigFatBass Thanks for the context. The windows-curses upstream added Python 3.12 support yesterday. Seems that this is an upstream issue for windows-curses on Python 3.12.

@riverzhou
Copy link

Same problem.

@planetrocky
Copy link

planetrocky commented Apr 1, 2024

Also same problem on Windows:

Python 3.11.8 all works
Python 3.12.2 only once ("-1") works, python.exe crashes

@planetrocky
Copy link

Not sure if related, but most of the command-line arguments don't appear to work. Using Python 3.11.8 and pip install nvitop the refresh is always at two seconds, whatever is specified via `--interval X``

@Silverwolf-x
Copy link

I think the problem has been solved since windows-curses 2.3.3 was released on May 9, 2024. In my platform nvitop can be shown correctly now.

3.12.3 | packaged by conda-forge | (main, Apr 15 2024, 18:20:11) [MSC v.1938 64 bit (AMD64)] win32        
nvidia-ml-py==12.535.133
nvitop==1.3.2
windows-curses==2.3.3

@XuehaiPan
Copy link
Owner

Thanks @Silverwolf-x! Closing this as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cli / gui Something related to the CLI upstream Something upstream related
Projects
None yet
Development

No branches or pull requests

5 participants