Comments (10)
I did a proof of concept for this that worked. I need to work out a more robust solution after I complete work on release of v3.8.0. Might be a few weeks before I get to it.
from gpu-utils.
Thanks for the suggestion. Let me take a look at it after I get things ready for next Debian release.
from gpu-utils.
Thank you so much! I can help test it when you have it. I have a system with bare minimal linux install, which doesn't have the needed libraries for gui.
from gpu-utils.
I have a working version on the gtk_optional
branch. Let me know of any issues.
from gpu-utils.
Cool. I tried on my system. Here is the diff I needed to make it work:
diff --git a/gpu-mon b/gpu-mon
index 8b291d0..0366535 100755
--- a/gpu-mon
+++ b/gpu-mon
@@ -65,8 +65,9 @@ try:
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import GLib, Gtk
+ from GPUmodules import GPUgui
GTK = True
-except ModuleNotFoundError as error:
+except (ModuleNotFoundError, ValueError) as error:
print('gi import error: {}'.format(error))
print('gi is required for {}'.format(__program_name__))
print(' In a venv, first install vext: pip install --no-cache-dir vext')
@@ -74,7 +75,6 @@ except ModuleNotFoundError as error:
GTK = False
from GPUmodules import __version__, __status__, __credits__
-from GPUmodules import GPUgui
from GPUmodules import GPUmodule as Gpu
from GPUmodules import env
The ValueError is from gi.require_version() line since gi could be install but underlying gtk module can be not there. without it, the error is:
Traceback (most recent call last):
File "/home/owen/e/py39/bin/gpu-mon", line 7, in <module>
exec(compile(f.read(), __file__, 'exec'))
File "/home/owen/git/gpu-utils/gpu-mon", line 66, in <module>
gi.require_version('Gtk', '3.0')
File "/home/owen/miniconda39/lib/python3.9/site-packages/gi/__init__.py", line 126, in require_version
raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Gtk not available
from gpu-utils.
Can you make a pull request with the modifications? Probably need to skip GPUgui import only if GTK is false.
from gpu-utils.
Sure. See #135. I just moved the GPUgui import into the same try statement. That should be the same, right?
from gpu-utils.
Looks good! I made another change to simplify the if GTK
logic. Also, I updated credits to indicate your contribution. Let me know of any concerns.
from gpu-utils.
Thanks!
from gpu-utils.
Enhancement is complete and will be released as a package in v3.8.1. Need to delay this to support v3.8.0 official Debian package release.
from gpu-utils.
Related Issues (20)
- Feature Request: Support values from sysfs gpu_metrics
- index out of bound error HOT 4
- Can not read parameter and list index out of range HOT 5
- Tool doesn't see GPUs when PCI address has multiple domains HOT 9
- Add GDDR6X memory temps to the sensor readouts for Nvidia cards
- unsupported operand type(s) for *: 'float' and 'NoneType' in GPUmodule.py HOT 29
- Ubuntu 22.04 Debian Package - Invalid Icon Path HOT 1
- Warning: apt-key is deprecated in Ubuntu 22.04 HOT 1
- env.py: conversion of hexadecimal to int fails HOT 2
- Wrong vendor for on-board GPU HOT 1
- AMD Ryzen 5 5700G with Cezanne not working HOT 5
- ValueError: invalid literal for int() with base 10 at GPUmodules.py line 1236 in read_gpu_pstates HOT 10
- RX7900 (gfx11) Cards Fan Control is Not Functional HOT 10
- When using gpu-pac I receive an error HOT 2
- Support for MacOS-X ? HOT 2
- ValueError: invalid literal for int() with base 10: HOT 12
- VRAM and GTT memory usage reported as None HOT 5
- Q: had it been tested w/ latest Debian bpo Kernel? HOT 14
- PermissionError: [Errno 1] Operation not permitted HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gpu-utils.