Bug 78106

Summary: Reported fan rpm is twice the actual value (NVC0)
Product: xorg Reporter: Marcel Dopita <mdop>
Component: Driver/nouveauAssignee: Nouveau Project <nouveau>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Kernel log
none
Xorg log
none
Bioses none

Description Marcel Dopita 2014-04-30 09:02:55 UTC
Created attachment 98224 [details]
Kernel log

I have Gigabyte GTX 560 Ti Ultra Durable (01:00.0 VGA compatible controller: NVIDIA Corporation GF114 [GeForce GTX 560 Ti] (rev a1)) and Nouveau doesn't report correct fan speed. Reported value is exactly twice the actual speed. 

$ pacman -Q | grep nouveau
nouveau-dri 10.1.1-2
xf86-video-nouveau 1.0.10-2
$ sensors
...
nouveau-pci-0100
Adapter: PCI adapter
fan1:        6840 RPM
temp1:        +31.0°C  (high = +95.0°C, hyst =  +3.0°C)
                       (crit = +105.0°C, hyst =  +5.0°C)
                       (emerg = +135.0°C, hyst =  +5.0°C)
...

When I follow Documentation/thermal/nouveau_thermal and the speed to 100%, nouveau reports "fan1: 6840 RPM" while the highest reported RPM by Windows (both Gigabyte tools and CPU-Z) is 3390 or 3420 RPM. Similar to when I set the lowest speed (I have modified bios and my pwm1_min is 30) nouveau reports "fan1: 3180 RPM" while Windows shows 1560 or 1590 RPM.
Could that be because the card has two physical fans? Reporting the speed of single fan would make more sense IMHO.
Comment 1 Marcel Dopita 2014-04-30 09:03:21 UTC
Created attachment 98225 [details]
Xorg log
Comment 2 Martin Peres 2014-04-30 09:31:09 UTC
Hi Marcel,

I was expecting to get a bug report on that much sooner. I will need to dive in the vbios tables again to fix this.

The way fan speed is calculated is by reading the number of impulsions sent by the hw tachometer. The tachometer has 1/2/4 or 8 pulses per turn. I couldn't find information in the vbios as for how many pulses per turn I should expect. I made it to work for all my cards (the same value worked everywhere) and thought maybe NVIDIA forced manufacturers to use fans with the right number of pulses per rotation (although it was weird).

Could you extract your vbios[0] and attach it to this bug report? It will help me in my quest to find the byte I'm looking for!

Thanks!

[0] http://nouveau.freedesktop.org/wiki/DumpingVideoBios/
Comment 3 Marcel Dopita 2014-04-30 10:29:01 UTC
Created attachment 98232 [details]
Bioses

I'm attaching original bios for my card (1), bios which I modified and flashed under Windows (2) and the dumped one (3).
All three seem to differ so I'm attaching them all. I hope that modifying of bios (lower min fan threshold from 40 to 30) is not causing this issue. Let me know if you need me to verify it with stock bios. You have all the bioses but I can verify it if it's too much trouble looking in the bios rom. I just hate noise ;)

Thanks for looking into it.
Comment 4 Martin Peres 2014-05-21 12:34:38 UTC
Hi Marcel,

I had a look at your problem last week and the patch landed in Ben Skeggs' tree: http://cgit.freedesktop.org/~darktama/nouveau/commit/?id=0a6c57d0bbbffca7346627974c15b1d348c1fcb5

The fix will land in Linux 3.15. It could be backported, but I'm not sure it is worth the effort.

Thanks for the reporting this issue!

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.