Skip to content

Commit

Permalink
proton: Check for low /proc/sys/vm/max_map_count.
Browse files Browse the repository at this point in the history
CW-Bug-Id: #24081
  • Loading branch information
Paul Gofman committed Aug 22, 2024
1 parent 569828d commit 95282c8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions proton
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 95282c8

Please sign in to comment.