well, if the app actually uses these paths hardcoded (without any way to override them) you need actual layouts to re-map these dirs to locations inside the snap environment …
These are just defaults, which can be overridden using command line arguments (which is what they did)
Hi, I was finally able to try @ogra 's suggestion and change a little the way the snap works.
It took me some time because I was experimenting using the lxd container, to try to reduce system resources usage, but it didn’t work for me, so I’m using Multipass again. Also, each test takes me a long time, to rebuild the snap (I usually make snapcraft clean mypart
), I’m not sure there’s a faster procedure.
While I’m currently focusing on enablying the OpenGL support, next I will try to make the fahclient be a user service using an autostart desktop file. I’m still investigating how to do it properly. Also, I’d like to enable CUDA as well, but that’s for later too.
OpenGL
I released revision 35 to all channels. Using the hardware-observe
interface the GPU is detected, though there are still some errors. Adding the browser-support
interface didn’t seem to help actually, but I’m not sure if I had to set something related to sandboxing and where to eventually do so.
Client errors
Running the client, on first run, it produces the following error:
12:27:00:ERROR:No compute devices matched GPU #0 NVIDIA:4 GM107 [GeForce GTX 850M]. You may need to update your graphics drivers.
In the control app, the GPU slot appears but it is always yellow with the writing Paused: waiting for idle. For OpernGL it reports:
-
GPUs:
0
-
CUDA:
Not detected: cuInit() returned 100
-
OpenCL:
Not detected: clGetPlatformIDs() returned -1001
Logs:
15:34:05 kernel: audit: type=1400 audit(1585917245.233:67775): apparmor="DENIED" operation="open" profile="snap.folding-at-home-fcole90.folding-at-home-fcole90" name="/var/lib/snapd/hostfs/usr/lib/x86_64-linux-gnu/libX11.so.6.3.0" pid=794779 comm="FAHClient" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
15:34:05 FAHClient: AVC apparmor="DENIED" operation="open" profile="snap.folding-at-home-fcole90.folding-at-home-fcole90" name="/var/lib/snapd/hostfs/usr/lib/x86_64-linux-gnu/libX11.so.6.3.0" pid=794779 comm="FAHClient" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
15:33:43 kernel: audit: type=1400 audit(1585917223.173:67774): apparmor="DENIED" operation="open" profile="snap.folding-at-home-fcole90.folding-at-home-fcole90" name="/var/lib/snapd/hostfs/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28" pid=794779 comm="FAHClient" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
15:33:43 FAHClient: AVC apparmor="DENIED" operation="open" profile="snap.folding-at-home-fcole90.folding-at-home-fcole90" name="/var/lib/snapd/hostfs/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28" pid=794779 comm="FAHClient" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
15:33:09 kernel: audit: type=1400 audit(1585917189.721:67773): apparmor="DENIED" operation="open" profile="snap.folding-at-home-fcole90.folding-at-home-fcole90" name="/var/lib/snapd/hostfs/usr/lib/x86_64-linux-gnu/libX11.so.6.3.0" pid=794687 comm="FAHClient" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
15:33:09 FAHClient: AVC apparmor="DENIED" operation="open" profile="snap.folding-at-home-fcole90.folding-at-home-fcole90" name="/var/lib/snapd/hostfs/usr/lib/x86_64-linux-gnu/libX11.so.6.3.0" pid=794687 comm="FAHClient" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
15:33:09 kernel: audit: type=1400 audit(1585917189.709:67772): apparmor="DENIED" operation="open" profile="snap.folding-at-home-fcole90.folding-at-home-fcole90" name="/var/lib/snapd/hostfs/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28" pid=794687 comm="FAHClient" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
15:33:09 FAHClient: AVC apparmor="DENIED" operation="open" profile="snap.folding-at-home-fcole90.folding-at-home-fcole90" name="/var/lib/snapd/hostfs/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28" pid=794687 comm="FAHClient" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
I’m running the client as user, with the command folding-at-home-fcole90
which has the following plugs:
plugs:
- network
- network-bind
- opengl
- x11
- unity7
- home
- serial-port
- raw-usb
- desktop
- desktop-legacy
- hardware-observe
- browser-support
Any suggestion on how to proceed?
I have a new laptop and I fresh installed Ubuntu 20.04 and the required OpenCL dependencies. I tried the latest edge version of this snap and the GPU is recognised correctly. Hence, after the hardware observe plug, I really think everything else was due to some misconfiguration of my previous laptop
Thank you very much everyone for your help, and especially many thanks to @ogra, without whom I could have not arrived this far!
@fcole90 Don’t forget to ask for hardware-observe
auto-connect.
Certainly, thanks. I want first to improve the user experience of the snap. Currently you have to start the interface and also launch the client from your terminal. I want to make the client be an autostarting user service, and have a short UI introduction on first launch, so that it takes care of creating the autostart desktop file and launching both the service and the control UI This is the kind of usability you get when installing FAH on Windows, I’d like the Linux version to be as easy to use
Hey all! I’m attempting to use the Edge version of this snap, but seem to be coming across an issue where the fonts are not rendered in the app, nor am I getting my GTK theme applied. I’m currently running on Pop_OS! 20.04 (RC). Here’s an example of what I’m seeing:
I’m imagining that there’s something about my theme’s assets not coming over. I could live with that though if I could get font rendering to work.
I’ve tried to debug, but I’m not versed in how a single snap presents multiple apps, and doing a snap run
runs FAHClient
, which doesn’t help me see any errors. Any suggestions on how to gather more data and/or to resolve the font issue would be greatly appreciated. Thanks!
Sorry for the b2b replies, but reading the scrollback helped me run the client in the CLI. The errors don’t seem to provide any hints here, though, so your help would be appreciated!
Hi, I’m sorry for the issue. Does closing and reopening FAHControl help? What happens if you change theme (possibly to Yaru or Adwaita) and you open the app again?
Thank you for reporting this
FAH uses the gtk2-common-themes content snap … is the interface connected ? … does perhaps temporary switching the gtk2-common-themes snap to another channel (like edge) help ?
I can successfully access the MESA open source drivers’ implementation of OpenCL with the following additions to snapcraft.yaml
for my own project:
layout:
/usr/include/clc:
bind: $SNAP/usr/include/clc
/usr/lib/clc:
bind: $SNAP/usr/lib/clc
/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/gallium-pipe:
bind: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/gallium-pipe
parts:
opencl:
plugin: nil
stage-packages:
- mesa-opencl-icd
- ocl-icd-libopencl1
This was tested with python-opencv inside my snap against an AMD GPU with the open source stack (not the proprietary AMDGPU PRO)
Is it possible to set a default theme if a theme is not found (i.e. Yaru).
KDE Neon is still using 18.04, so Yaru isn’t available for it.
sure, you just need to ship it inside the snap, have some kind of wrapper that detects that none of the themes/cursors/icons are available and make sure your app finde the fallback … its just a matter of wrapper scripting
here is an example where i use a fallback cursor theme (which makes sure that the system doesnt fall back to a tiny builtin X cursor on hidpi systems):
https://github.com/ogra1/zoom-snap/blob/master/launcher.sh#L29
Shouldn’t the theme come from the gtk-theme snap? Or am I missing something?
Thanks, I’ll try this as soon as I find some spare time
if the theme is not shipped in the gtk-theme snap, themeing will fall back to the default … for cursors that is the compiled in Xorg cusor (unscaled) for gtk the builtin “win95” style theme …
so to make sure you dont fall back to these hard defaults you can force-fallback to something a little saner and less ugly …
Hey folks - found my issues were happening in other snaps, and discovered that I had a poisoned font cache. Removing both my local and system font caches and regenerating resolved my issues.
Hello Fabio, would you be able to package the newest version of Folding@home into the ubuntu snap you had created?