I'm not sure if this is the best place to put this, but I figure it will have the most exposure so here goes.
For a while now I had struggled with getting BOINC to cooperate correctly on linux with GPUs. Normally the issue I ran into was it starting before the driver had loaded, so it would give the "No Usable GPUs found" message in the logs. I think I've found a way to get around that with horrible init script suckitude. What I've found is that OpenCL (maybe CUDA) tries to open /dev/nvidiactl and /dev/nvidia0. So, all we need to do is make sure those exist (and the nvidia kernel module is loaded) without the aforementioned suck.
In a nutshell: use systemd.
Here's a startup script that seems to be working for me, to guarantee those devices exist on Arch Linux.
Code:
[Unit]
Description=Creates nVidia /dev thingys
Wants=multi-user.target
Before=multi-user.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/mknod -m 666 /dev/nvidia0 c 195 0
ExecStart=/usr/bin/mknod -m 666 /dev/nvidiactl c 195 255
[Install]
WantedBy=multi-user.target
Drop that in /etc/systemd/system, run systemctl enable nvidia.service && systemctl start nvidia.service and voila. Anything using the nVidia OpenCL implementation should work. This appears to be working for me, but YMMV and there may be some things that need to be changed. Off the top of my head, if the nvidia kernel module isn't loading, you could add ExecStart=modprobe nvidia before the mknod commands in the service block.
If I find something breaks or needs to be changed, I'll update it here.
Bookmarks