More actions
No edit summary |
No edit summary |
||
(12 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{Infobox Switch Homebrews | {{Infobox Switch Homebrews | ||
|title=sys-clk | |title=sys-clk | ||
|image= | |image=sysclknx.png | ||
|description= | |description=A per-title CPU, GPU and RAM overclock and underclock sysmodule for Atmosphere. | ||
|author=RetroNX Team | |author=RetroNX Team | ||
|lastupdated= | |lastupdated=2024/10/15 | ||
|type= | |type=Sysmodules | ||
|version= | |version=2.0.1 | ||
|license=Mixed | |license=Mixed | ||
|download=https://dlhb.gamebrew.org/switchhomebrews/ | |download=https://dlhb.gamebrew.org/switchhomebrews/sysclknx.7z | ||
|website=https://gbatemp.net/threads/sys-clk-under-overclocking-sysmodule.531372/ | |website=https://gbatemp.net/threads/sys-clk-under-overclocking-sysmodule.531372/ | ||
|source=https://github.com/retronx-team/sys-clk | |source=https://github.com/retronx-team/sys-clk | ||
|donation= | |donation= | ||
}} | }}{{lowercase title}} | ||
{{ | sys-clk is a system-wide overclock and underclock sysmodule for Atmosphere. | ||
}} | |||
==Features== | ==Features== | ||
Line 25: | Line 19: | ||
* Reads presets for titles from the SD card. | * Reads presets for titles from the SD card. | ||
* Hot reload allows you to change your preset while the game is running with sys-ftpd. | * Hot reload allows you to change your preset while the game is running with sys-ftpd. | ||
* Presets database for a quick and easy overclock on popular games. | * [https://github.com/retronx-team/sys-clk-db Presets database] for a quick and easy overclock on popular games. | ||
== | ==Installation== | ||
The | The following instructions assumes you have a Nintendo Switch running Atmosphère, updated to at least the latest stable version. | ||
*Copy the config and atmosphere folders at the root of your SD card and reboot the console. | |||
*The sysmodule will be active and running out of the box. | |||
*Note: sys-clk-overlay requires to have [[Tesla Menu Switch|Tesla Menu]] and [[NX-ovlloader Switch|nx-ovlloader]] installed and running. | |||
To create a new preset, just edit /config/sys-clk/config.ini on your SD card (see [[#Config|Config]]). | |||
To | |||
'''Note:''' | '''Note:''' If you're using ReiNX, you need to rename the atmosphere folder to ReiNX and move out the boot2.flag file next to exefs.nsp | ||
== | ==User guide== | ||
===How does it work=== | |||
The sysmodule overclocks and underclocks the CPU, GPU and RAM of the console depending on the title currently running and docked state. When you run a game, sys-clk will read its preset it and automatically overclock (or underclock) the system for you. | |||
All frequencies can be set for both docked and handleld mode, making 6 values per preset. These values are capped for safety reasons: | |||
*CPU (capped at 1785MHz). | |||
*GPU (capped at 460MHz without a charger, clocks up to 768MHz require a charger, clocks higher than 768MHz require the official charger). | |||
*RAM (capped at 1600MHz). | |||
These limits ensure that the console won't be damaged due to overclocking. | |||
== | ===Relevant files=== | ||
*<code>/config/sys-clk/config.ini</code> - Config file allows one to set custom clocks per docked state and title id, described below. | |||
*<code>/config/sys-clk/log.txt</code> - Log file where the logs are written if enabled. | |||
*<code>/config/sys-clk/log.flag</code> - Log flag file enables log writing if file exists. | |||
*<code>/config/sys-clk/context.csv</code> - CSV file where the title id, profile, clocks and temperatures are written if enabled. | |||
*<code>/switch/sys-clk-manager.nro</code> - sys-clk manager app (accessible from the hbmenu). | |||
*<code>/switch/.overlays/sys-clk-overlay.ovl</code> - sys-clk overlay (accessible from anywhere by invoking the Tesla menu). | |||
*<code>/atmosphere/contents/00FF0000636C6BFF/exefs.nsp</code> - sys-clk core sysmodule. | |||
*<code>/atmosphere/contents/00FF0000636C6BFF/flags/boot2.flag</code> - sys-clk core sysmodule. | |||
<pre>[Application Title ID] | ===Config=== | ||
Presets can be customized by adding them to the ini config file located at /config/sys-clk/config.ini, using the following template for each app | |||
<pre> | |||
[Application Title ID] | |||
docked_cpu= | docked_cpu= | ||
docked_gpu= | docked_gpu= | ||
Line 84: | Line 71: | ||
handheld_cpu= | handheld_cpu= | ||
handheld_gpu= | handheld_gpu= | ||
handheld_mem=</pre> | handheld_mem= | ||
</pre> | |||
* Replace <code>Application Title ID</code> with the title id of the game/application you're interested in customizing. A list of games title id can be found in the [https://switchbrew.org/wiki/Title_list/Games Switchbrew wiki]. | *Replace <code>Application Title ID</code> with the title id of the game/application you're interested in customizing. A list of games title id can be found in the [https://switchbrew.org/wiki/Title_list/Games Switchbrew wiki]. | ||
* Frequencies are expressed in mhz, and will be scaled to the nearest possible values, described in the clock table below. | *Frequencies are expressed in mhz, and will be scaled to the nearest possible values, described in the clock table below. | ||
* If any key is omitted, value is empty or set to 0, it will be ignored, and stock clocks will apply. | *If any key is omitted, value is empty or set to 0, it will be ignored, and stock clocks will apply. | ||
* If charging, sys-clk will look for the frequencies in that order, picking the first found | *If charging, sys-clk will look for the frequencies in that order, picking the first found | ||
* | **Charger specific config (USB or Official) <code>handheld_charging_usb_X</code> or <code>handheld_charging_official_X</code> | ||
* | **Non specific charging config <code>handheld_charging_X</code> | ||
* | **Handheld config <code>handheld_X</code> | ||
=== Example 1: Zelda BOTW === | ===== Example 1: Zelda BOTW ===== | ||
* Overclock CPU when docked or charging | * Overclock CPU when docked or charging | ||
* Overclock MEM to docked clocks when handheld | * Overclock MEM to docked clocks when handheld | ||
Line 105: | Line 93: | ||
handheld_mem=1600</pre> | handheld_mem=1600</pre> | ||
=== Example 2: Picross === | ===== Example 2: Picross ===== | ||
* Underclocks on handheld to save battery | * Underclocks on handheld to save battery | ||
Line 121: | Line 109: | ||
!align="center"| Default | !align="center"| Default | ||
|- | |- | ||
!align="center"| temp_log_interval_ms | |||
| Defines how often sys-clk log temperatures, in milliseconds (<code>0</code> to disable) | | Defines how often sys-clk log temperatures, in milliseconds (<code>0</code> to disable) | ||
|align="center"| 0 ms | |align="center"| 0 ms | ||
|- | |- | ||
!align="center"| csv_write_interval_ms | |||
| Defines how often sys-clk writes to the CSV, in milliseconds (<code>0</code> to disable) | | Defines how often sys-clk writes to the CSV, in milliseconds (<code>0</code> to disable) | ||
|align="center"| 0 ms | |align="center"| 0 ms | ||
|- | |- | ||
!align="center"| poll_interval_ms | |||
| Defines how fast sys-clk checks and applies profiles, in milliseconds | | Defines how fast sys-clk checks and applies profiles, in milliseconds | ||
|align="center"| 300 ms | |align="center"| 300 ms | ||
|} | |} | ||
== Capping == | === Capping === | ||
To protect the battery from excessive strain, clocks requested from config may be capped before applying, depending on your current profile: | To protect the battery from excessive strain, clocks requested from config may be capped before applying, depending on your current profile: | ||
Line 144: | Line 132: | ||
!align="center"| Docked | !align="center"| Docked | ||
|- | |- | ||
!align="center"| MEM | |||
|align="center"| - | |align="center"| - | ||
|align="center"| - | |align="center"| - | ||
Line 150: | Line 138: | ||
|align="center"| - | |align="center"| - | ||
|- | |- | ||
!align="center"| CPU | |||
|align="center"| - | |align="center"| - | ||
|align="center"| - | |align="center"| - | ||
Line 156: | Line 144: | ||
|align="center"| - | |align="center"| - | ||
|- | |- | ||
!align="center"| GPU | |||
|align="center"| 460 | |align="center"| 460 | ||
|align="center"| 768 | |align="center"| 768 | ||
Line 163: | Line 151: | ||
|} | |} | ||
== Clock table (MHz) == | ===Clock table (MHz)=== | ||
=== MEM clocks === | =====MEM clocks===== | ||
* 1600 | *1600 - official docked, boost mode, max clock | ||
* 1331 | *1331 - official handheld | ||
* 1065 | *1065 | ||
* 800 | *800 | ||
* 665 | *665 | ||
=== CPU clocks === | =====CPU clocks===== | ||
* 1785 | *1785 - max clock, boost mode | ||
* 1683 | *1683 | ||
* 1581 | *1581 | ||
* 1428 | *1428 | ||
* 1326 | *1326 | ||
* 1224 | *1224 - sdev oc | ||
* 1122 | *1122 | ||
* 1020 | *1020 - official docked & handheld | ||
* 918 | *918 | ||
* 816 | *816 | ||
* 714 | *714 | ||
* 612 | *612 | ||
=== GPU clocks === | =====GPU clocks===== | ||
* 921 | *921 - max clock | ||
* 844 | *844 | ||
* 768 | *768 - official docked | ||
* 691 | *691 | ||
* 614 | *614 | ||
* 537 | *537 | ||
* 460 | *460 - max handheld | ||
* 384 | *384 - official handheld | ||
* 307 | *307 - official handheld | ||
* 230 | *230 | ||
* 153 | *153 | ||
* 76 | *76 - boost mode | ||
Notes: | |||
*GPU overclock is capped at 460Mhz in handheld and capped at 768Mhz if charging, unless you're using the official charger. | |||
*Clocks higher than 768MHz need the official charger is plugged in. | |||
==Screenshots== | |||
https://dlhb.gamebrew.org/switchhomebrews/sysclknx2.png | |||
https://dlhb.gamebrew.org/switchhomebrews/sysclknx3.png | |||
==Media== | |||
'''How to overclock the Nintendo Switch and view FPS - Sysclk & NX FPS Homebrew mods Atmosphere CFW ([https://www.youtube.com/watch?v=0svgC4wuB18 Nevercholt])'''<br> | |||
<youtube>0svgC4wuB18</youtube> | |||
==Changelog== | ==Changelog== | ||
'''v2.0.1''' | |||
* Fixes wake from sleep issue with HOS 19.0.0. | |||
* Queries from the sensor via i2c for PCB and SOC temps. | |||
'''v2.0.0-rc''' | |||
* sys-clk does not embed freq tables anymore, and will now get them from HOS at boot time. | |||
* Real/instant frequencies, and battery power draw can now be printed in the overlay, manager, logs, and csv reports. | |||
* Support for HOS 17.0.0 has been added. | |||
'''v1.0.3''' | '''v1.0.3''' | ||
*This minor update fixes the overlay not working on HOS >= 16.0.0 by upgrading libtesla and libnx to the latest version. | *This minor update fixes the overlay not working on HOS >= 16.0.0 by upgrading libtesla and libnx to the latest version. | ||
*Thanks to @alula for the PR | *Thanks to @alula for the PR. | ||
'''v1.0.2''' | '''v1.0.2''' | ||
* Fix freqs on ResetToStock(); for Boost Mode GPU | * Fix freqs on ResetToStock(); for Boost Mode GPU. | ||
* libnx compat fixes | * libnx compat fixes. | ||
* libtesla updated from upstream | * libtesla updated from upstream. | ||
* Use ts:GetTemperature on HOS 14.0.0+ instead of ts:GetTemperatureMilliC | * Use ts:GetTemperature on HOS 14.0.0+ instead of ts:GetTemperatureMilliC. | ||
* Release files dont enable logs by default anymore | * Release files dont enable logs by default anymore. | ||
'''v1.0.1''' | '''v1.0.1''' | ||
* Fix skin temp not shown in the manager | * Fix skin temp not shown in the manager. | ||
* Fix Korean characters shown incorrectly in the manager | * Fix Korean characters shown incorrectly in the manager. | ||
* libtesla upstream sync (libnx 4.0.x compat) | * libtesla upstream sync (libnx 4.0.x compat). | ||
'''v1.0.0''' | '''v1.0.0''' | ||
* Homebrew app: sys-clk manager, testing grounds of borealis, a new hardware accelerated, Nintendo Switch inspired UI library for PC and Nintendo Switch | * Homebrew app: sys-clk manager, testing grounds of borealis, a new hardware accelerated, Nintendo Switch inspired UI library for PC and Nintendo Switch. | ||
* Tesla overlay: sys-clk-overlay, powered by libtesla | * Tesla overlay: sys-clk-overlay, powered by libtesla. | ||
'''v0.13.1''' | '''v0.13.1''' | ||
* Don't keep the time session open (only used at init) | * Don't keep the time session open (only used at init). | ||
* Misc changes from the develop branch (libnx compat, etc) that does not affect features | * Misc changes from the develop branch (libnx compat, etc) that does not affect features. | ||
'''v0.13.0''' | '''v0.13.0''' | ||
* Temperature monitoring (SoC; PCB and Skin at customizable interval) | * Temperature monitoring (SoC; PCB and Skin at customizable interval). | ||
* Logging refactor: | * Logging refactor: | ||
** Logs can now be enabled or disabled at runtime | ** Logs can now be enabled or disabled at runtime. | ||
** Prettier logs (clock hz format, shorter text) | ** Prettier logs (clock hz format, shorter text). | ||
** Milliseconds in timestamp | ** Milliseconds in timestamp. | ||
* CSV export (timestamp, titleId, profile, clocks, temps at customizable interval) | * CSV export (timestamp, titleId, profile, clocks, temps at customizable interval). | ||
* FW 9.0.0 fixes | * FW 9.0.0 fixes. | ||
* HB and crashed apps fixes | * HB and crashed apps fixes. | ||
'''v0.12.3''' | '''v0.12.3''' | ||
*This is a minor update that changed polling timings to accommodate actively scaling titles (ex: BOTW, DOOM...) | *This is a minor update that changed polling timings to accommodate actively scaling titles (ex: BOTW, DOOM...) | ||
'''v0.12.2''' | '''v0.12.2''' | ||
*This release adds support for 8.0.0 | *This release adds support for 8.0.0. | ||
'''v0.12.1''' | '''v0.12.1''' | ||
* This hotfix was made to correct the capping logic that was incorrectly applied to the CPU, consequently underclocking on defined profiles. | * This hotfix was made to correct the capping logic that was incorrectly applied to the CPU, consequently underclocking on defined profiles. | ||
'''v0.12.0''' | '''v0.12.0''' | ||
* Config loading has been refactored to permit more profile storage, and serve as the groundwork for what's to come | * Config loading has been refactored to permit more profile storage, and serve as the groundwork for what's to come. | ||
* The kip target (which had become irrelevant) and the code required to support it has been removed, consequently enabling pm late loading with no side-effect | * The kip target (which had become irrelevant) and the code required to support it has been removed, consequently enabling pm late loading with no side-effect. | ||
'''v0.11.1''' | '''v0.11.1''' | ||
* | * Fixes some games running slower than they should be ([https://github.com/retronx-team/sys-clk/issues/6 #6]). | ||
'''v0.11''' | '''v0.11''' | ||
* Adds timestamp and version to logs | * Adds timestamp and version to logs. | ||
* Games and profile changes now always trigger a reset to stock values, even for games that would not change clocks on their own | * Games and profile changes now always trigger a reset to stock values, even for games that would not change clocks on their own. | ||
'''v0.10''' | '''v0.10''' | ||
* Added charging profiles | * Added charging profiles. | ||
* General fixes | * General fixes. | ||
'''v0.9''' | '''v0.9''' | ||
* First Release. | * First Release. | ||
==Credits== | |||
Thanks to @CTCaer for the wonderful artwork. | |||
== External links == | == External links == | ||
* | * GitHub - https://github.com/retronx-team/sys-clk | ||
* | * GitHub - https://github.com/retronx-team/sys-clk-db | ||
* GBAtemp - https://gbatemp.net/threads/sys-clk-under-overclocking-sysmodule.531372/ |
Latest revision as of 14:16, 19 October 2024
sys-clk | |
---|---|
General | |
Author | RetroNX Team |
Type | Sysmodules |
Version | 2.0.1 |
License | Mixed |
Last Updated | 2024/10/15 |
Links | |
Download | |
Website | |
Source | |
sys-clk is a system-wide overclock and underclock sysmodule for Atmosphere.
Features
- Automatic overclock and underclock depending on the running title and docked state.
- Reads presets for titles from the SD card.
- Hot reload allows you to change your preset while the game is running with sys-ftpd.
- Presets database for a quick and easy overclock on popular games.
Installation
The following instructions assumes you have a Nintendo Switch running Atmosphère, updated to at least the latest stable version.
- Copy the config and atmosphere folders at the root of your SD card and reboot the console.
- The sysmodule will be active and running out of the box.
- Note: sys-clk-overlay requires to have Tesla Menu and nx-ovlloader installed and running.
To create a new preset, just edit /config/sys-clk/config.ini on your SD card (see Config).
Note: If you're using ReiNX, you need to rename the atmosphere folder to ReiNX and move out the boot2.flag file next to exefs.nsp
User guide
How does it work
The sysmodule overclocks and underclocks the CPU, GPU and RAM of the console depending on the title currently running and docked state. When you run a game, sys-clk will read its preset it and automatically overclock (or underclock) the system for you.
All frequencies can be set for both docked and handleld mode, making 6 values per preset. These values are capped for safety reasons:
- CPU (capped at 1785MHz).
- GPU (capped at 460MHz without a charger, clocks up to 768MHz require a charger, clocks higher than 768MHz require the official charger).
- RAM (capped at 1600MHz).
These limits ensure that the console won't be damaged due to overclocking.
Relevant files
/config/sys-clk/config.ini
- Config file allows one to set custom clocks per docked state and title id, described below./config/sys-clk/log.txt
- Log file where the logs are written if enabled./config/sys-clk/log.flag
- Log flag file enables log writing if file exists./config/sys-clk/context.csv
- CSV file where the title id, profile, clocks and temperatures are written if enabled./switch/sys-clk-manager.nro
- sys-clk manager app (accessible from the hbmenu)./switch/.overlays/sys-clk-overlay.ovl
- sys-clk overlay (accessible from anywhere by invoking the Tesla menu)./atmosphere/contents/00FF0000636C6BFF/exefs.nsp
- sys-clk core sysmodule./atmosphere/contents/00FF0000636C6BFF/flags/boot2.flag
- sys-clk core sysmodule.
Config
Presets can be customized by adding them to the ini config file located at /config/sys-clk/config.ini, using the following template for each app
[Application Title ID] docked_cpu= docked_gpu= docked_mem= handheld_charging_cpu= handheld_charging_gpu= handheld_charging_mem= handheld_charging_usb_cpu= handheld_charging_usb_gpu= handheld_charging_usb_mem= handheld_charging_official_cpu= handheld_charging_official_gpu= handheld_charging_official_mem= handheld_cpu= handheld_gpu= handheld_mem=
- Replace
Application Title ID
with the title id of the game/application you're interested in customizing. A list of games title id can be found in the Switchbrew wiki. - Frequencies are expressed in mhz, and will be scaled to the nearest possible values, described in the clock table below.
- If any key is omitted, value is empty or set to 0, it will be ignored, and stock clocks will apply.
- If charging, sys-clk will look for the frequencies in that order, picking the first found
- Charger specific config (USB or Official)
handheld_charging_usb_X
orhandheld_charging_official_X
- Non specific charging config
handheld_charging_X
- Handheld config
handheld_X
- Charger specific config (USB or Official)
Example 1: Zelda BOTW
- Overclock CPU when docked or charging
- Overclock MEM to docked clocks when handheld
Leads to a smoother framerate overall (ex: in the korok forest)
[01007EF00011E000] docked_cpu=1224 handheld_charging_cpu=1224 handheld_mem=1600
Example 2: Picross
- Underclocks on handheld to save battery
[0100BA0003EEA000] handheld_cpu=816 handheld_gpu=153 handheld_mem=800
Advanced
The [values]
section allows you to alter timings in sys-clk, you should not need to edit any of these unless you know what you are doing. Possible values are:
Key | Desc | Default |
---|---|---|
temp_log_interval_ms | Defines how often sys-clk log temperatures, in milliseconds (0 to disable)
|
0 ms |
csv_write_interval_ms | Defines how often sys-clk writes to the CSV, in milliseconds (0 to disable)
|
0 ms |
poll_interval_ms | Defines how fast sys-clk checks and applies profiles, in milliseconds | 300 ms |
Capping
To protect the battery from excessive strain, clocks requested from config may be capped before applying, depending on your current profile:
Handheld | Charging (USB) | Charging (Official) | Docked | |
---|---|---|---|---|
MEM | - | - | - | - |
CPU | - | - | - | - |
GPU | 460 | 768 | - | - |
Clock table (MHz)
MEM clocks
- 1600 - official docked, boost mode, max clock
- 1331 - official handheld
- 1065
- 800
- 665
CPU clocks
- 1785 - max clock, boost mode
- 1683
- 1581
- 1428
- 1326
- 1224 - sdev oc
- 1122
- 1020 - official docked & handheld
- 918
- 816
- 714
- 612
GPU clocks
- 921 - max clock
- 844
- 768 - official docked
- 691
- 614
- 537
- 460 - max handheld
- 384 - official handheld
- 307 - official handheld
- 230
- 153
- 76 - boost mode
Notes:
- GPU overclock is capped at 460Mhz in handheld and capped at 768Mhz if charging, unless you're using the official charger.
- Clocks higher than 768MHz need the official charger is plugged in.
Screenshots
Media
How to overclock the Nintendo Switch and view FPS - Sysclk & NX FPS Homebrew mods Atmosphere CFW (Nevercholt)
Changelog
v2.0.1
- Fixes wake from sleep issue with HOS 19.0.0.
- Queries from the sensor via i2c for PCB and SOC temps.
v2.0.0-rc
- sys-clk does not embed freq tables anymore, and will now get them from HOS at boot time.
- Real/instant frequencies, and battery power draw can now be printed in the overlay, manager, logs, and csv reports.
- Support for HOS 17.0.0 has been added.
v1.0.3
- This minor update fixes the overlay not working on HOS >= 16.0.0 by upgrading libtesla and libnx to the latest version.
- Thanks to @alula for the PR.
v1.0.2
- Fix freqs on ResetToStock(); for Boost Mode GPU.
- libnx compat fixes.
- libtesla updated from upstream.
- Use ts:GetTemperature on HOS 14.0.0+ instead of ts:GetTemperatureMilliC.
- Release files dont enable logs by default anymore.
v1.0.1
- Fix skin temp not shown in the manager.
- Fix Korean characters shown incorrectly in the manager.
- libtesla upstream sync (libnx 4.0.x compat).
v1.0.0
- Homebrew app: sys-clk manager, testing grounds of borealis, a new hardware accelerated, Nintendo Switch inspired UI library for PC and Nintendo Switch.
- Tesla overlay: sys-clk-overlay, powered by libtesla.
v0.13.1
- Don't keep the time session open (only used at init).
- Misc changes from the develop branch (libnx compat, etc) that does not affect features.
v0.13.0
- Temperature monitoring (SoC; PCB and Skin at customizable interval).
- Logging refactor:
- Logs can now be enabled or disabled at runtime.
- Prettier logs (clock hz format, shorter text).
- Milliseconds in timestamp.
- CSV export (timestamp, titleId, profile, clocks, temps at customizable interval).
- FW 9.0.0 fixes.
- HB and crashed apps fixes.
v0.12.3
- This is a minor update that changed polling timings to accommodate actively scaling titles (ex: BOTW, DOOM...)
v0.12.2
- This release adds support for 8.0.0.
v0.12.1
- This hotfix was made to correct the capping logic that was incorrectly applied to the CPU, consequently underclocking on defined profiles.
v0.12.0
- Config loading has been refactored to permit more profile storage, and serve as the groundwork for what's to come.
- The kip target (which had become irrelevant) and the code required to support it has been removed, consequently enabling pm late loading with no side-effect.
v0.11.1
- Fixes some games running slower than they should be (#6).
v0.11
- Adds timestamp and version to logs.
- Games and profile changes now always trigger a reset to stock values, even for games that would not change clocks on their own.
v0.10
- Added charging profiles.
- General fixes.
v0.9
- First Release.
Credits
Thanks to @CTCaer for the wonderful artwork.