ubports / ubports-pdk

Platform Development Kit for Ubuntu Touch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ubports-pdk.pdk run yields "qemu-system-x86_64: OpenGL is not supported by the display"

ruedigerkupper opened this issue · comments

This is on a not-so-old Lenovo X230T Notebook. glxgears runs fine, so OpenGL obviously is supported by my display. Attaching output of glxinfo.
What am I doing wrong?
glxinfo.txt

Is dmesg giving any information about AppArmor denials? Also, are you using the full-Snap version or the version from git with qemu-ut-pdk?

dmesg has
audit: type=1400 audit(1628777485.446:546): apparmor="DENIED" operation="connect" profile="snap.ubports-pdk.pdk" name="/run/user/1000/wayland-0" pid=64153 comm="qemu-system-x86" requested_mask="wr" denied_mask="wr" fsuid=1000 ouid=1000
It's the full-snap version.

Ah, right. It's Wayland. Everything works on X.

I have the same issue with Wayland. There is a bit more to the error message though:

Running in unprivileged passthrough mode.
virtio_session_mount: Waiting for vhost-user socket connection...
qemu-system-x86_64: OpenGL is not supported by the display

What is this unprivileged passthrough mode? Maybe user needs to be in some group to get the necessary privileges?

"Unprivileged passthrough mode" is a message by virtiofsd, which provides the file sharing capabilities.
I had to patch it to not require yet another bunch of permissions, so that's that.

I'm surprised the GDK_BACKEND environment variable is not picked up properly, even though I enforce it in the snap's environment: https://github.com/ubports/ubports-pdk/blob/main/snap/snapcraft.yaml#L23

Maybe you want to run the command with the GDK_BACKEND=x11 environment variable prepended, so that it at least works on Wayland until a fix is implemented.

GDK_BACKEND=x11 ubports-pdk.pdk run fails with the same error message.

What about the pid error message?

I don't see this issue any more running from the script directly, but still with snap. Is the snap outdated?

I also run into this issue, running Ubuntu 22.04.1 LTS

GDK_BACKEND=x11 ubports-pdk.pdk run
...
...
Running in unprivileged passthrough mode.
Cannot lock pid file: Resource temporarily unavailable
qemu-system-x86_64: OpenGL is not supported by the display

snap version
snap 2.57.6
snapd 2.57.6
series 16
ubuntu 22.04
kernel 5.15.0-53-generic

@fredldotme, should we change the README to suggest installing from the edge channel as the beta channel is very outdated and non-functional for many?