Shadow PC: Support for Ubuntu 21.10

I've had a really bad experience with Shadow.tech Support, they make it seem like all versions of Ubuntu are supported on their website and they most definitely are not. You have to be on a really old version to have 'official' support. When I tried to get help using 21.10 they made a token effort with advice for older versions and then told me I couldn't get a refund and had to pay for the service for a month despite being unable to use it.

I did really want to use this service though, so even though support were utterly... unsupportive I spent some time trying to analyse the problem myself. Here is what I found that let me achieve a somewhat working shadow desktop session on Ubuntu 21.10.

With this solution I can connect.. maybe 1 out of 5 times, the other times I get an "L-100" that I haven't found the cause of yet.

With all the recommended libraries installed via apt:

sudo apt install gconf2 libgles2-mesa libubsan1 libuv1 libva-glx2

Note: libubsan1 instead of libubsan0 for Ubuntu 21.10.

And a vainfo on my nvidia setup using Arekinath's patch that has the appropriate H264 entries, ref: nicolasguilloux.github.io/blade-shadow-beta..:

libva info: VA-API version 1.12.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.so
libva info: Found init function __vaDriverInit_1_1
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.12 (libva 2.10.0)
vainfo: Driver version: Splitted-Desktop Systems VDPAU backend for VA-API (arekinath) - 0.7.4
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            :    VAEntrypointVLD
      VAProfileMPEG2Main              :    VAEntrypointVLD
      VAProfileMPEG4Simple            :    VAEntrypointVLD
      VAProfileMPEG4AdvancedSimple    :    VAEntrypointVLD
      <unknown profile>               :    VAEntrypointVLD
      VAProfileH264Main               :    VAEntrypointVLD
      VAProfileH264High               :    VAEntrypointVLD
      VAProfileVC1Simple              :    VAEntrypointVLD
      VAProfileVC1Main                :    VAEntrypointVLD
      VAProfileVC1Advanced            :    VAEntrypointVLD

I was getting R-0x7F errors on each connect attempt.

To fix this I:

  • Unpacked the appimage:
./Shadow.AppImage --appimage-extract

This creates a folder called 'squashfs-root' with the contents of the app image inside it. To run the app you can:

cd squashfs-root
./shadow
  • When I ran the app and used strace to debug it:
sudo strace -s 9999 -f -e trace=execve -p $(ps axfwwwwwl | grep -i shadow | awk '{print $3}' | sort -n | head -1)`

I noticed that the app was constantly looking for a file called 'Shadow' which didn't exist on the app image. 'shadow' (lower case) does exist though. This smells like someone was developing on a Mac with a case insensitive file system to me. Classic developer error.

  • I symlinked 'Shadow' to 'shadow' in squashfs-root with:
ln -s ./shadow ./Shadow
  • I ran ./shadow again

Result

I can connect maybe 1 out of 5 times, the other times I get an L-100 error that I haven't been able to track down yet - but this is a significant improvement over not being able to connect at all.

Acknowledgements

To the team behind nicolasguilloux.github.io/blade-shadow-beta.. of course, and to the support posts where I pieced together a lot of this approach (such as using strace).