From 95282c80a85d4214ceec7ad0e63998b11c4dbe84 Mon Sep 17 00:00:00 2001 From: Paul Gofman Date: Wed, 21 Aug 2024 17:57:55 -0600 Subject: [PATCH] proton: Check for low /proc/sys/vm/max_map_count. CW-Bug-Id: #24081 --- proton | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/proton b/proton index 9b47bd01..342aa045 100755 --- a/proton +++ b/proton @@ -1490,6 +1490,12 @@ class Session: if hard_limit < 524288: self.log_file.write(f"WARNING: Low file descriptor limit: {hard_limit} (see https://github.com/ValveSoftware/Proton/wiki/File-Descriptors)\n") + if os.path.exists("/proc/sys/vm/max_map_count"): + with open("/proc/sys/vm/max_map_count", "r") as f: + max_map_count = int(f.read()) + if max_map_count < 1048576: + self.log_file.write(f"WARNING: Low /proc/sys/vm/max_map_count: {max_map_count} will prevent some games from working\n") + self.log_file.write("======================\n") self.log_file.flush() else: