Add BOINC stuff
This commit is contained in:
parent
9a8f73cf88
commit
3ed09f2f88
4 changed files with 76 additions and 0 deletions
13
boinc/app_config_template.xml
Executable file
13
boinc/app_config_template.xml
Executable file
|
@ -0,0 +1,13 @@
|
|||
<app_config>
|
||||
<app>
|
||||
<name>myapp</name>
|
||||
<gpu_versions>
|
||||
<cpu_usage>1.0</cpu_usage>
|
||||
<gpu_usage>0.5</gpu_usage>
|
||||
</gpu_versions>
|
||||
</app>
|
||||
</app_config>
|
||||
|
||||
<app_config>
|
||||
<project_max_concurrent>1</project_max_concurrent>
|
||||
</app_config>
|
42
boinc/boinc-client-amd-opencl.service
Executable file
42
boinc/boinc-client-amd-opencl.service
Executable file
|
@ -0,0 +1,42 @@
|
|||
[Unit]
|
||||
Description=Berkeley Open Infrastructure Network Computing Client
|
||||
Documentation=man:boinc(1)
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
Environment=GPU_SINGLE_ALLOC_PERCENT=100
|
||||
Environment=GPU_MAX_HEAP_SIZE=100
|
||||
Environment=GPU_FORCE_64BIT_PTR=1
|
||||
Environment=GPU_USE_SYNC_OBJECTS=1
|
||||
Environment=GPU_MAX_ALLOC_PERCENT=100
|
||||
Type=simple
|
||||
ProtectHome=true
|
||||
PrivateTmp=true
|
||||
#ProtectSystem=strict
|
||||
#ProtectControlGroups=true
|
||||
ReadWritePaths=-/var/lib/boinc -/etc/boinc-client
|
||||
Nice=10
|
||||
User=boinc
|
||||
WorkingDirectory=/var/lib/boinc
|
||||
ExecStart=/usr/bin/boinc
|
||||
ExecStop=/usr/bin/boinccmd --quit
|
||||
ExecReload=/usr/bin/boinccmd --read_cc_config
|
||||
ExecStopPost=/bin/rm -f lockfile
|
||||
IOSchedulingClass=idle
|
||||
# The following options prevent setuid root as they imply NoNewPrivileges=true
|
||||
# Since Atlas requires setuid root, they break Atlas
|
||||
# In order to improve security, if you're not using Atlas,
|
||||
# Add these options to the [Service] section of an override file using
|
||||
# sudo systemctl edit boinc-client.service
|
||||
#NoNewPrivileges=true
|
||||
#ProtectKernelModules=true
|
||||
#ProtectKernelTunables=true
|
||||
#RestrictRealtime=true
|
||||
#RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
|
||||
#RestrictNamespaces=true
|
||||
#PrivateUsers=true
|
||||
#CapabilityBoundingSet=
|
||||
#MemoryDenyWriteExecute=true
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
11
boinc/cc_config_template.xml
Normal file
11
boinc/cc_config_template.xml
Normal file
|
@ -0,0 +1,11 @@
|
|||
<cc_config>
|
||||
<log_flags>
|
||||
<task>1</task>
|
||||
<file_xfer>1</file_xfer>
|
||||
<sched_ops>1</sched_ops>
|
||||
</log_flags>
|
||||
<options>
|
||||
<allow_remote_gui_rpc>1</allow_remote_gui_rpc>
|
||||
</options>
|
||||
</cc_config>
|
||||
|
10
boinc/screenlock.sh
Executable file
10
boinc/screenlock.sh
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
|
||||
# If screen is locked (GNOME Screensaver true), enable GPU computing. Otherwise disable GPU computing.
|
||||
dbus-monitor --session "type='signal',interface='org.gnome.ScreenSaver'" |
|
||||
while read x; do
|
||||
case "$x" in
|
||||
*"boolean true"*) boinccmd --set_gpu_mode always && echo "GPU Computing Enabled";;
|
||||
*"boolean false"*) boinccmd --set_gpu_mode never && echo "GPU Computing Disabled";;
|
||||
esac
|
||||
done
|
Loading…
Reference in a new issue