Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.4 Xbox with kpatch 1.0.x m8plus bios displays ridiculous CPU temps in xbmc4xbox dashboard #24

Open
dzastsed opened this issue Aug 11, 2021 · 3 comments

Comments

@dzastsed
Copy link

Noticed this issue on both kpatch 1.0.0 and 1.0.1 bioses.
Right after starting up the dashboard, it will display CPU temperature in 1k+ degrees Celsius range. If you switch between skins (for example, project mayhem 3 to confluence lite), temperatures will display correctly, but if you re-start the dashboard again, they will be displayed wrongly again. When testing this with earlier patched bios, such as iND5003 1.4.3, they get displayed correctly from the beginning.
Exact dashboard version and system specs: XBMC4XBOX 3.5.3-r33027, 1.4 system with XBOXHDMI board on 2.0.5 firmware
some pictures:
image
image
image

@LoveMHz
Copy link
Contributor

LoveMHz commented Aug 11, 2021

More than likely just a bug in XBMC.

The GetCPUTempInternal() function here is very suspect. Direct I/O calls outside of the kernel should be wrapped in KeEnterCriticalRegion/KeLeaveCriticalRegion(), especially since the application is multi-threaded. Additionally, it appears that on 1.6 systems it's just reading the temp from the SMC over the SMBus and should be calling the HalReadSMBusValue() kernel function instead.

If that's the case then it would have to be corrected inside of the application. Non-official software has a very low chance of having a workaround implemented in our kernel patches. (Not to mention the complexity of targeting all of the different builds)

I'll circle back around to this later, but if someone wants to reimplement CFanController::GetCPUTempInternal() correctly to see if it fixes the issue then that would be much appreciated!

@LoveMHz
Copy link
Contributor

LoveMHz commented Jun 10, 2022

Closing this as it's outside the scope of the HD+. Notes have been left on what can be done to fix the issue inside of XBMC's codebase.

@AR1972
Copy link

AR1972 commented Feb 13, 2024

XBMC appeared to be going around the kernel to read CPU temps, switching to HalReadSMBusValue() fixed this issue for me, side benefits are that you don't have to wait for 10 samples to get a CPU temp on the 1.6 Xbox.
`void CFanController::GetCPUTempInternal()
{
unsigned long temp;

if (!bIs16Box)
{
HalReadSMBusValue(0x98, 0x01, FALSE, (LPBYTE)&temp);
}
else
{
//1.6. Read SMC instead
HalReadSMBusValue(PIC_ADDRESS, 0x09, FALSE, (LPBYTE)&temp);
}
cpuTemp = CTemperature::CreateFromCelsius((double)temp);
}`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants