Sunday, June 1, 2008

nvidia 8800 GT GPU temperature with linux

This modification of nvclock works and is accurate with my video card, but I accept no responsibility for damages this modified software may create. This software and information is provided 'As Is'.

I'm the unlucky owner of an ASUS EN8800GT.

This card basically do the job. However, ASUS has disabled the standard temperature and fan control system to allow only their own ugly software which works only with windows to monitor the card.
Under linux, nvidia-setting software return nothing for temperature. This is disappointing.

Luckily, I found a solution to be able to read, at least the GPU temperature on my Ubuntu Box.
I found that nvclock v0.8 beta3 was able to report a GPU temperature. However, this value is not good. So I modified nvclock to report correctly the temperature. Find below the patch for the file src/backend/nv50.c:
139a140,146
>
> //Temperature support for G92
> if(( (nv_card->bios->device_id&0xff00) == 0x600)||( (nv_card->bios->device_id&0xff00) == 0x610))
> {
> temp = nv_card->PMC[0x20008/4]&0x3fff;
> return (-13115 + temp) / 18.7 + 1;
> }

Nicolas (see comment below and thank you for your update) reported that since nvclock 0.8 beta4, a new patch is necessary to provide the good temperature (not -380° or so). Here is the code:

--- src/backend/nv50_old.c 2009-01-04 11:46:39.000000000 +0100
+++ src/backend/nv50.c 2009-05-26 14:21:12.000000000 +0200
@@ -229,7 +229,7 @@
printf("divider=%f, offset=%f\n", divider, offset);
}

- temp = nv_card->PMC[0x20008/4] & 0x1fff;
+ temp = nv_card->PMC[0x20008/4] & 0x3fff;
return (int)(temp + offset)/divider;
}

Now, it reports the temperature correctly, and other video cards still work correctly.

The result looks like that:



I hope this is helpful to you.

5 comments:

Unknown said...

hi, is the nvclock able to controll fan of your card? I have the TOP verzion of this card which is overclocked by default and nvclock 0.8b3 or nvidia driver 169.07 knows nothing about fan constrol.

fan is running on 100% all the time

Walter said...

In fact, nvclock says fan control is not supported on my card.

jandr said...

I have tried nvclock beta4, and the temperature it reports is -363 degrees, so obviously it is wrong. Was this the kind of wrong measure you were getting? If so, I will try downloading the source code and applying your patch.

jandr said...

(I forgot to say that I am also using 8800 GT from Asus)

Unknown said...

for the asus 8800GT with nvclock 0.8 beta4, most of the logic from the beta3 patch has been included, but there appears to be a small typo that prevents it from working.
The following patch works for me (watch out for line wrappings and formatting, basically it's a single character change).

Regards,
Nicolas


--- src/backend/nv50_old.c 2009-01-04 11:46:39.000000000 +0100
+++ src/backend/nv50.c 2009-05-26 14:21:12.000000000 +0200
@@ -229,7 +229,7 @@
printf("divider=%f, offset=%f\n", divider, offset);
}

- temp = nv_card->PMC[0x20008/4] & 0x1fff;
+ temp = nv_card->PMC[0x20008/4] & 0x3fff;
return (int)(temp + offset)/divider;
}