Xbox 1.6 CPU temperature support
#1
hi,

the old way of checkin the cpu temperature doesn't work in a 1.6 anymore as the temperature sensor on i2c address 0x4c is gone. i recently discovered that the temperature sensor now recides inside the xcalibur. the temperature is a bit jumpy and i tried to fix this by taking an average of 10 samples. i have been testing it and it looks good and reports the temps in a good way.

some of you will argue that the cpu temp does work in a 1.6, but thats not true. it might look like its working but here is the explanation:


every thing is done over the smbus/i2c:
1) gpu temp from reg 0x0a form the pic
2) read out the temp from the smbus controller data reg
3) store it as gputemp
4) request the cpu temp high byte from the temperature sensor (@0x4c)
5) read fails, but it isn't checked for so it reads out the smbus controller data reg thinking its the cpu temp but it is the old gpu temp value.
6) request the cpu temp low byte from the temperature sensor (@0x4c)
7) same thing as in step 5 happens
8) calculate and store cputemp = cpuhigh + cpulow/256, which in reality is cputemp = gpu + gpu/256

example, my temps are now at:
cpu: 49.79 gpu: 49.60

remove the 0.8 factor that 1.6 temps get adjusted with:
gpu: 62

cputemp = gpu + gpu/256 = 62 + 62/256 = 62.2421875

add the 0.8 factor again

cputemp = 62.2421875*0.8 = 49.79375 ~ 49.79

and were back.. so, thats why it looks like your temp sensor is working in a 1.6! Shocked

so, this code is not the prettiest, but at least it's not worse than the old code =)

i have added two variables in fancontroller.h
float cputempfrac
int cputempcount

they are used to calculate the average over 10 samples.

in fancontroller.c i have modified:
void cfancontroller::cfancontroller()
void cfancontroller::getcputempinternal()

for more info regarding the xcalibur temperature sensor see:
http://www.xboxhacker.net/forums/index.php?topic=572.0
http://forums.xbox-scene.com/index.php?showtopic=501872

the code:
http://pablot.com/misc/fancontroller.cpp
http://pablot.com/misc/fancontroller.h

i think it looks and works good now. please post your opinions.

/pablot
Reply
#2
wow fantastic work... ill be sure to do some testing with it

thanks! im sure other dashboard developers will be eager to port this over too Wink
Reply
#3
makes sence, did some testing with pike a while back and cpu and cpudec was always the same value, so probably like you say it was reading the gpu readout for all values.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#4
question is... will this work in any xbox.. is it conditional on the xbox being 1.6 v or is it locked in and shows nothing on a 1.0-1.5?

**i have a 1.6 and plan to give this a spin later today, but some of the modding i do for others is 1.0-1.5 and wondered if it would function on them correctly.

of course if much as it always is.. if this is already in cvs by all means disreguard me completely, my wife and kids do!



Image
Reply
#5
jepp, this fix is conditional. it check is it is a 1.6, if not, it performes the old procedure, if it is a 1.6 then it does my new one. so it shouldn't interfer at all with older xboxes. and it's not in the cvs yet.

it would be good if someone could test this with automatic fan control, to see that it doesn't change the fan speed to often. i can't do this as i don't have a original fan and have done a 12v mod.



Reply
#6
will do a build from todays cvs and see what happens Wink
Image
Reply
#7
you'll need to change to the fancontroller.c/.h that i supplied in this thread then, the cvs is not updated.
Reply
#8
yap, is why i already snagged them Wink
Image
Reply
#9
seems to be working here.
before this fix the cpu temp seemed to be .2 of a dregree above gpu temp pretty much always. (never really looked much though)
fluctuates a bit now but seems to be realistic.

good job and thanks......

snappz
XFX nFORCE 630I, ASUS EN9400gt (512m), Antec Fusion V2 case, E6850 @ 3Ghz, 2GB 800mhz Ram.
Sony KDL52X3100. Integra DTR10.5.
Reply
#10
look like it working over here... ~46 avg temp at idle.

thanks again pablot
Reply
#11
sounds good.. if you guys with a xbox v1.6 can confirm that the above changes show the correct values then i will put the code change into the cvs..

i can't test the values.. i don't have a xbox v1.6

regards
geminiserver
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#12
would still be good if some one with a 1.6 could report back how automatic fan control works with this..
Reply
#13
i got reports about temp jumps from 50->60->50 or similar.. it originated in me not checking if there was a error on the bus and thus reading out faulty values from time to time. i made it check for bus errors and ignore the data if there was an bus error.

the files are updated, those jumps should not be present any more.
Reply
#14
building now.. my main terminal went down so i had to get set back up... will let you know later today how it goes.

thanks for the work so far Wink

ok, running a 1.6 box. when i turn off fan speed override as well as have the desired temp set to off the fan stops completely (if i recall this is when the board should take over on its own to cool the system but i could be wrong). if i set a % and a designated temp (with either setting on) it runs at a constant speed though so nothing eratic there. and its reporting my cpu @ 25 f above my gpu which sounds about right.

hope this helps.



Image
Reply
#15
this is now in cvs.

Smile
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply

Logout Mark Read Team Forum Stats Members Help
Xbox 1.6 CPU temperature support0