Commit Graph

27 Commits (master)

Author SHA1 Message Date
flightlessmango 2e0197718b nvctrl: change some errors to debug 3 months ago
Tianhao Chai 29058a09bb nvctrl: call XDefaultScreen for screen id (#1152)
Calling nvctrl XNVCTRLIsNvScreen with X display ID used for screen id is
a programmer error. For most common use cases, Gnome on X11 may launch
user sessions on X display ":1" but still uses screen 0. Current code
will always fail to find a correct display in this case, as both
`IsNvScreen(":0", 0)` and `IsNvScreen(":1", 1)` returns false.

Call XDefaultScreen with `struct Display *` to obtain the correct screen
id, then use this id for `IsNvScreen()`.
7 months ago
Self Denial 0341e28e05 Move num_coolers to global var & update at init within checkXNVCtrl(). 8 months ago
Self Denial 10e5abcccc Attempt to query number of coolers before fan_speed. Inspiration: https://github.com/NVIDIA/nvidia-settings/blob/main/samples/nv-control-targets.c 8 months ago
jackun 5fde8749af
Use a "get" function to initialize X11 loader...
...so static init doesn't spam log before we got that set up properly.
12 months ago
FlightlessMango cbf531e6c8 nvml: use xnvctrl if available to get fan speed 1 year ago
FlightlessMango 016728b450 nvctrl: fan speed 1 year ago
Emil Velikov eecd451068 meson: build with -Werror=missing-declarations
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
1 year ago
jackun a82e27d978
Use spdlog macros so logging can be completely disabled during compile-time 3 years ago
jackun 2f807a4c0d
Add `spdlog` wrap and logging 3 years ago
jackun fcefc07966
Load libnvidia-ml and libXNVCtrl on demand 4 years ago
FlightlessMango 1750c43716 No need to convert deviceID twice 4 years ago
FlightlessMango a2cc14f738 Get deviceID 4 years ago
jackun 86f8ebed30
Trying to find XNVCtrl's display by iterating through 16 displays. 4 years ago
jackun 6caa4a5173
Try load XNVCtrl as "libXNVCtrl.so.0"
Seems not all distro symlink also to libXNVCtrl.so
4 years ago
jackun 723c6bedeb
Fix `init_x11` return value and X11/XNVCtrl logic checks 4 years ago
jackun 2f034c6d1e
Use X11 loader functions instead of linking to X11 libs 4 years ago
jackun 049e960589
Add 'use_xnvctrl' feature to allow building without libXNVCtrl support 4 years ago
FlightlessMango 0d53d7d39d Fixed typo in nvctrl 4 years ago
FlightlessMango 85291d25ef Added warning messages for nvctrl 4 years ago
jackun fbae1dfcc0
More checks for XNVCtrl support. Favor NVML but fallback to XNVCtrl if supported. 4 years ago
jackun b059fa26bc
xnvctrl: parse tokenized attributes 4 years ago
FlightlessMango 79add746b5 Removed debugging messages 4 years ago
FlightlessMango f2b770abac Use XNVCTRLQueryTargetAttribute64 instead 4 years ago
FlightlessMango aaaf30b807 NVctrl fetching 4 years ago
FlightlessMango 1e475ac02c removed unused nvctrl 4 years ago
FlightlessMango 6affdb8c51
fetch nvidia vram used from nvctrl 4 years ago