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

Snap package: no access to opengl acceleration #875

Closed
Erick555 opened this Issue Mar 19, 2018 · 12 comments

Comments

Projects
None yet
2 participants
@Erick555

Erick555 commented Mar 19, 2018

At start Qownnotes tries to use 3D acceleration through MESA (as many QT apps do) but it fails due to missing opengl flatpak inteface and lack of bundled mesa library. You can see examples here: https://forum.snapcraft.io/t/how-do-people-build-qt-gui-applications-snaps/3714

Expected behaviour

3D acceleration working.

Actual behaviour

3D acceleration fails.

Steps to reproduce

snap run qownnotes

Output from snap run qownnotes

libGL error: MESA-LOADER: failed to retrieve device information
libGL error: Version 4 or later of flush extension not found
libGL error: failed to load driver: i915
libGL error: MESA-LOADER: failed to retrieve device information
@pbek

This comment has been minimized.

Owner

pbek commented Mar 20, 2018

That's strange and I can't reproduce this error on my systems where I use snap. For me QOwnNotes also runs in Virtual Machines without opengl. On which system are you running it? Do you think adding the opengl plug will fix your issue?

@Erick555

This comment has been minimized.

Erick555 commented Mar 20, 2018

To clarify: QOwnNotes app works but on startup it tries to use opengl which is blocked by apparmor and spams audit logs wit messages like:
AVC apparmor="DENIED" operation="open" profile="snap.qownnotes.qownnotes" name="/sys/devices/pci0000:00/0000:00:02.0/vendor" pid=9641 comm="QOwnNotes" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
On systems without apparmor or with incomplete apparmor support there may be no issues. If you aren't using audit framework you may not even know about those denials.

I believe adding opengl plug (not sure about mesa libraries) will fix this but I can't test without rebuilding snap package.

@pbek

This comment has been minimized.

Owner

pbek commented Mar 20, 2018

Ah, so you are vidal72[m] on IRC. ;)
Then we'll see in the next release. Thank you for reporting!

@pbek

This comment has been minimized.

Owner

pbek commented Mar 20, 2018

18.03.8

  • added the plug opengl to the snapped version of QOwnNotes to prevent
    OpenGL AppArmor errors

@pbek pbek added this to the 18.03.8 milestone Mar 20, 2018

@pbek pbek changed the title from Snap package: no acces to opengl acceleration to Snap package: no access to opengl acceleration Mar 20, 2018

@pbek

This comment has been minimized.

Owner

pbek commented Mar 20, 2018

There now is a new release, could you please test it and report if it works for you?

@Erick555

This comment has been minimized.

Erick555 commented Mar 20, 2018

snap refresh doesn't see new release yet. When I update package I report back here.

@pbek

This comment has been minimized.

Owner

pbek commented Mar 20, 2018

Thanks, building the snap takes a while on https://code.launchpad.net/~pbek/+snap/qownnotes.

@Erick555

This comment has been minimized.

Erick555 commented Mar 20, 2018

Unfortunately snap run qownnotes fails with:

execl failed: No such file or directory
child exited with status 1

Disconnecting opengl plug fixes this. I guess some opengl libraries are missing (I use Intel gpu with mesa). Does it run for you?

@Erick555

This comment has been minimized.

Erick555 commented Mar 20, 2018

It seems moving to edge branch of core snap fixes this:
snap refresh core --edge
As for me doing this is acceptable. If you can't reproduce my issues feel free to close this. Otherwise you may need to disable opengl until snap core is updated.

EDIT: --beta channel also works.

@pbek

This comment has been minimized.

Owner

pbek commented Mar 20, 2018

It get's stranger and stranger, let's close the issue for now. Thank you for testing.

@pbek pbek closed this Mar 20, 2018

@Erick555

This comment has been minimized.

Erick555 commented Mar 21, 2018

@pbek

This comment has been minimized.

Owner

pbek commented Mar 21, 2018

I see, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment