forked from GloriousEggroll/protonfixes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
checks.py
executable file
·38 lines (31 loc) · 934 Bytes
/
checks.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
""" Run some tests and generate warnings for proton configuration issues
"""
import shutil
import os
import subprocess
from .logger import log
def esync_file_limits():
"""
Check esync file limits using /proc/sys/fs/file-max
https://www.reddit.com/r/SteamPlay/comments/9kqisk/tip_for_those_using_proton_no_esync1/
"""
warning = '''File descriptor limit is low
This can cause issues with ESYNC
For more details see:
https://github.com/zfigura/wine/blob/esync/README.esync
'''
with open('/proc/sys/fs/file-max') as fsmax:
max_files = fsmax.readline()
if int(max_files) < 8192:
log.warn(warning)
return False
return True
def run_checks():
""" Run checks to notify of any potential issues
"""
log.info('Running checks')
checks = [
esync_file_limits(),
]
if all(checks):
log.info('All checks successful')