Giter VIP home page Giter VIP logo

Comments (7)

maxiberta avatar maxiberta commented on May 31, 2024

Hi! What's the issue exactly? How does it affect moonlight? What OS and snap revision/channel?

Snapd automagically makes the installed graphics libraries available to snaps on /var/lib/snapd/lib/gl/vdpau/. In particular, libvdpau_nvidia.so is provided by packages libnvidia-decode-{390,418,430,435,440} on Ubuntu. These are versioned packages that need to match exactly the driver installed on your machine, so bundling them in the snap seems to make no sense.

For debugging, please install the release on edge, which includes some extra utilities for diagnostics and try moonlight.vdpauinfo. It should print the same output as the bare vdpauinfo on your machine. It does work for me.

$ snap version
snap    2.43.1+git1636.8291fc2~ubuntu16.04.1
snapd   2.43.1+git1636.8291fc2~ubuntu16.04.1
series  16
ubuntu  20.04
kernel  5.4.0-12-generic

$ sudo snap refresh moonlight --edge

$ snap info moonlight
...
tracking:     latest/edge
...
installed:    1.2.1-18-g58313ad            (567) 76MB -

$ snap run moonlight.vdpauinfo
# same output as plain vdpauinfo

$ snap run --shell moonlight -c "ls /var/lib/snapd/lib/gl/vdpau/"
libvdpau_nvidia.so  libvdpau_nvidia.so.1  libvdpau_nvidia.so.440.44

Thanks!

from moonlight-snap.

JohnDoee avatar JohnDoee commented on May 31, 2024

Sorry about the lack of logs, they were out of the terminal and I found all the other vdpau files in the snap.

Driver version: nvidia-driver-440 | 440.48.02-0ubuntu0~~19.10.1

vdpauinfo works but moonlight.vdpauinfo doesn't.

$ snap version
snap    2.42.5
snapd   2.42.5
series  16
ubuntu  19.10
kernel  5.3.0-26-generic
$ moonlight
+ case "$SNAP_ARCH" in
+ ARCH=x86_64-linux-gnu
++ glxinfo
++ grep 'OpenGL vendor'
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
X Error:  GLXBadContext
  Request Major code 151 (GLX)
  Request Minor code 6 ()
  Error Serial #57
  Current Serial #56
+ VENDOR=
+ export VDPAU_DRIVER_PATH=/snap/moonlight/567/usr/lib/x86_64-linux-gnu/vdpau
+ VDPAU_DRIVER_PATH=/snap/moonlight/567/usr/lib/x86_64-linux-gnu/vdpau
+ export LIBVA_DRIVERS_PATH=/snap/moonlight/567/usr/lib/x86_64-linux-gnu/dri
+ LIBVA_DRIVERS_PATH=/snap/moonlight/567/usr/lib/x86_64-linux-gnu/dri
+ [[ '' == *\N\V\I\D\I\A* ]]
+ [[ '' == *\X\.\O\r\g* ]]
+ exec /snap/moonlight/567/usr/bin/moonlight
00:00:00 - SDL Info (0): Compiled with SDL 2.0.8
00:00:00 - SDL Info (0): Running with SDL 2.0.8
00:00:00 - Qt Warning: Qt: Session management error: Authentication Rejected, reason : None of the authentication protocols specified are supported and host-based authentication failed
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
00:00:00 - Qt Warning: QGLXContext: Failed to create dummy context
00:00:00 - Qt Info: Found "gamecontrollerdb.txt" at ":/data/gamecontrollerdb.txt"
00:00:00 - SDL Info (0): Loaded 201 new gamepad mappings
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
00:00:01 - SDL Info (0): V-sync enabled
libva info: VA-API version 1.1.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /snap/moonlight/567/usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.so
libva info: Found init function __vaDriverInit_1_0
Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory
libva error: /snap/moonlight/567/usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.so init failed
libva info: va_openDriver() returns -1
00:00:01 - SDL Error (0): Failed to initialize VAAPI: -1
Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory
00:00:01 - FFmpeg: [AVHWDeviceContext @ 0x55c4e97ee180] VDPAU device creation on X11 display :0.0 failed.
00:00:01 - SDL Error (0): Failed to create VDPAU context: -1313558101
00:00:01 - FFmpeg: [AVHWDeviceContext @ 0x55c4e97fef00] Cannot load libcuda.so.1
00:00:01 - FFmpeg: [AVHWDeviceContext @ 0x55c4e97fef00] Could not dynamically load CUDA
00:00:01 - SDL Error (0): av_hwdevice_ctx_create(CUDA) failed: -1313558101
00:00:01 - Qt Info: Found "ModeSeven.ttf" at ":/data/ModeSeven.ttf"
00:00:01 - SDL Error (0): SDL_CreateRenderer() failed: Couldn't find matching render driver
00:00:01 - SDL Error (0): Unable to load FFmpeg decoder
00:00:01 - Qt Info: Found "gamecontrollerdb.txt" at ":/data/gamecontrollerdb.txt"
00:00:01 - SDL Info (0): Loaded 201 new gamepad mappings
00:00:01 - Qt Warning: propsReply "An AppArmor policy prevents this sender from sending this message to this recipient; type=\"method_call\", sender=\":1.1100\" (uid=1000 pid=9837 comm=\"/snap/moonlight/567/usr/bin/moonlight \" label=\"snap.moonlight.moonlight (enforce)\") interface=\"org.freedesktop.DBus.Properties\" member=\"GetAll\" error name=\"(unset)\" requested_reply=\"0\" destination=\"org.freedesktop.NetworkManager\" (uid=0 pid=1711 comm=\"/usr/sbin/NetworkManager --no-daemon \" label=\"unconfined\")"
00:00:01 - Qt Warning: nmReply "An AppArmor policy prevents this sender from sending this message to this recipient; type=\"method_call\", sender=\":1.1100\" (uid=1000 pid=9837 comm=\"/snap/moonlight/567/usr/bin/moonlight \" label=\"snap.moonlight.moonlight (enforce)\") interface=\"org.freedesktop.NetworkManager\" member=\"GetDevices\" error name=\"(unset)\" requested_reply=\"0\" destination=\"org.freedesktop.NetworkManager\" (uid=0 pid=1711 comm=\"/usr/sbin/NetworkManager --no-daemon \" label=\"unconfined\")"
00:00:01 - Qt Warning: "Object path cannot be empty"
00:00:01 - Qt Debug: Current Moonlight version: "1.2.1"
00:00:01 - Qt Fatal: Failed to create OpenGL context for format QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::SwapBehavior(DoubleBuffer), swapInterval 1, profile  QSurfaceFormat::OpenGLContextProfile(NoProfile))
$ snap info moonlight
tracking:     edge
refresh-date: today at 17:31 CET
channels:
  stable:    1.2.1             2020-01-21 (563) 76MB -
  candidate: 1.2.1             2020-01-21 (563) 76MB -
  beta:      ↑                                       
  edge:      1.2.1-18-g58313ad 2020-01-22 (567) 76MB -
installed:   1.2.1-18-g58313ad            (567) 76MB -
$ moonlight.vdpauinfo 
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (failed to map segment from shared object): ignored.
+ case "$SNAP_ARCH" in
+ ARCH=x86_64-linux-gnu
++ glxinfo
++ grep 'OpenGL vendor'
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
X Error:  GLXBadContext
  Request Major code 151 (GLX)
  Request Minor code 6 ()
  Error Serial #57
  Current Serial #56
+ VENDOR=
+ export VDPAU_DRIVER_PATH=/snap/moonlight/567/usr/lib/x86_64-linux-gnu/vdpau
+ VDPAU_DRIVER_PATH=/snap/moonlight/567/usr/lib/x86_64-linux-gnu/vdpau
+ export LIBVA_DRIVERS_PATH=/snap/moonlight/567/usr/lib/x86_64-linux-gnu/dri
+ LIBVA_DRIVERS_PATH=/snap/moonlight/567/usr/lib/x86_64-linux-gnu/dri
+ [[ '' == *\N\V\I\D\I\A* ]]
+ [[ '' == *\X\.\O\r\g* ]]
+ exec /snap/moonlight/567/usr/bin/vdpauinfo
display: :0.0   screen: 0
Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory
Error creating VDPAU device: 1
$ snap run --shell moonlight -c "ls -l /var/lib/snapd/lib/gl/vdpau"
ls: cannot access '/var/lib/snapd/lib/gl/vdpau': No such file or directory
$ locate libvdpau_nvidia.so
/usr/lib/i386-linux-gnu/vdpau/libvdpau_nvidia.so
/usr/lib/i386-linux-gnu/vdpau/libvdpau_nvidia.so.1
/usr/lib/i386-linux-gnu/vdpau/libvdpau_nvidia.so.440.48.02
/usr/lib/x86_64-linux-gnu/vdpau/libvdpau_nvidia.so
/usr/lib/x86_64-linux-gnu/vdpau/libvdpau_nvidia.so.1
/usr/lib/x86_64-linux-gnu/vdpau/libvdpau_nvidia.so.440.48.02

from moonlight-snap.

maxiberta avatar maxiberta commented on May 31, 2024

Manually disconnecting the opengl snap interface produces an almost identical error. It should be auto-connected, but please check just in case:

$ snap connections moonlight
Interface           Plug                          Slot                 Notes
opengl              moonlight:opengl              :opengl              -

Also worth checking logs for apparmor denials:

$ dmesg

$ journalctl -k

That said, now that you mention it, I had a quite similar issue recently on Ubuntu 19.10. Fixed by downgrading to nvidia-driver-435 and back to 440 (via software-properties-gtk, aka. "Software & Updates"). Didn't dig too much into the issue, thought it was a broken graphics driver upgrade; but it might be a bug in snapd?

from moonlight-snap.

JohnDoee avatar JohnDoee commented on May 31, 2024
$ snap connections moonlight
Interface               Plug                              Slot                     Notes
desktop                 moonlight:desktop                 :desktop                 -
desktop-legacy          moonlight:desktop-legacy          :desktop-legacy          -
home                    moonlight:home                    :home                    -
joystick                moonlight:joystick                :joystick                -
network                 moonlight:network                 :network                 -
opengl                  moonlight:opengl                  :opengl                  -
pulseaudio              moonlight:pulseaudio              :pulseaudio              -
screen-inhibit-control  moonlight:screen-inhibit-control  :screen-inhibit-control  -
unity7                  moonlight:unity7                  :unity7                  -
wayland                 moonlight:wayland                 :wayland                 -
x11                     moonlight:x11                     :x11                     -

This IS the second time I have this problem too, can't remember how I solved it last time though, probably nothing too complicated. I already tried to do a 440 -> 435 (tried moonlight) -> 440 (tried moonlight) path with no success.

dmesg and journalctl -k both show basically the same, nothing interesting.

[76457.279110] audit: type=1400 audit(1579989185.624:9212): apparmor="DENIED" operation="file_mmap" profile="/snap/core/8268/usr/lib/snapd/snap-confine" name="/usr/lib/x86_64-linux-gnu/libgtk3-nocsd.so.0" pid=18746 comm="snap-confine" requested_mask="m" denied_mask="m" fsuid=0 ouid=0
[76457.728137] audit: type=1107 audit(1579989186.072:9213): pid=1694 uid=106 auid=4294967295 ses=4294967295 msg='apparmor="DENIED" operation="dbus_method_call"  bus="system" path="/org/freedesktop/NetworkManager" interface="org.freedesktop.DBus.Properties" member="GetAll" mask="send" name="org.freedesktop.NetworkManager" pid=18746 label="snap.moonlight.moonlight" peer_pid=1711 peer_label="unconfined"
                exe="/usr/bin/dbus-daemon" sauid=106 hostname=? addr=? terminal=?'
[76457.728429] audit: type=1107 audit(1579989186.072:9214): pid=1694 uid=106 auid=4294967295 ses=4294967295 msg='apparmor="DENIED" operation="dbus_method_call"  bus="system" path="/org/freedesktop/NetworkManager" interface="org.freedesktop.NetworkManager" member="GetDevices" mask="send" name="org.freedesktop.NetworkManager" pid=18746 label="snap.moonlight.moonlight" peer_pid=1711 peer_label="unconfined"
                exe="/usr/bin/dbus-daemon" sauid=106 hostname=? addr=? terminal=?'
[76457.729093] audit: type=1107 audit(1579989186.072:9215): pid=1694 uid=106 auid=4294967295 ses=4294967295 msg='apparmor="DENIED" operation="dbus_method_call"  bus="system" path="/org/freedesktop/NetworkManager/Settings" interface="org.freedesktop.NetworkManager.Settings" member="ListConnections" mask="send" name="org.freedesktop.NetworkManager" pid=18746 label="snap.moonlight.moonlight" peer_pid=1711 peer_label="unconfined"
                exe="/usr/bin/dbus-daemon" sauid=106 hostname=? addr=? terminal=?'
[76457.729820] audit: type=1107 audit(1579989186.076:9216): pid=1694 uid=106 auid=4294967295 ses=4294967295 msg='apparmor="DENIED" operation="dbus_method_call"  bus="system" path="/org/freedesktop/NetworkManager/Settings" interface="org.freedesktop.NetworkManager.Settings" member="ListConnections" mask="send" name="org.freedesktop.NetworkManager" pid=18746 label="snap.moonlight.moonlight" peer_pid=1711 peer_label="unconfined"
                exe="/usr/bin/dbus-daemon" sauid=106 hostname=? addr=? terminal=?'
[76457.730032] audit: type=1107 audit(1579989186.076:9217): pid=1694 uid=106 auid=4294967295 ses=4294967295 msg='apparmor="DENIED" operation="dbus_method_call"  bus="system" path="/org/freedesktop/NetworkManager/Settings" interface="org.freedesktop.NetworkManager.Settings" member="ListConnections" mask="send" name="org.freedesktop.NetworkManager" pid=18746 label="snap.moonlight.moonlight" peer_pid=1711 peer_label="unconfined"
                exe="/usr/bin/dbus-daemon" sauid=106 hostname=? addr=? terminal=?'

If you think it might be snap, I'll try to downgrade it and report results.

from moonlight-snap.

maxiberta avatar maxiberta commented on May 31, 2024

Thanks for debugging! I'm afraid I'm running out of ideas, but it looks like it might be an issue outside this particular snap. Have you tried any other snap with 3D acceleration? Any game or even a browser such as chromium or firefox (with layers acceleration flag enabled, I think?) should work.

Then, I'd strongly recommend to ask on https://forum.snapcraft.io/. Of course, I'll be happy to help in any way.

from moonlight-snap.

maxiberta avatar maxiberta commented on May 31, 2024

This might be related?
https://forum.snapcraft.io/t/nvidia-beta-drivers-completely-break-snaps/

from moonlight-snap.

JohnDoee avatar JohnDoee commented on May 31, 2024

Yes, that's exactly related. I must've screwed up when I tested a 435 downgrade because it worked this time.

Thanks!

from moonlight-snap.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.