diff --git a/README.md b/README.md index 4d915d55..8bfa5750 100644 --- a/README.md +++ b/README.md @@ -4,65 +4,76 @@ Overclocking suite for Switch **(Mariko Only)** running on Atmosphere CFW. Suppo -## Notice +## Disclaimer -### Disclaimer +### USE AT YOUR OWN RISK! -**Proceed with caution!** - -**I AM NOT RESPONSIBLE (NOR IS ANYONE ELSE) FOR ANYTHING THAT MIGHT HAPPEN TO YOUR CONSOLE** (bans, internal component failure, etc.) by installing OC Suite or tinkering software/hardware with any info from this repo. +**I AM NOT RESPONSIBLE FOR ANYTHING BAD THAT MIGHT HAPPEN TO YOUR CONSOLE** (bans, internal component failure, etc.) by installing OC Suite or tinkering software/hardware with any info from this repo. ## Features - **CPU/GPU/RAM Overclock** up to **2397.0/1344.0/2131.2 MHz** -- **Auto-Boost CPU for faster game loading** - **Fan Control Optimization** at high load - **Modded sys-clk and ReverseNX**(-Tools and -RT) - **No need to change clocks manually** after toggling modes in ReverseNX + - Auto-Boost CPU for faster game loading - Profile-aware clock override for all games - System Settings - Disable background services, less heat and power consumption in standby mode - Game recording and SysDVR streaming @ 60fps with high video bitrate - Option to change the threshold for chargers providing enough power - **TinyMemBenchNX**: DRAM throughput and latency test based on [tinymembench](https://github.com/ssvb/tinymembench) -- **MemTesterNX**: A userspace utility for testing memory faults ~~and stability~~ based on [memtester](https://pyropus.ca/software/memtester/) - - For testing stability, DRAM-heavy games like BotW/MHR will do better jobs as it's easier to spot framebuffer corruption/freeze +- MemTesterNX: A userspace utility for testing DRAM faults based on [memtester](https://pyropus.ca/software/memtester/) + - For testing stability, GPU/DRAM-heavy games like BotW/MHR will do better jobs as it's easier to spot framebuffer corruption/freeze #### Details - **Overclock** + - **Official X1+ CPU/GPU OC clock: 1963.5/1267.2 MHz**. - - Anything above that are not in the table of official module and are all wild guess. - - Coefficients are not correctly calculated, so max clock(2397.0/1344.0 MHz) may not work on some devices. ([#4](https://github.com/KazushiMe/Switch-OC-Suite/issues/4)) - - **Recommended RAM clock: 1862.4 MHz** @ 600mV, (**1795.2 MHz for Hynix** ones). - - **RAM clock is set permanently** via **ptm-patch**, rather than sys-clk. + - Anything above that are not in the table of official module and are all wild guess – coefficients are not correctly calculated. ([issue #4](https://github.com/KazushiMe/Switch-OC-Suite/issues/4)) + + - **Recommended RAM clock: 1862.4 MHz** @ 600mV, (**1795.2 MHz for Hynix** ones @ 600mV). + - **RAM clock is set permanently** via patching ptm module, rather than sys-clk. - Use Hekate to check out the brand of your RAM chips. - EM shielding & thermal paste for RAM chips and testing with emuNAND before long-term usage. + + - Mariko variants have much lower power consumption compared to Erista, therefore **GPU clock capping is lifted for Mariko**. + + - For more info, see [README.md](https://github.com/KazushiMe/Switch-OC-Suite/tree/master/Source/sys-clk-OC) in sys-clk-OC. + +- **Overvolt and Extreme Overclock** + + - CPU overvolting: 1220 mV, up from default 1120 mV. Frequencies ≥ 2193 MHz will enable overvolting. + + - GPU overvolting: implemented but disabled, default 1050 mV. ([issue #4](https://github.com/KazushiMe/Switch-OC-Suite/issues/4)) + > Although Tegra X1+ GPU has much more potential than X1, and overvolting is quite promising, its power draw is not tested at higher voltage and its performance is hinderded by low RAM bandwidth on most occasions. + - RAM overvolting: precompiled hekate bootloader is provided - - Edit `oc.ini` to change Vddq voltage values: + - Edit `oc.ini` to change Vddq voltage value: ```ini [emc] volt=600000 ``` - - Overvolting beyond 650mV is not recommend and it might fry your DRAM. - - > Even though Tegra X1+ supports LPDDR4/LPDDR4X, LPDDR4X DRAM chips are not required to be backward-compatible with, or resistant to LPDDR4 1.1V Vddq voltage. + - Overvolting beyond 650mV is not safe. + > Even though Tegra X1+ supports LPDDR4/LPDDR4X, LPDDR4X DRAM chips are not required to be backward-compatible with, or resistant to LPDDR4 1.1V Vddq voltage. - For more info on DRAM overvolting and timings, see [issue #5](https://github.com/KazushiMe/Switch-OC-Suite/issues/5) - - Mariko variants have much lower power consumption compared to Erista, therefore **GPU clock capping is lifted for Mariko**. - - For more info, see [README.md](https://github.com/KazushiMe/Switch-OC-Suite/tree/master/Source/sys-clk-OC) in sys-clk-OC. -- **Auto-Boost CPU for faster game loading** - - When a game launches or is in loading screen, sys-clk will boost CPU to 1963.5 MHz for ~10 seconds or until the loading screen ends. - - Some games don't utilize `SetCpuBoostMode` at all, e.g. Overcooked 2, so Auto-Boost will be unavailable to these games. - - To **disable this feature**, simply remove `boost_start.flag` and `boost.flag` in `/config/sys-clk/ `. + - **Fan Control Optimization** at high load - Higher tolerable temperature and smoother fan curve. Set `holdable_tskin` to 56˚C. Previously it's set to 48˚C, so by default the fan would go crazy (80~100%) easily with a slight degree of OC. - Replace crappy factory thermal paste is preferred. - Place a thermal pad onto Wi-Fi/BT module (shielded, adjacent to antennas) to lower tskin temperature. + - **Modded sys-clk and ReverseNX**(-Tools and -RT) - - **No need to change clocks manually** after toggling modes in ReverseNX + - **No need to change clocks manually** after toggling modes in ReverseNX - Add `/config/sys-clk/downclock_dock.flag` to use handheld clocks in Docked mode when Handheld mode is set in ReverseNX. - To **disable this feature**, use original version of ReverseNX-RT and delete `/config/sys-clk/ReverseNX_sync.flag`. + - **Auto-Boost CPU for faster game loading** + - When a game launches or is in loading screen, sys-clk will boost CPU to 1963.5 MHz for ~10 seconds or until the loading screen ends. + - Some games don't utilize `SetCpuBoostMode` at all, e.g. Overcooked 2, so Auto-Boost will be unavailable to these games. + - To **disable this feature**, simply remove `boost_start.flag` and `boost.flag` in `/config/sys-clk/ `. - Profile-aware clock override for all games - Add `[A111111111111111]` title config in `/config/sys-clk/config.ini` to set frequency override globally: ```ini @@ -78,8 +89,10 @@ Overclocking suite for Switch **(Mariko Only)** running on Atmosphere CFW. Suppo handheld_cpu= handheld_gpu= ``` + - Disable background services, less heat and power consumption in standby mode - **Remove** the "Disable Background service" part in `/atmosphere/config/system_settings.ini` if you **use Nintendo Online services**. + - Game recording and SysDVR streaming @ 60fps with high video bitrate (7.5Mbps) - (Recommended)[dvr-patches](https://github.com/exelix11/dvr-patches): Allow screenshot/recording in any games and remove overlay image (copyright notice or logo). - For optimal streaming experience, SysDVR via USB interface is recommended. @@ -88,14 +101,18 @@ Overclocking suite for Switch **(Mariko Only)** running on Atmosphere CFW. Suppo - It has noticeable performance impacts in demanding games. - Video duration shown in album will be twice than the actual value, while the playback speed is not affected. - To **disable** this feature, simply remove the `[am.debug]` section in `system_settings.ini`. + - Option to change the threshold for chargers providing enough power - Find the string `enough_power_threshold_mw` in `system_settings.ini`. The default value is `0x9858` (39,000 mW). - To lower the threshold, you may change the value to `0x4268` (17,000 mW). Now the system and "sys-clk" will see typical Power Delivery chargers that only supply up to 18W (9V/2A) as "Official Chargers". + + ## Installation - Modded `loader.kip` with embedded pcv, ptm, am-no-copyright, ValidateAcidSignature patches - Prebuilt sys-clk-OC and ReverseNX-RT modified for OC +- Hekate with DRAM overvolting patch - `system-settings.ini` with some QoL improvements 1. **Restoring pcv backup if you have patched pcv module manually:** Launch the `patcher.te` script via TegraExplorer to restore your backup. Separated **ptm patches should be removed** to avoid conflicts. @@ -107,6 +124,7 @@ Overclocking suite for Switch **(Mariko Only)** running on Atmosphere CFW. Suppo 4. **Hekate-ipl bootloader:** - Rename the kip to `loader.kip` and add `kip1=atmosphere/kips/loader.kip` in `bootloader/hekate_ipl.ini` + - Set DRAM voltage in `/oc.ini` **Atmosphere Fusee bootloader:** @@ -116,7 +134,7 @@ Overclocking suite for Switch **(Mariko Only)** running on Atmosphere CFW. Suppo ## Build -Grab necessary patches from the repo, then compile sys-clk, ReverseNX-RT and Atmosphere with devkitpro. +Grab necessary patches from the repo, then compile sys-clk, ReverseNX-RT, hekate and Atmosphere (or loader only) with devkitpro. diff --git a/SdOut/atmosphere/1.2.4_loader_1795.2.kip b/SdOut/atmosphere/1.2.4_loader_1795.2.kip index 6a02c411..04081865 100644 Binary files a/SdOut/atmosphere/1.2.4_loader_1795.2.kip and b/SdOut/atmosphere/1.2.4_loader_1795.2.kip differ diff --git a/SdOut/atmosphere/1.2.4_loader_1862.4.kip b/SdOut/atmosphere/1.2.4_loader_1862.4.kip index 4afef1e6..6396ef1a 100644 Binary files a/SdOut/atmosphere/1.2.4_loader_1862.4.kip and b/SdOut/atmosphere/1.2.4_loader_1862.4.kip differ diff --git a/SdOut/atmosphere/1.2.4_loader_1894.4.kip b/SdOut/atmosphere/1.2.4_loader_1894.4.kip new file mode 100644 index 00000000..769f1b2c Binary files /dev/null and b/SdOut/atmosphere/1.2.4_loader_1894.4.kip differ diff --git a/SdOut/atmosphere/1.2.4_loader_1932.8.kip b/SdOut/atmosphere/1.2.4_loader_1932.8.kip new file mode 100644 index 00000000..c3cdd672 Binary files /dev/null and b/SdOut/atmosphere/1.2.4_loader_1932.8.kip differ diff --git a/SdOut/atmosphere/1.2.4_loader_1996.8.kip b/SdOut/atmosphere/1.2.4_loader_1996.8.kip index 16ed0369..813445bf 100644 Binary files a/SdOut/atmosphere/1.2.4_loader_1996.8.kip and b/SdOut/atmosphere/1.2.4_loader_1996.8.kip differ diff --git a/SdOut/atmosphere/1.2.4_loader_2064.0.kip b/SdOut/atmosphere/1.2.4_loader_2064.0.kip new file mode 100644 index 00000000..f381caaf Binary files /dev/null and b/SdOut/atmosphere/1.2.4_loader_2064.0.kip differ diff --git a/SdOut/atmosphere/1.2.4_loader_2131.2.kip b/SdOut/atmosphere/1.2.4_loader_2131.2.kip new file mode 100644 index 00000000..530ac8e0 Binary files /dev/null and b/SdOut/atmosphere/1.2.4_loader_2131.2.kip differ diff --git a/Source/Atmosphere/stratosphere/loader/source/ldr_oc_patch.hpp b/Source/Atmosphere/stratosphere/loader/source/ldr_oc_patch.hpp index 410fddcf..c803616b 100644 --- a/Source/Atmosphere/stratosphere/loader/source/ldr_oc_patch.hpp +++ b/Source/Atmosphere/stratosphere/loader/source/ldr_oc_patch.hpp @@ -12,24 +12,22 @@ constexpr ro::ModuleId PtmModuleId[] = { namespace pcv { typedef struct { - int c0 = 0; - int c1 = 0; - int c2 = 0; - int c3 = 0; - int c4 = 0; - int c5 = 0; + s32 c0 = 0; + s32 c1 = 0; + s32 c2 = 0; + s32 c3 = 0; + s32 c4 = 0; + s32 c5 = 0; } cvb_coefficients; typedef struct { - u32 freq = 0; - u32 padding = 0; + u64 freq = 0; cvb_coefficients cvb_dfll_param; cvb_coefficients cvb_pll_param; // only c0 is reserved } cpu_freq_cvb_table_t; typedef struct { - u32 freq = 0; - u32 padding = 0; + u64 freq = 0; cvb_coefficients cvb_dfll_param; // empty, dfll clock source not selected cvb_coefficients cvb_pll_param; } gpu_cvb_pll_table_t; @@ -64,28 +62,28 @@ namespace pcv { // TODO: correctly derive c0-c1 dfll coefficients constexpr cpu_freq_cvb_table_t NewCpuTables[] = { // OldCpuTables - // { 204000, 0, { 721589, -12695, 27 }, { 1120000 } }, - // { 306000, 0, { 747134, -14195, 27 }, { 1120000 } }, - // { 408000, 0, { 776324, -15705, 27 }, { 1120000 } }, - // { 510000, 0, { 809160, -17205, 27 }, { 1120000 } }, - // { 612000, 0, { 845641, -18715, 27 }, { 1120000 } }, - // { 714000, 0, { 885768, -20215, 27 }, { 1120000 } }, - // { 816000, 0, { 929540, -21725, 27 }, { 1120000 } }, - // { 918000, 0, { 976958, -23225, 27 }, { 1120000 } }, - // { 1020000, 0, { 1028021, -24725, 27 }, { 1120000 } }, - // { 1122000, 0, { 1082730, -26235, 27 }, { 1120000 } }, - // { 1224000, 0, { 1141084, -27735, 27 }, { 1120000 } }, - // { 1326000, 0, { 1203084, -29245, 27 }, { 1120000 } }, - // { 1428000, 0, { 1268729, -30745, 27 }, { 1120000 } }, - // { 1581000, 0, { 1374032, -33005, 27 }, { 1120000 } }, - // { 1683000, 0, { 1448791, -34505, 27 }, { 1120000 } }, - // { 1785000, 0, { 1527196, -36015, 27 }, { 1120000 } }, - // { 1887000, 0, { 1609246, -37515, 27 }, { 1120000 } }, - // { 1963500, 0, { 1675751, -38635, 27 }, { 1120000 } }, - { 2091000, 0, { 1719782, -40440, 27 }, { NewCpuVoltageScaled } }, - { 2193000, 0, { 1809766, -41939, 27 }, { NewCpuVoltageScaled } }, - { 2295000, 0, { 1904458, -43439, 27 }, { NewCpuVoltageScaled } }, - { 2397000, 0, { 2004105, -44938, 27 }, { NewCpuVoltageScaled } }, + // { 204000, { 721589, -12695, 27 }, { 1120000 } }, + // { 306000, { 747134, -14195, 27 }, { 1120000 } }, + // { 408000, { 776324, -15705, 27 }, { 1120000 } }, + // { 510000, { 809160, -17205, 27 }, { 1120000 } }, + // { 612000, { 845641, -18715, 27 }, { 1120000 } }, + // { 714000, { 885768, -20215, 27 }, { 1120000 } }, + // { 816000, { 929540, -21725, 27 }, { 1120000 } }, + // { 918000, { 976958, -23225, 27 }, { 1120000 } }, + // { 1020000, { 1028021, -24725, 27 }, { 1120000 } }, + // { 1122000, { 1082730, -26235, 27 }, { 1120000 } }, + // { 1224000, { 1141084, -27735, 27 }, { 1120000 } }, + // { 1326000, { 1203084, -29245, 27 }, { 1120000 } }, + // { 1428000, { 1268729, -30745, 27 }, { 1120000 } }, + // { 1581000, { 1374032, -33005, 27 }, { 1120000 } }, + // { 1683000, { 1448791, -34505, 27 }, { 1120000 } }, + // { 1785000, { 1527196, -36015, 27 }, { 1120000 } }, + // { 1887000, { 1609246, -37515, 27 }, { 1120000 } }, + // { 1963500, { 1675751, -38635, 27 }, { 1120000 } }, + { 2091000, { 1719782, -40440, 27 }, { NewCpuVoltageScaled } }, + { 2193000, { 1809766, -41939, 27 }, { NewCpuVoltageScaled } }, + { 2295000, { 1904458, -43439, 27 }, { NewCpuVoltageScaled } }, + { 2397000, { NewCpuVoltageScaled }, { NewCpuVoltageScaled } }, }; static_assert(sizeof(NewCpuTables) <= sizeof(cpu_freq_cvb_table_t)*14); @@ -112,19 +110,24 @@ namespace pcv { // TODO: correctly derive c0-c5 coefficients constexpr gpu_cvb_pll_table_t NewGpuTables[] = { // OldGpuTables - // { 537600, 0, {}, { 801688, -10900, -163, 298, -10599, 162 } }, - // { 614400, 0, {}, { 824214, -5743, -452, 238, -6325, 81 } }, - // { 691200, 0, {}, { 848830, -3903, -552, 119, -4030, -2 } }, - // { 768000, 0, {}, { 891575, -4409, -584, 0, -2849, 39 } }, - // { 844800, 0, {}, { 940071, -5367, -602, -60, -63, -93 } }, - // { 921600, 0, {}, { 986765, -6637, -614, -179, 1905, -13 } }, - // { 998400, 0, {}, { 1098475, -13529, -497, -179, 3626, 9 } }, - // { 1075200, 0, {}, { 1163644, -12688, -648, 0, 1077, 40 } }, - // { 1152000, 0, {}, { 1204812, -9908, -830, 0, 1469, 110 } }, - // { 1228800, 0, {}, { 1277303, -11675, -859, 0, 3722, 313 } }, - // { 1267200, 0, {}, { 1335531, -12567, -867, 0, 3681, 559 } }, - { 1305600, 0, {}, { 1380113, -13465, -874, 0, 2580, 648 } }, - { 1344000, 0, {}, { 1420000, -14000, -870, 0, 2193, 824 } }, + // { 537600, {}, { 801688, -10900, -163, 298, -10599, 162 } }, + // { 614400, {}, { 824214, -5743, -452, 238, -6325, 81 } }, + // { 691200, {}, { 848830, -3903, -552, 119, -4030, -2 } }, + // { 768000, {}, { 891575, -4409, -584, 0, -2849, 39 } }, + // { 844800, {}, { 940071, -5367, -602, -60, -63, -93 } }, + // { 921600, {}, { 986765, -6637, -614, -179, 1905, -13 } }, + // { 998400, {}, { 1098475, -13529, -497, -179, 3626, 9 } }, + // { 1075200, {}, { 1163644, -12688, -648, 0, 1077, 40 } }, + // { 1152000, {}, { 1204812, -9908, -830, 0, 1469, 110 } }, + // { 1228800, {}, { 1277303, -11675, -859, 0, 3722, 313 } }, + // { 1267200, {}, { 1335531, -12567, -867, 0, 3681, 559 } }, + { 1305600, {}, { 955000 } }, + { 1344000, {}, { 995000 } }, + // { 1382400, {}, { 1040000 } }, + // { 1420800, {}, { 1090000 } }, + // { 1459200, {}, { 1145000 } }, + // { 1497600, {}, { 1200000 } }, + // { 1536000, {}, { 1250000 } }, }; static_assert(sizeof(NewGpuTables) <= sizeof(gpu_cvb_pll_table_t)*15); diff --git a/Source/sys-clk-OC/README.md b/Source/sys-clk-OC/README.md index e0ce068a..2d41a07e 100644 --- a/Source/sys-clk-OC/README.md +++ b/Source/sys-clk-OC/README.md @@ -5,16 +5,16 @@ Switch sysmodule allowing you to set cpu/gpu clocks according to the running app ### Notes: - **No GPU capping on Mariko** (Hoag/Iowa/Aula) -- Ability to **set RAM clocks is removed**, please use sys-clk-OC with **[ptm patch](https://github.com/KazushiMe/Switch-OC-Suite/blob/master/Source/Patch/12-ptm.pchtxt)** +- Ability to **set RAM clocks is removed**, please use sys-clk-OC with **[ptm patch](https://github.com/KazushiMe/Switch-OC-Suite/blob/master/Source/Patch/13-ptm.pchtxt)** or prebuilt loader.kip ## Clock table (MHz) ### CPU clocks -* 2397 → max for Mariko -* 2295 → max for Mariko (stable) +* 2397 → approx. max for Mariko +* 2295 * 2193 -* 2091 +* 2091 → max for Mariko (without overvolting – capped at 1120 mV) * 1963 → official max for Mariko * 1887 * 1785 → official boost mode @@ -32,8 +32,9 @@ Switch sysmodule allowing you to set cpu/gpu clocks according to the running app ### GPU clocks -* 1344 → max for Mariko -* 1305 → max for Mariko (stable) +* 1??? → unknown max for Mariko +* 1344 +* 1305 * 1267 → official max for Mariko * 1228 * 1152 @@ -56,13 +57,13 @@ Switch sysmodule allowing you to set cpu/gpu clocks according to the running app From Hekate Minerva module [sys_sdrammtc.c](https://github.com/CTCaer/hekate/blob/197ed8c319bd4132e4d7571ce037d4a27f806bba/modules/hekate_libsys_minerva/sys_sdrammtc.c#L67) -- 2131 → max for Erista (with over-voltage) +- 2131 → max for Erista & Mariko (with overvolting) - 2099 - 2064 -- 1996 → max for Mariko +- 1996 - 1932 - 1894 -- 1862 → stable max for Mariko (stable on most DRAM chips except Hynix ones), max for Erista (without over-voltage) +- 1862 → stable max for Mariko (stable on most DRAM chips except Hynix ones) (without overvolting – capped at 600 mV) - 1795 - 1728 - 1600 → official docked & official boost mode