Skip to content
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

Add org.freedesktop.Platform.GL on elementary remote #32

Closed
alex285 opened this issue Apr 25, 2021 · 10 comments
Closed

Add org.freedesktop.Platform.GL on elementary remote #32

alex285 opened this issue Apr 25, 2021 · 10 comments
Labels
Priority: Critical e.g. security implications or reproducible crashing Status: Confirmed Verified by someone other than the reporter

Comments

@alex285
Copy link

alex285 commented Apr 25, 2021

I'm not sure this bug actually belongs here, but just to track the issue somewhere

What Happened

org.gnome.Epiphany from elementary Flatpak remote fails to run webprocess

Steps to Reproduce

  1. add elementary remote flatpak remote-add elementary https://flatpak.elementary.io/elementary.flatpakrepo
  2. install WebApp flatpak install elementary org.gnome.Epiphany
  3. run Epiphany flatpak run org.gnome.Epiphany

Results: Epiphany will start normally but when we try to open a web page even with hardware-acceleration-policy to "never", the tab will crash with Cannot create EGL context: invalid display (last error: EGL_SUCCESS)

Solution: We can add Flathub remote and install org.freedesktop.Platform.GL.default //20.08

I assume the same same applies for NVIDIA Flatpak drivers etc

Platform Information

elementary-6 pre-release

@btkostner
Copy link
Contributor

So, the actual repo for that stuff is here https://gitlab.com/freedesktop-sdk/freedesktop-sdk. My idea is to just create a cron schedule for this repo that clones their repo and runs the build script.

Question being what versions do we need pulled over? Just 20.08 or?

@alatiera
Copy link
Contributor

I'd recommend to clone the objects from flathub instead. No need to rebuild and and you won't have to update the tag you need to build manually each time that way.

@btkostner
Copy link
Contributor

@alatiera That's a fair point. Do you know the commands needed for that?

@cassidyjames cassidyjames added the Priority: Critical e.g. security implications or reproducible crashing label May 1, 2021
@cassidyjames cassidyjames pinned this issue May 1, 2021
@cassidyjames
Copy link
Contributor

cassidyjames commented May 1, 2021

This makes Web next to useless in the beta, so should be addressed ASAP. As @alex285 mentioned, a workaround for users for now is to install the GL extension from Flathub. Add the remote:

flatpak remote-add --system --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

and then install the extension:

flatpak install -y flathub org.freedesktop.Platform.GL.default//20.08

Note that you'll now get Flathub apps in AppCenter as it's a system remote (versus being a user remote when added via Sideload), so this is not ideal. But it works for now.

@alatiera
Copy link
Contributor

alatiera commented May 3, 2021

So this might end up a bit trickier than I hoped for. Disclaimer I haven't tried either of the following and it might end up easier in the end to rebuild the extensions.

So there are 2 ostree pull/pull-local commands but a. they differ depending if the repository is available in a local repo or not, which is a bit weird given that we don't want to have to pull everything before.

And b. ideally we'd want something like flatpak build-commit-from --untrusted to import the object instead so it will also manage signing the ref etc.

There are some docs which you could take a look at, but the usecase they showcase is different in nature.

@btkostner
Copy link
Contributor

@alatiera Thank you for the guidance on this! 🎊

@btkostner btkostner reopened this May 4, 2021
@btkostner
Copy link
Contributor

Alright, so the branch seems to be copied into the repo, gpg signing is working correctly. The size is pretty big, so I am assuming it's correct. But now we are getting this issue with old and new beta installs:

[btkostner:~/tmp/flathub] 12s % flatpak install appcenter org.freedesktop.Platform.GL.default
Looking for matches…


        ID                                             Branch            Op            Remote              Download
 1. [✗] org.freedesktop.Platform.GL.default            20.08             i             appcenter           1.0 kB / 489.3 MB

Error: Commit metadata for runtime/org.freedesktop.Platform.GL.default/x86_64/20.08 not matching expected metadata
error: Failed to install org.freedesktop.Platform.GL.default: Commit metadata for runtime/org.freedesktop.Platform.GL.default/x86_64/20.08 not matching expected metadata

Current script we use for mirroring: https://github.com/elementary/flatpak-platform/blob/main/.github/workflows/mirror.yml

Looking it up it suggests flatpak repair, but this seems to be a mirror or repo problem, not on the user side of things.

Anyone here have thoughts?

@cassidyjames cassidyjames added the Status: Confirmed Verified by someone other than the reporter label May 4, 2021
@barthalion
Copy link

IMHO there are only two correct solutions. The first one is to ask FreeDesktop SDK team to upload GL extensions to your repository with flat-manager.

The other, one that is somewhat proved to work already for Fedora, is to enable Flathub by default but configure a filter to deny all refs except org.freedesktop.Platform extensions. Filter file format is described in flatpak-remote-add man page.

@cassidyjames
Copy link
Contributor

@barthalion alright, we've done the latter here: elementary/os#480. We can always consider something else in the future, but this gets us rolling.

@btkostner btkostner unpinned this issue May 14, 2021
@cassidyjames
Copy link
Contributor

So while the extension is made available, it's not pre-installed. Opening an issue on the OS repo for that: elementary/os#492

For anyone else on a recent daily build, this should resolve it:

flatpak install --system freedesktop org.freedesktop.Platform.GL.default//20.08

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Critical e.g. security implications or reproducible crashing Status: Confirmed Verified by someone other than the reporter
Projects
None yet
Development

No branches or pull requests

5 participants