-
-
Notifications
You must be signed in to change notification settings - Fork 486
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
flatpak launcher #2207
flatpak launcher #2207
Conversation
Oh yeah I could not get the desktop shortcut part to work. The copy command just says folder does not exist - not sure how to do this properly so I just commented it out. |
Honestly i thought about changing flatpak to just instructions on how to run portable under flatpak container, since it seemed to work for nvidia users |
What formatter was used for json? It looks a bit odd... |
Just vscode defaults, sorry for mangling it! And yes - this flatpak should work for all users - but I have no AMD to test on. This is same method blender and other programs support nvidia via flatpak. |
Another improvement is to download cuda rather than copy from host: https://developer.nvidia.com/cuda-toolkit-archive This would be quite elegant then, and provide a completely portable build environment? |
@failboat78 Unfortunately nvidia requires you to give personal details before download. So we cannot automate it. From experience, installing cuda packages may break the system, when not provided by the distro package manager. So maybe we should add the option to link from a user provide directory? |
They must have changed their website, it's possible to download those cuda archives without a login. It does want you to accept license when you install tho, but this can be automated. Using flatpak we avoid the usual "breaking the system" problems. We are just using this cuda to do our build, then discarding it. There should be no system to break. I'll commit improvements in near future. |
@zarik5 @Meister1593 now it should be fully automated portable build. But cuda download is 4.1GB so can cause large delay dependent on internet speed. I was not able to run the cuda installer in the normal fashion - it would segfault. As a workaround I had to use the raw extract option which is provided for weird cases like this. The nvidia software is split between several folders internally - so I had to update pkgconfig to use multiple folders. Pretty tedious stuff! |
Same flatpak file is also used for pipelines, i have a feeling this needs to be set up with caching for sure, and maybe even separated?... |
Yes we need to cache this cuda stuff. I am trying to figure out how best to do that with flatpak - maybe moving cuda to it's own extension, or another module. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm overall fine with this, but i still wonder if you can just run launcher + alvr under flatpak without any of this
Could you try to:
- Downloading launcher https://github.com/alvr-org/ALVR/releases/download/v20.9.1/alvr_launcher_linux.tar.gz
- Putting it into
~/.var/app/com.valvesoftware.Steam
- Launching it with
flatpak run --command='~/.var/app/com.valvesoftware.Steam/ALVR Launcher' com.valvesoftware.Steam
(or similar to just be able to run it under runtime) - Installing alvr stable version, trying to run it under flatpak steam all as usual with all fixes from troubleshooting
Sure - I will start looking at how to include the launcher with flatpak. But that seems like a seperate task - not related to all the nvidia nonsense here. Can we please merge this one and I will open a new PR for launcher flatpak stuff? If we don't use the stuff here (which is purely build related) then that is fine - I just wanted to learn more about the build process. And the same stuff can be used to package the launcher too hopefully. What I am clueless about is the interaction between steam vs steamvr vs alvr vs launcher - this requires some study. |
Then only one question, related to cache, on @zarik5 - is it fine? It has big size (more than gb) a bit as far as i can tell and there was an issue with space we had available. If it's impossible, then launcher could be the only option |
If cache is a problem we can remove the MSRV jobs |
Just double checked that case on amd - it works completely fine |
don't think removing them is a good idea?... they are pretty useful |
We can make so it runs only for release branches or remove its (rust) cache. But we did not hit the limit yet. |
I think we can push it as is without auto-installing desktop file Just update flatpak wiki page and we can merge it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert removal of flatpak page (it's useful), make it just specific for launcher and note how you can install desktop file
@failboat78 ping? |
I'm confused - what changes are we doing? Do we want a completely seperate PR for the launcher stuff? This original PR was mostly concerned with using flatpak as a build environment - which is very different. If that's what we want I will revert and make a new PR for the launcher. |
…esktop shortcut (does not work but at least its in there)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the only thing left is to update the wiki and that's it
@The-personified-devil should it be in the same pr or could be done separately? (just to not stall pr), what do you think?
merge this first, wiki prs are really quick to merge |
add some convenience scripts for build/install/setup shortcut and icon converted windows ico file to png for use on linux known issues: file browser and apk buttons do not work in launcher still testing
Adb working under flatpak probably requires dashboard-side changes (to run different command), for now i think it can be skipped, just note that in wiki page later |
I got adb working under flatpak and updated readme. However I am still not able to run a complete VR test because it seems a lot of stuff graphics and steamvr got updated in last few weeks. |
|
||
``` | ||
flatpak run org.flatpak.Builder --user --install --force-clean .flatpak-build-dir alvr/xtask/flatpak/com.valvesoftware.Steam.Utility.alvr.json | ||
cd alvr/xtask/flatpak | ||
./build_and_install.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this script requires host flatpak builder, but before it was from flatpak itself
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
flatpak-builder
vs flatpak run org.flatpak.Builder
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides this, everything else works fine on amdgpu
If this changed it can be merged just fine
small edits to readme for clarity
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will merge for now, update nightly and check if it builds correctly there as well (you can try building it on your repo (ignoring android build) and see if flatpak is correct)
If it works, then most likely release build should work fine as well.
And of course, update wiki too.
* flatpak nvidia * wip * now downloads cuda rather than copying from host * move cuda to own module so it can be cached * fix cuda build - but also make cuda build redundant via launcher * remove all unnecessary stuff, only launcher left * remove spurious module, add simple build script, attempt copying of desktop shortcut (does not work but at least its in there) * put readme back - and update it with new info add some convenience scripts for build/install/setup shortcut and icon converted windows ico file to png for use on linux known issues: file browser and apk buttons do not work in launcher still testing * update readme, add notes and convenience scripts for adb install in flatpak * change build back to org.flatpak.Builder small edits to readme for clarity * add note warning about nvidia and hdr * note about pipewire --------- Co-authored-by: failboat <[email protected]>
* flatpak nvidia * wip * now downloads cuda rather than copying from host * move cuda to own module so it can be cached * fix cuda build - but also make cuda build redundant via launcher * remove all unnecessary stuff, only launcher left * remove spurious module, add simple build script, attempt copying of desktop shortcut (does not work but at least its in there) * put readme back - and update it with new info add some convenience scripts for build/install/setup shortcut and icon converted windows ico file to png for use on linux known issues: file browser and apk buttons do not work in launcher still testing * update readme, add notes and convenience scripts for adb install in flatpak * change build back to org.flatpak.Builder small edits to readme for clarity * add note warning about nvidia and hdr * note about pipewire --------- Co-authored-by: failboat <[email protected]>
* flatpak nvidia * wip * now downloads cuda rather than copying from host * move cuda to own module so it can be cached * fix cuda build - but also make cuda build redundant via launcher * remove all unnecessary stuff, only launcher left * remove spurious module, add simple build script, attempt copying of desktop shortcut (does not work but at least its in there) * put readme back - and update it with new info add some convenience scripts for build/install/setup shortcut and icon converted windows ico file to png for use on linux known issues: file browser and apk buttons do not work in launcher still testing * update readme, add notes and convenience scripts for adb install in flatpak * change build back to org.flatpak.Builder small edits to readme for clarity * add note warning about nvidia and hdr * note about pipewire --------- Co-authored-by: failboat <[email protected]>
To enable nvidia encoding inside flatpak we need to build ffmpeg with cuda support. This needs the nvcc compiler - which is not easily obtainable via flatpak. The current freedesktop nvidia driver packages have the driver but are missing nvcc. In the future maybe there will be some sdk extension package that can be added to enable this.
But for now, we can add the hosts cuda folder to the flatpak build env and get it to work. I'm using arch which has a non-standard install location for cuda (/opt/cuda) - other distros might use different. NVCC is also fussy about it's gcc version - 13.2 is the max supported right now. But arch comes with gcc-14 so even without flatpak this requires extra settings. Flatpak actually makes this easier because the runtime used has 13.2 right now.
So the changes needed are quite small, we just copy cuda into the build folder, and update the pkgconfig to point to it. Then just set some env variables and the build works. Note that NVCC is only needed for the build, not at runtime.
Improvements that can be made:
Print error if cuda not installed - or continue without nvidia support
Detect where host has cuda installed, update paths to reflect
Testing:
Works well for me with arch+flatpak steam+4090 555+kde plasma 6.1.
Does this also work for amd users? Would there be an nvidia vs non-nvidia version needed?