nbfc-linux icon indicating copy to clipboard operation
nbfc-linux copied to clipboard

[ Fixed]: Acer Nitro 5 > Adjust The Right CPU and NVIDIA GPU Sensors !!! GPU uses CPU sensor

Open mecrayavcin opened this issue 2 weeks ago • 3 comments

I have i5 12500h CPU, and 3050ti Nvidia GPU. Acer Nitro 5 AN515-58 pacman -S nvidia-open nvidia-utils intel-media-driver nvidia-prime installed already.

By default when you type nbfc sensors show

❯ nbfc sensors show                                   
#0 (CPU Fan):
  Sensors:   @CPU (service config)
  Algorithm: Average (default)

#1 (GPU Fan):
  Sensors:   @CPU (service config)
  Algorithm: Average (default)

This means, GPU uses CPU sensor as well! According to CPU temperature, CPU and GPU fan speeds move in sync.

To fix this, we need to set the right sensor for GPU!

  1. Create a code, tracks the GPU temperature

nvim ~/.local/bin/gpu-temp

#!/bin/sh
/usr/bin/nvidia-smi --query-gpu=temperature.gpu --format=csv,noheader,nounits | cut -d. -f1

chmod +x ~/.local/bin/gpu-temp

  1. Set right sensors!
sudo nbfc sensors set -f 1 -s '$ /usr/local/bin/gpu-temp'
sudo systemctl restart nbfc_service
sleep 3
nbfc status

sudo nbfc sensors set -f 0 -s @CPU
sudo systemctl restart nbfc_service
sleep 5
nbfc status
nbfc sensors show
  • By default, @CPU was set for -f 0 but when you set the right sensor for GPU, this makes a bug for CPU censor, and you it shows CPU temperature 0, so you must set sensors one by one as above.

That's all. Type nbfc sensors show

dotfiles 󰣇  main ❯ nbfc sensors show              
#0 (CPU Fan):
  Sensors:   @CPU (service config)
  Algorithm: Average (default)

#1 (GPU Fan):
  Sensors:   $ /usr/local/bin/gpu-temp (service config)
  Algorithm: Average (default)

Now NBFC reads the right Nvidia Temperature for your GPU.

mecrayavcin avatar Nov 15 '26 17:11 mecrayavcin

There's a nvidia-ml sensor for GPU already.

Does sudo nbfc sensors set -f 1 -s @GPU and then restarting the service work?

Regards,

Benjamin

braph avatar Nov 15 '26 17:11 braph

There's a nvidia-ml sensor for GPU already.

Does sudo nbfc sensors set -f 1 -s @GPU and then restarting the service work?

Regards,

Benjamin

Thank you. I don't know much about this repo. I didn't know command you posted. thanks

~ 󰣇 ❯ nbfc sensors list                                                
acpitz:
	/sys/class/hwmon/hwmon1/temp1_input
nvme:
	/sys/class/hwmon/hwmon3/temp1_input
	/sys/class/hwmon/hwmon3/temp2_input
	/sys/class/hwmon/hwmon3/temp3_input
acer:
	/sys/class/hwmon/hwmon4/temp1_input
	/sys/class/hwmon/hwmon4/temp2_input
	/sys/class/hwmon/hwmon4/temp3_input
coretemp:
	/sys/class/hwmon/hwmon5/temp1_input
	/sys/class/hwmon/hwmon5/temp2_input
	/sys/class/hwmon/hwmon5/temp6_input
iwlwifi_1:
	/sys/class/hwmon/hwmon6/temp1_input
nvidia-ml:
	none
~ 󰣇 ❯ 

I have tried your command and i think that works. But i don't know why it says none for nvidia-ml?

mecrayavcin avatar Nov 15 '26 18:11 mecrayavcin

One potential caveat for users with hybrid graphics laptops:

Using @GPU may interfere with NVIDIA GPU runtime power management. NBFC's @GPU sensor group uses nvidia-ml, and initializing or querying NVML can wake up a discrete NVIDIA GPU that would otherwise be suspended in D3cold.

This behavior has been experimentally reported in other applications using NVML: https://github.com/aristocratos/btop/issues/1831

I tested this on my own Acer Nitro AN517-55. When I used @GPU, the NVIDIA GPU did not enter D3cold while NBFC was running.

With my current configuration, which uses @CPU and acpitz instead of @GPU, the discrete GPU is able to enter D3cold when idle. However, I haven't yet established how effectively this configuration responds to GPU temperature under load, since it does not directly monitor the GPU temperature.

It would be useful if other users could check whether enabling @GPU prevents their discrete NVIDIA GPU from entering or remaining in D3cold. The behavior may vary depending on the GPU, driver and system configuration.

I am not claiming this is necessarily an NBFC bug, but I think this potential power-management side effect is worth investigating and documenting, especially for hybrid graphics laptop users.

Archeex7 avatar Nov 16 '26 08:11 Archeex7