Freebird - Switch Clock Speed Control Sysmodule

This is a sysmodule/service for Atmosphere and ReiNX that uses IPC's to communicate with its companion NRO, Freeset. This allows you to use any clock speed I've found on the Switch. The only restriction I have put in place is that you must be plugged into an official charger or docked if you are crazy enough to want to use the highest two GPU clock speeds. I am leaving it completely up to you to choose what clock speeds you want to use. Be careful.

2019070911351400-DB1426D1DFD034027CECDE9C2DD914B8.jpg

Intructions:
  • Atmosphere: Copy over the contents of the zip and reboot your system to load the module. Open Freeset and use that to send over the clock speeds you want.
  • ReiNX: Create a folder in your ReiNX folder named titles if there isn't one. Copy the titles folder from the atmosphere folder to ReiNX/titles. Open "010000000000C235" and move the boot2.flag to the same directory as the exefs.nsp file. Reboot and freebird should now be working on ReiNX.

X turns freebird's clock setting feature on and off. Remember to turn this off before putting your system to sleep. I'm working on it™, but it will cause and require you to fully shutdown and restart your Switch if accidentally left on. When on, freebird will check and set the clocks if they don't match what you choose. When turned off, your clock speeds will be reset and no longer forced.

A sends over the clock speeds shown/chosen from the menu. Up and down change the currently selected option, left and right change speed.

If I missed anything, don't be afraid to ask. I'm open to suggestions too.

I'd like to thank @taggen86, @nabelo, @mathew77, @vanraz86, and @Kirby567fan for taking the chances and testing it. Thanks guys!

Download link: https://gbatemp.net/download/freebird.35566/
 
Last edited by JK_,

ZeroFX

why?
Member
Joined
Jun 18, 2018
Messages
1,109
Trophies
1
Location
napaJ
XP
3,009
Country
Japan
Update: The simple menu is done, but the advanced menu is taking longer than expected. It works, but I don't like the current layout I slapped together. I want it to be easier to read. It has also shown a few new bugs in the module itself I need to get straightened out.


It will override them.
Nice, keep us updated ^-^.
 

m4xw

Ancient Deity
Developer
Joined
May 25, 2018
Messages
2,442
Trophies
1
Age
119
XP
6,958
Country
Germany
Also hwinit is mostly Hekate code as a base, with some minor tweaks and changes. It's very much possible that one of the developers might have fixed an edge-case in the existing code that happened to cause this issue. Calling it a bug in ReiNX because it functions correctly seems a bit disingenuous
I know for a fact that their hwinit is incomplete and partially wrong, although minor.
Edit: Double checked the timer implementation, what I initially thought was impacted seems fine to me (still missing some parts tho)

Can you give any examples of where this is the case?
Pretty much every sysmodule.
Nintendo engineering at its best.
RE'd example from FS:
fs.png

521089619807305732.png


Don't forget that normal titles use the SDK and the SDK is full of this shit too (while libnx does it too, it does not seem to cause a race for these instances)

Normally the timers should not be impacted by the clock rate, but timers have been bugged on other SoC's before (like erratum A-008585), so a problem like this could very well not be existent at lower clocks.
It's one of many possibilities, my initial wording was not accurate, I just double checked how the ticks were read, also 2am things.
 
Last edited by m4xw,

m4xw

Ancient Deity
Developer
Joined
May 25, 2018
Messages
2,442
Trophies
1
Age
119
XP
6,958
Country
Germany
So let me get this right, ReiNX have a bugged hwinit that makes extreme overclocking possible and stable? I call that a pretty good feature in my book.
It does have a incomplete hwinit, but what I originally thought what might be wrong with it, doesn't seem to be the Issue.
Also my wording was shit, I made it sound like timers are def. the issue, but after double-checking how these are implemented, they should not be impacted, unless it's another bug in the silicon.
Could also be some other unrelated race condition that is happening.
 

crow132

Well-Known Member
Member
Joined
Jan 19, 2016
Messages
302
Trophies
0
Age
34
XP
1,373
Country
Saint Helena
That's not the issue, it is being applied correctly. An easy way to test would be to turn the CPU to 1.7GHz and scroll around in hbmenu. It will perform at 2x of its usual speed.

Also I can measure the additional power draw when overclocking, and see the performance differences between games. Eg. Skyrim as an example on handheld, I have disabled the framecap of 30FPS and on handheld it cannot hit 60 at all, but when overclocked it easily hits 60FPS.

These are just a few examples, but the overclock is certainly taking place. Keep in mind though, that the Tegra X1 in the Switch comes factory underclocked, so stability shouldn't be a huge concern. Even when overclocking to the limits of Freebird, it is still considered underclocked compared to a stock Tegra X1 in eg. the Nvidia Shield.

This is perhaps a bug that only appears in Atmosphere that only presents itself when the system runs outside of spec. Or maybe a bug in Freebird that only happens in Atmosphere? Outside of that I am unsure why ReiNX is unaffected. Curious if SX OS could load Freebird if it would exhibit the bug or not.
just tried myself and yeah, they are stable and effective

for example, db fighterz takes like 10 seconds less for each battle to load when running at 1.7

weird but, happening indeed
 

Vorde

Well-Known Member
Member
Joined
Jul 8, 2015
Messages
497
Trophies
0
Age
35
XP
1,539
Country
Canada
Why do I feel like if they release another version of the Switch with an "upgrade" they're going to stay on the TegraX1, make it slightly more bulky, add better cooling, and just overclock it, and sell exclusive titles for it :P
 

pcwizard7

Well-Known Member
Member
Joined
Aug 2, 2013
Messages
1,409
Trophies
0
XP
1,688
Country
Australia
Why do I feel like if they release another version of the Switch with an "upgrade" they're going to stay on the TegraX1, make it slightly more bulky, add better cooling, and just overclock it, and sell exclusive titles for it :P

plus the new features that are rumoured the next chipset is needed plus it would be more powerful and efficient. remember when you overclock you are pushing it beyond its stock limits which means more power used also

--------------------- MERGED ---------------------------

just tried myself and yeah, they are stable and effective

for example, db fighterz takes like 10 seconds less for each battle to load when running at 1.7

weird but, happening indeed

increasing the cpu will improve load times
 

ZachyCatGames

Well-Known Member
Member
Joined
Jun 19, 2018
Messages
3,398
Trophies
1
Location
Hell
XP
4,209
Country
United States
plus the new features that are rumoured the next chipset is needed plus it would be more powerful and efficient. remember when you overclock you are pushing it beyond its stock limits which means more power used also
Mariko/t214 isn’t any more powerful than what we currently have, its just Erista/t210 with Parker/t186’s security features backported and with some hardware bug fixes
 
Last edited by ZachyCatGames,

Crusatyr

Well-Known Member
Member
Joined
Jul 31, 2016
Messages
197
Trophies
0
XP
901
Country
United States
Quick question: Why is it working better at max OC while using ReiNX a bug, versus it being unstable at max speeds in Atmosphere being a bug? Doesn't this mean to get Atmosphere performing as well as ReiNX you'd have to introduce a bug? Or are you implying that ReiNX should fix this bug so it'd perform as poorly as Atmosphere does on max OC?
 

AliciaBurrito

Well-Known Member
Newcomer
Joined
Sep 8, 2018
Messages
48
Trophies
0
XP
406
Country
United States
It does have a incomplete hwinit, but what I originally thought what might be wrong with it, doesn't seem to be the Issue.
Also my wording was shit, I made it sound like timers are def. the issue, but after double-checking how these are implemented, they should not be impacted, unless it's another bug in the silicon.
Could also be some other unrelated race condition that is happening.
What does an 'incomplete' hwinit mean exactly in this context? It is clearly functioning correctly, I don't think the Switch's hardware has suddenly changed between now and the last 6 months.

This issue can't be a race condition because no new variables are introduced into the mix. If it was a race condition then this issue would be present even when the clock speeds were stock, but that is not the case. A race condition doesn't appear when the system runs either faster or slower than normal. At best it will expose the existing race condition either later or sooner respectively.
 

m4xw

Ancient Deity
Developer
Joined
May 25, 2018
Messages
2,442
Trophies
1
Age
119
XP
6,958
Country
Germany
Quick question: Why is it working better at max OC while using ReiNX a bug, versus it being unstable at max speeds in Atmosphere being a bug? Doesn't this mean to get Atmosphere performing as well as ReiNX you'd have to introduce a bug? Or are you implying that ReiNX should fix this bug so it'd perform as poorly as Atmosphere does on max OC?
Bug in this context means it does not match Nintendo's implementation (good or bad is irrelevant, this can be a potential ban risk).
No need to fix if it doesn't have bad side effects.
I will retry with a custom loader and stock secmon, I remember I tried it before, but I want to confirm that the stock system has the same issues.

What does an 'incomplete' hwinit mean exactly in this context? It is clearly functioning correctly, I don't think the Switch's hardware has suddenly changed between now and the last 6 months.
It uses a old revision of hwinit, it has been updated numerous times by now.
Just because it works, doesn't mean it's complete, but Horizon is able to handle some parts itself, also it's missing some behavior that the bootrom does (another way nintendo could identify CFW), insofar it's incomplete.

This issue can't be a race condition because no new variables are introduced into the mix. If it was a race condition then this issue would be present even when the clock speeds were stock, but that is not the case. A race condition doesn't appear when the system runs either faster or slower than normal. At best it will expose the existing race condition either later or sooner respectively.
I had games working on atmosphere too, at max clocks.
It has a aspect of randomness, some launches work, other times they don't, this indicates a race condition somewhere.
Also does the cyan panic with swkbd still happen?
 
  • Like
Reactions: ZachyCatGames

Crusatyr

Well-Known Member
Member
Joined
Jul 31, 2016
Messages
197
Trophies
0
XP
901
Country
United States
Bug in this context means it does not match Nintendo's implementation (good or bad is irrelevant, this can be a potential ban risk).

Please forgive my ignorance, but I thought all ReiNX did was apply patches to the existing Horizon OS. Seems to me that unless Rei went out of his way to change how OC worked in particular, it should be closer to Nintendo's implementation rather that Atmosphere's approach to replace all of the Horizon's modules with custom ones right?
 

m4xw

Ancient Deity
Developer
Joined
May 25, 2018
Messages
2,442
Trophies
1
Age
119
XP
6,958
Country
Germany
Please forgive my ignorance, but I thought all ReiNX did was apply patches to the existing Horizon OS. Seems to me that unless Rei went out of his way to change how OC worked in particular, it should be closer to Nintendo's implementation rather that Atmosphere's approach to replace all of the Horizon's modules with custom ones right?
There is black and white answer for this.
In some parts yes, in other parts no.
From my testing it caused issues in stock sysmodules that atmosphere doesn't touch either, so it being hwinit or secmon related seems likely, that ultimately manifest as weird race conditions (or another seemingly random behaviour)
 
Last edited by m4xw,

Crusatyr

Well-Known Member
Member
Joined
Jul 31, 2016
Messages
197
Trophies
0
XP
901
Country
United States
In some parts yes, in other parts no.
From my testing it caused issues in stock sysmodules that atmosphere doesn't touch either, so it being hwinit or secmon related seems likely

Ah, so this is why you made that PR to Atmosphere, to make Atmosphere behave more like ReiNX right?
 

AliciaBurrito

Well-Known Member
Newcomer
Joined
Sep 8, 2018
Messages
48
Trophies
0
XP
406
Country
United States
Bug in this context means it does not match Nintendo's implementation (good or bad is irrelevant, this can be a potential ban risk).
No need to fix if it doesn't have bad side effects.
I will retry with a custom loader and stock secmon, I remember I tried it before, but I want to confirm that the stock system has the same issues.


It uses a old revision of hwinit, it has been updated numerous times by now.
Just because it works, doesn't mean it's complete, but Horizon is able to handle some parts itself, also it's missing some behavior that the bootrom does (another way nintendo could identify CFW), insofar it's incomplete.


I had games working on atmosphere too, at max clocks.
It has a aspect of randomness, some launches work, other times they don't, this indicates a race condition somewhere.
Also does the cyan panic with swkbd still happen?
I think that would be called an 'improvement' or 'fix' not a bug because it didn't carry over Nintendo's own bugs. And CFW itself is a ban risk, if you don't want to get banned don't use CFW while online.
Let me know how your testing goes, I'm really curious to see what the cause might be.

Correct, the current hwinit is based on Hekate's hwinit from 6 months ago with its own changes and tweaks to it since then. Perhaps this bug came about from newer versions of hwinit?

I had games working at max clocks on Atmo as well, but it would usually cause the system to shut off after a while, but randomness != race condition. If a race condition existed, it would be an issue at stock clocks as well. It wouldn't get more unstable the higher the clock speeds, it would always hit the race condition no matter how fast or slow the device is going. Eg. if two conflicting issues were to collide it doesn't matter if it takes them 10 minutes or 10 seconds for them to cause issues, it would still eventually happen.

I haven't personally had any issues with swkbd in Atmo or ReiNX. I've tested in multiple homebrew apps, and native Nintendo games / applets and it seems to work fine. Do you notice the issue anywhere in particular?
 
  • Like
Reactions: Draxzelex

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Sonic Angel Knight @ Sonic Angel Knight: @_@