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

After updating GamerOS/nvidia drivers, kodi fails to launch #118

Open
alkazar opened this issue Nov 22, 2020 · 2 comments
Open

After updating GamerOS/nvidia drivers, kodi fails to launch #118

alkazar opened this issue Nov 22, 2020 · 2 comments

Comments

@alkazar
Copy link
Member

alkazar commented Nov 22, 2020

Kodi (and likely other flatpaks) depends on the org.freedesktop.Platform.GL.nvidia flatpak runtime.

If you install Kodi while using nvidia 450-57, for example, the org.freedesktop.Platform.GL.nvidia-450-57 runtime will be installed and Kodi will function correctly.

If you then update your nvidia drivers, to say 455-38 and run flatpak kodi:

flatpak run tv.kodi.Kodi
libEGL warning: DRI2: failed to authenticate
libva info: VA-API version 1.5.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.so
libva info: Found init function __vaDriverInit_1_5
Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory
libva error: /usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.so init failed
libva info: va_openDriver() returns -1
/app/bin/kodi: line 220:    10 Segmentation fault      (core dumped) ${KODI_BINARY} $SAVED_ARGS

Kodi fails. Installing org.freedesktop.Platform.GL.nvidia-455-38 with flatpak will fix the issue.

The simplest work-around is:

  1. Open Steam Buddy
  2. Uninstall Kodi
  3. Install Kodi

This will pick up the latest runtime.

Another work-around is to run:
flatpak update
or
flatpak update tv.kodi.Kodi

@alkazar
Copy link
Member Author

alkazar commented Nov 22, 2020

A fix could use our post update hook script and might look like:

  1. if nvidia runtime is installed and doesn't match the GPU driver currently installed (or the one we are about to restart into for an update)
  2. try to install the runtime corresponding to the current/new GPU driver

This logic would have to run post-update but also any time you try run a flatpak app because the user could restart early or launch a flatpak before the update is complete. Doing the check/update before the app launches will be a poor experience if there is no or poor network though. Might take a while to timeout.

@rshamsnejad
Copy link
Contributor

I had this issue again with GamerOS 22 since the NVIDIA drivers have been updated again and thought of a possible solution :

Instead of launching Kodi directly, wrap the launch command in a script that will :

  1. Check if the currently installed driver matches the currently installed flatpak runtime
  2. If they match, launch Kodi
  3. If they don't, display a warning (much like it's done for Steam Buddy's password) saying an update is necessary, while running flatpak update tv.kodi.Kodi in the background, then launch Kodi

If the update takes too, it could be aborted by providing the user with steps on the warning screen : for example, invite him to open the Steam overaly and kill the app that way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants