Skip to content

Commit 95282c8

Browse files
author
Paul Gofman
committed
proton: Check for low /proc/sys/vm/max_map_count.
CW-Bug-Id: #24081
1 parent 569828d commit 95282c8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

proton

+6
Original file line numberDiff line numberDiff line change
@@ -1490,6 +1490,12 @@ class Session:
14901490
if hard_limit < 524288:
14911491
self.log_file.write(f"WARNING: Low file descriptor limit: {hard_limit} (see https://github.com/ValveSoftware/Proton/wiki/File-Descriptors)\n")
14921492

1493+
if os.path.exists("/proc/sys/vm/max_map_count"):
1494+
with open("/proc/sys/vm/max_map_count", "r") as f:
1495+
max_map_count = int(f.read())
1496+
if max_map_count < 1048576:
1497+
self.log_file.write(f"WARNING: Low /proc/sys/vm/max_map_count: {max_map_count} will prevent some games from working\n")
1498+
14931499
self.log_file.write("======================\n")
14941500
self.log_file.flush()
14951501
else:

0 commit comments

Comments
 (0)