ordovice / batocera-switch

Extends Batocera and adds switch emulation
154 stars 36 forks source link

Fix max map count #150

Closed drizzt closed 1 year ago

drizzt commented 1 year ago

New Ryujinx needs an higher value of vm.max_map_count

Since this Ryujunx PR [1] it returns a warning if vm.max_map_count < 524288, so just set an higher value.

To be coherent with what other Linux distrubitions are doing, use 2147483642.

This is the value used by Batocera 37 itself [2], SteamDeck and Fedora 39 [3].

There is not need to re-set the value each time yuzu or Ryujinx is started, so just set it once on startup.

[1] https://github.com/Ryujinx/Ryujinx/pull/4702 [2] https://github.com/batocera-linux/batocera.linux/pull/8649 [3] https://fedoraproject.org/wiki/Changes/IncreaseVmMaxMapCount

uureel commented 1 year ago

thx! on v35 afair it was 65536, it was initially being changed to 1m, but i also remember seeing somewhere while kernel might eat values above >262k it might not necessarily in fact spawn that many pages, but regardless, if it works it works