View Single Post
Old 06-22-11, 07:14 PM   #9
lancelot2
Registered User
 
Join Date: Mar 2009
Posts: 12
Default Re: default fan speed at 100% on 9600GT

I found a fix for the fan noise. I am now able to reduce my fan speed to 35% whenever the 9600GT won't do it by itself, that is to say:
- when X is not started, whatever driver I'm using
- when I use nouveau rather than the proprietary nvidia module.

I thought I'd share since google tells me so many people have some kind or the other of excessive fan speed and noise issue with the 9600GT (including windows user...). If you have said issue, you may find what follows useful, however please be warned that whatever your try will be at your own risk.

In order to get a fan speed of 35%, you need to have the following values in your registers:
Code:
NV_E100 (0xe100): 00001b00
NV_E11C (0xe11c): 0000021c
NV_E120 (0xe120): 000000bd
Instead, what I normally get when X is not started is the following:
Code:
NV_E100 (0xe100): 00001900
NV_E11C (0xe11c): 00000001
NV_E120 (0xe120): 00000000
E11C and E120 are a PWM thingie, this is explained in nvclock's comments. Don't ask me why it's also necessary to have E100 set at 00001b00, I found it by comparing output of nvclock -D in situations when it works and situations when it don't. This value of E100 is the reason why nvclock wouldn't help when I first tried two years ago.

I noticed a glitch that comes with my fix: after rebooting from a system with the fan speed fixed through the above register values, I get ugly color squares and/or lines flashing on my primary screen for approx. 1 second, in-between when the system leaves the BIOS and when it enters GRUB.

You'll find below a patch to nvclock which I used to set the above register values.
Code:
diff -rupN nvclock0.8b4/src/backend/nv50.c nvclock0.8b4-patched-20110623//src/backend/nv50.c
--- nvclock0.8b4/src/backend/nv50.c     2009-01-04 11:46:39.000000000 +0100
+++ nvclock0.8b4-patched-20110623//src/backend/nv50.c   2011-06-23 00:57:40.748981389 +0200
@@ -160,6 +160,7 @@ static float g84_get_fanspeed()
 static void g84_set_fanspeed(float speed)
 {
        int value;
+       nv_card->PMC[0xe11c/4] = 0x0000021c;
        int pwm_divider = nv_card->PMC[0xe11c/4] & 0x7fff;
 
        /* For safety reasons we should never disable the fan by not putting it below 10%; further negative values don't exist ;)  */
@@ -175,6 +176,7 @@ static void g84_set_fanspeed(float speed
        /  value. Apparently 0xe300 acts like a multiplexer?
        */
        value = 0x80000000 | (nv_card->PMC[0xe120/4] & 0x7fff0000) | (((int)(100 - speed) * pwm_divider/100) & 0x7fff);
+       nv_card->PMC[0xe100/4] = 0x00001b00;
        nv_card->PMC[0xe120/4] = value;
 }
 
diff -rupN nvclock0.8b4/src/nvclock.c nvclock0.8b4-patched-20110623//src/nvclock.c
--- nvclock0.8b4/src/nvclock.c  2009-01-04 11:54:28.000000000 +0100
+++ nvclock0.8b4-patched-20110623//src/nvclock.c        2011-06-23 00:56:59.500981357 +0200
@@ -940,6 +940,7 @@ int main(int argc, char *argv[])
                printf("Adjusted the pci id to 0x%x (%s)\n", nv_card->device_id, nv_card->card_name);
        }
 
+       nv_card->PMC[0xe11c/4] = 0x0000021c;
        if(fanspeed_opt && force_opt)
        {
                float dutycycle;
@@ -947,7 +948,6 @@ int main(int argc, char *argv[])
                if(!(nv_card->caps & (GPU_FANSPEED_MONITORING | I2C_FANSPEED_MONITORING)))
                {
                        fprintf(stderr, "Error: Your card doesn't support fanspeed adjustments!\n");
-                       return 0;
                }
 
                if(fanspeed[0] == '+' || fanspeed[0] == '-')
The patch is really dirty, don't use it for anything else than its intended purpose, and don't use it on any card other than the 9600GT. You should be able to reduce your fan speed to 35% by running nvclock twice:
Code:
nvclock -f -F 65
nvclock -f -F 65
Same comment as above, there is no warranty. If your card is destroyed, too bad, this is what you get for writing random values you fetched from a forum into your GPU registers.
lancelot2 is offline   Reply With Quote