NX-FanControl

Hi, this is my first switch project. With this sysmodule you can control the fan speed based on SoC temperature (the switch uses tskin temperature). Actually the sysmodule causes the switch to reboot if other software that check fan speed is opened (e.g. Status Monitor), so I created a library to easily add the fan control logic in other software (Status Monitor fork is WIP). With the overlay you can change the fan curve and set it without rebooting the console
NX-FanControl:
aHR0cHM6Ly9naXRodWIuY29tL1phdGhhd28vTlgtRmFuQ29udHJvbA==
libfancontrol:
aHR0cHM6Ly9naXRodWIuY29tL1phdGhhd28vbGliZmFuY29udHJvbA==

the links are b64 encoded because I'm new to the forum and i can't post links
 
@Zathawo
Cool!.. BTW, for now when I'm trying to open hbmenu with NX-FanControl sysmodule is ON, console just completely hang up into black screen, even without a proper Atmosphere BSOD.

AMS 1.7.1, FW 18.1.0, nx-hbloader v2.4.4.
 
I can always try to move reading fan level to something else. I know it's possible to do that via IO, but maybe I will find a better way...
Post automatically merged:

Reimplemented access to "pwm" service and switched reading fan rotation level from pwm duty cycle.

So now it doesn't conflict with your sysmodule.
https://github.com/masagrator/Status-Monitor-Overlay/releases/tag/1.1.3
Post automatically merged:

And also reporting issues with accessing hbmenu when your sysmodule is running.

Beside that your overlay is getting slow as f when sysmodule is enabled.
 
Last edited by masagrator,
I can always try to move reading fan level to something else. I know it's possible to do that via IO, but maybe I will find a better way...
Post automatically merged:

Reimplemented access to "pwm" service and switched reading fan rotation level from pwm duty cycle.

So now it doesn't conflict with your sysmodule.
Post automatically merged:

And also reporting issues with accessing hbmenu when your sysmodule is running.

Beside that your overlay is getting slow as f when sysmodule is enabled.
Thanks for the update, I want to study your code. Yes, the overlay is slow as f and I think is because in the update function I continuously fetch the config file and I wanna solve asap. As regards hbmenu crashing when the sysmodule is running, as soon as I have free time I’ll try to reproduce the issue
Post automatically merged:

@Zathawo
Cool!.. BTW, for now when I'm trying to open hbmenu with NX-FanControl sysmodule is ON, console just completely hang up into black screen, even without a proper Atmosphere BSOD.

AMS 1.7.1, FW 18.1.0, nx-hbloader v2.4.4.
Do you have any other sysmodule or hombrew that can access the fan controller?
 
I have the same issue as @mathew77, when I'm trying to open hbmenu with NX-FanControl sysmodule is ON, console just completely hang up into black screen, even without a proper Atmosphere BSOD.


Feature request: Can you make more presets? like 8-10 to finetune the curve.
 
  • Like
Reactions: mathew77
I have the same issue as @mathew77, when I'm trying to open hbmenu with NX-FanControl sysmodule is ON, console just completely hang up into black screen, even without a proper Atmosphere BSOD.


Feature request: Can you make more presets? like 8-10 to finetune the curve.
Can you post a zip file with your atmosphere, config and switch folders and hbmenu.nro file so I can do some test?

For the feature request: yes, I can. More point on fan table was the initial idea. I’ll also work on switching presets from handled and docked
 
  • Like
Reactions: Spark800
It might be because Info NX & Observer-Tool overlays conflict with NX-FanControl. Deleted both Info NX & Observer-Tool overlays.
I have the same issue as @mathew77, when I'm trying to open hbmenu with NX-FanControl sysmodule is ON, console just completely hang up into black screen, even without a proper Atmosphere BSOD.


Feature request: Can you make more presets? like 8-10 to finetune the curve.
 
Can you post a zip file with your atmosphere, config and switch folders and hbmenu.nro file so I can do some test?

For the feature request: yes, I can. More point on fan table was the initial idea. I’ll also work on switching presets from handled and docked
Sure I can provide that. Add me on discord: Dominatorul
 
@mathew77 @Spark800 the problem is due to ultrahand. I'm trying to understand and fix
I read your note. I know what the issue is. But for how to address it for your exact usage case, not 100% sure. However what I can do is move my `thermalstatusInit()` and `thermalstatusExit()` functions directly into where it reads the temperatures (or only keep them on when temperature widget is active). The confliction happens for some reason because of the services I've initialized in libTesla.

C++:
inline bool thermalstatusInit(void) {
    tcCheck = tcInitialize();
    tsCheck = tsInitialize();
    if (R_SUCCEEDED(tsCheck)) {
        g_tsSrv = tsGetServiceSession();
    } else
        return false;
 
    return true;
}

The work around I've made (but not uploaded yet) will only initialize these services when the temperature widget is turned on. This will make combining your script with ultrahand + hbmenu no longer crash (as long as the temperature widgets are disabled). If we can figure out a way to address this better (on my or your end), would be cool, but this should at least highlight the problem area for usage with your module.

sidenote: Status Monitor Overlay will also cause a crash for the same exact reason.
Post automatically merged:

I've updated Ultrahand v1.7.3 right now to account for this. Now users should no longer crash on hbmenu + Ultrahand + your module as long as the temperature widgets in Ultrahand are disabled. Over time a more elegant solution should be possible, but this should at least prevent those "always crash" type scenarios.
 
Last edited by ppkantorski,
SoC and PCB temps can be read via i2c.
https://github.com/CTCaer/hekate/blob/master/bdk/thermal/tmp451.h
https://github.com/CTCaer/hekate/bl...c23ac82c171b4fbf1c92/bdk/thermal/tmp451.c#L24

bool integer set to false returns value in iirc millicelsius.

I recommend to use i2c reg function from Status Monitor Overlay source code as it's designed for HOS and waits when value is updated (you need to tweak max17050 read function to read from TMP451)

https://github.com/masagrator/Status-Monitor-Overlay/blob/master/include/i2c.h

I won't be updating status monitor for that. I moved fan to pwm because fan is the service that has highest priority over adjusting fan speed, and I am only reading value, so it would go in the way of this sysmodule no matter what. Now you can do the same by not going in the way of your predecessors. :)
 
Last edited by masagrator,
SoC and PCB temps can be read via i2c.
https://github.com/CTCaer/hekate/blob/master/bdk/thermal/tmp451.h
https://github.com/CTCaer/hekate/bl...c23ac82c171b4fbf1c92/bdk/thermal/tmp451.c#L24

bool integer set to false returns value in iirc millicelsius.

I recommend to use i2c reg function from Status Monitor Overlay source code as it's designed for HOS and waits when value is updated (you need to tweak max17050 read function to read from TMP451)

https://github.com/masagrator/Status-Monitor-Overlay/blob/master/include/i2c.h

I won't be updating status monitor for that. I moved fan to pwm because fan is the service that has highest priority over adjusting fan speed, and I am only reading value, so it would go in the way of this sysmodule no matter what. Now you can do the same by not going in the way of your predecessors. :)
Thanks for the advice. I am now reading SoC and PCB temps directly from i2c. This should prevent any issues with my temperature calls and nx-fancontrol while hbmenu is open. I'll be releasing this fix in the next update to Ultrahand (v1.7.4).
Post automatically merged:

ok ive updated Ultrahand to v1.7.4 (which pulls its temperature readings from `i2c` as discussed). this version also comes with some more features in addition to this. (see changelog)

Users should no longer have any problems with nx-fancontrol + Ultrahand. However as mentioned Status Monitor confliction may need to still be considered for your project.
 
Last edited by ppkantorski,
unfortunately, 19.0.0 HOS update made it so I get stuck in sleep mode with this overlay installed. (black screen, only option is to hold power for 20 seconds and reboot)
Post automatically merged:

Unfortunately, 19.0.0 HOS update made it so I get stuck in sleep mode with this overlay installed. (black screen, only option is to hold power for 20 seconds and reboot)
Great plugin otherwise, I hope it gets fixed!
 
I'm using version 1.0.3 but the ultrahard overlay shows 1.0.2 and the cooler still works in sleep mode
 

Attachments

  • 00.jpg
    00.jpg
    22.6 KB · Views: 116
  • 01.jpg
    01.jpg
    23.2 KB · Views: 114
Hello evereyone. I'm on fw 19.0.1 and I've last FPSLocker, SaltyNX, Status monitor overlay version, but when I launch game and then Status monitor through Tesla menu, Switch freezes and I can see FPS counter. If I enable FPS counter on dashboard, it works, but in game no. Could someone help me, please?
 
Hello evereyone. I'm on fw 19.0.1 and I've last FPSLocker, SaltyNX, Status monitor overlay version, but when I launch game and then Status monitor through Tesla menu, Switch freezes and I can see FPS counter. If I enable FPS counter on dashboard, it works, but in game no. Could someone help me, please?
How this is related to this thread?
 

Site & Scene News

Popular threads in this forum