X Error of failed request: BadValue (integer parameter out of range for operation)
pinpox opened this issue · comments
I get this error when trying to run the program.
I'm on linux arch, everything up-to-date.
Laptop is a Lenovo Y500 with 2 geforce 650m
❯ sudo nvfancontrol -d
WARN - No config file found; using default curve
DEBUG - Curve points: [(41, 20), (49, 30), (57, 45), (66, 55), (75, 63), (78, 72), (80, 80)]
INFO - NVIDIA driver version: 381.22
INFO - NVIDIA graphics adapter #1: GeForce GT 650M
INFO - NVIDIA graphics adapter #2: GeForce GT 650M
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 156 (NV-CONTROL)
Minor opcode of failed request: 2 ()
Value in failed request: 0x17
Serial number of failed request: 24
Current serial number in output stream: 24
As the program stands there is no support for multiple GPU configurations. It should not really be hard to support multiple GPUs but I can not test the code effectively as I only have one card. So in order to do anything I would need feedback. I have attached a build with more verbose output so that I can see where the error is triggered. Please send the output until the program crashes.
Thanks!!
Oh! And running it as root is not really necessary.
MD5 nvfancontrol.gz: 83c1b71e283a64fbb29e4a7910163ae2
MD5 nvfancontrol: 0cc7fb8a3d23f871b10eb110dfed3112
@foucault Thanks for the build!
This is the output, without root.
WARN - No config file found; using default curve
NvidiaControl::init() opening display :0
NvidiaControl::init() display :0 opened successfully
NvidiaControl::init() counting GPUs
NvidiaControl::init() GPUs enumerated
get_version() enter
get_version() querying attribute CTRL_ATTR::NVIDIA_DRIVER_VERSION
get_version() querying attribute CTRL_ATTR::NVIDIA_DRIVER_VERSION succeeded
get_version() enter
get_version() querying attribute CTRL_ATTR::NVIDIA_DRIVER_VERSION
get_version() querying attribute CTRL_ATTR::NVIDIA_DRIVER_VERSION succeeded
INFO - NVIDIA driver version: 381.22
get_adapter() enter, checking gpu_id 0
get_adapter() enter, gpu_id 0 checked out
get_adapter() querying attribute CTRL_ATTR::PRODUCT_NAME on CTRL_TARGET::GPU
get_adapter() querying attribute CTRL_ATTR::PRODUCT_NAME on CTRL_TARGET::GPU succeeded
INFO - NVIDIA graphics adapter #1: GeForce GT 650M
get_adapter() enter, checking gpu_id 1
get_adapter() enter, gpu_id 1 checked out
get_adapter() querying attribute CTRL_ATTR::PRODUCT_NAME on CTRL_TARGET::GPU
get_adapter() querying attribute CTRL_ATTR::PRODUCT_NAME on CTRL_TARGET::GPU succeeded
INFO - NVIDIA graphics adapter #2: GeForce GT 650M
>>>> LOOP START
update() Updating temp
get_temp() enter, checking gpu_id 0
get_temp() gpu_id 0 checked out
get_temp() querying attribute CTRL_ATTR::CORE_TEMPERATURE on CTRL_TARGET::GPU
get_temp() querying attribute CTRL_ATTR::CORE_TEMPERATURE on CTRL_TARGET::GPU succeeded
update() Updating temp done
update() Updating ctrl status
get_ctrl_status() enter, checking gpu_id 0
get_ctrl_status() gpu_id 0 checked out
get_ctrl_status() querying attribute CTRL_ATTR::COOLER_MANUAL_CONTROL on CTRL_TARGET::GPU
get_ctrl_status() querying attribute CTRL_ATTR::COOLER_MANUAL_CONTROL on CTRL_TARGET::GPU succeeded
update() Updating ctrl status done
update() Reading RPM
get_fanspeed_rpm() enter, checking gpu_id 0
get_fanspeed_rpm() gpu_id 0 checked out
get_fanspeed_rpm() querying attribute CTRL_ATTR::THERMAL_COOLER_SPEED on CTRL_TARGET::COOLER
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 156 (NV-CONTROL)
Minor opcode of failed request: 2 ()
Value in failed request: 0x17
Serial number of failed request: 24
Current serial number in output stream: 24
From what little I can gather from this output it seems like there are no software-controlled fans, because the only possible out-of-range BadValue
that get_fanspeed_rpm()
can emit is when selecting the coolers. Still, try this build; it should print an INFO with the number of available coolers when the program starts. For example in my computer I get
INFO - Found 1 cooler(s)
before >>>> LOOP START
MD5 nvfancontrol.gz: 0548dc1acbc078509a1f0a7130d432df
MD5 nvfancontrol: 43103d68151719cd741ea364ffe10b5a
@foucault this is the output of the new binary:
❯ ./nvfancontrol\ \(2\)
WARN - No config file found; using default curve
NvidiaControl::init() opening display :0
NvidiaControl::init() display :0 opened successfully
NvidiaControl::init() counting GPUs
NvidiaControl::init() GPUs enumerated
get_version() enter
get_version() querying attribute CTRL_ATTR::NVIDIA_DRIVER_VERSION
get_version() querying attribute CTRL_ATTR::NVIDIA_DRIVER_VERSION succeeded
get_version() enter
get_version() querying attribute CTRL_ATTR::NVIDIA_DRIVER_VERSION
get_version() querying attribute CTRL_ATTR::NVIDIA_DRIVER_VERSION succeeded
INFO - NVIDIA driver version: 381.22
get_adapter() enter, checking gpu_id 0
get_adapter() enter, gpu_id 0 checked out
get_adapter() querying attribute CTRL_ATTR::PRODUCT_NAME on CTRL_TARGET::GPU
get_adapter() querying attribute CTRL_ATTR::PRODUCT_NAME on CTRL_TARGET::GPU succeeded
INFO - NVIDIA graphics adapter #1: GeForce GT 650M
get_adapter() enter, checking gpu_id 1
get_adapter() enter, gpu_id 1 checked out
get_adapter() querying attribute CTRL_ATTR::PRODUCT_NAME on CTRL_TARGET::GPU
get_adapter() querying attribute CTRL_ATTR::PRODUCT_NAME on CTRL_TARGET::GPU succeeded
INFO - NVIDIA graphics adapter #2: GeForce GT 650M
INFO - Found 0 cooler(s)
>>>> LOOP START
update() Updating temp
get_temp() enter, checking gpu_id 0
get_temp() gpu_id 0 checked out
get_temp() querying attribute CTRL_ATTR::CORE_TEMPERATURE on CTRL_TARGET::GPU
get_temp() querying attribute CTRL_ATTR::CORE_TEMPERATURE on CTRL_TARGET::GPU succeeded
update() Updating temp done
update() Updating ctrl status
get_ctrl_status() enter, checking gpu_id 0
get_ctrl_status() gpu_id 0 checked out
get_ctrl_status() querying attribute CTRL_ATTR::COOLER_MANUAL_CONTROL on CTRL_TARGET::GPU
get_ctrl_status() querying attribute CTRL_ATTR::COOLER_MANUAL_CONTROL on CTRL_TARGET::GPU succeeded
update() Updating ctrl status done
update() Reading RPM
get_fanspeed_rpm() enter, checking gpu_id 0
get_fanspeed_rpm() gpu_id 0 checked out
get_fanspeed_rpm() querying attribute CTRL_ATTR::THERMAL_COOLER_SPEED on CTRL_TARGET::COOLER
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 156 (NV-CONTROL)
Minor opcode of failed request: 2 ()
Value in failed request: 0x17
Serial number of failed request: 25
Current serial number in output stream: 25
The GPUs have a cooler, it can be controlled with the Lenovo Energy Management Utility in windows. I'm looking for a way to get it to work on linux, since I feel It should kick in sooner
Yes it is as I was suspecting. It seems NV-CONTROL (the X11 protocol that nvfancontrol
uses) can not find any controllable fans. Since this is a laptop there is some chance that the fans are governed by the motherboard firmware instead of the nvidia chipset itself. Can you please check if you can set the fan speed through nvidia-settings
? You can do that either through the command line by issuing
nvidia-settings -a "[gpu:0]/GPUFanControlState=1" -a "[fan:0]/GPUCurrentFanSpeed=X"
where X is the percentage of the fan speed (eg 50 for 50%), or through GUI
That doesn't seem to work for me:
❯ nvidia-settings -a "[gpu:0]/GPUFanControlState=1" -a "[fan:0]/GPUCurrentFanSpeed=90"
Attribute 'GPUFanControlState' (binaryplease-laptop:0[gpu:0]) assigned value
1.
ERROR: Error resolving target specification 'fan:0' (No targets match target
specification), specified in assignment
'[fan:0]/GPUCurrentFanSpeed=90'.
As long as Coolbits is enabled fans should have been exposed for direct control to NV-CONTROL. Since this doesn't seem to be the case the GPU fan is most probably handled by the motherboard firmware. As such, there is not must that I can do, I'm afraid :-(
Well thanks anyway for your help. I have not been able to control it via the motherboard on linux though. Seems to be a windows-exclusive feature.