VLC 无法在装有 NVidia 卡的 Ubuntu 20.04.3 LTS 上运行

VLC 无法在装有 NVidia 卡的 Ubuntu 20.04.3 LTS 上运行

VLC 无法在 Ubuntu 20.04.3 LTS 上运行。
它会随机冻结图像,但音频会继续播放。
或者它会随机崩溃。
或者它会随机冻结整个 PC。

我首先尝试了 VLC 的 snap 版本。
然后我切换到sudo apt install vlc以便从终端启动它并记录一些错误:

$ vlc 4.mp4 

VLC media player 3.0.9.2 Vetinari (revision 3.0.9.2-0-gd4c1aefe4d)
[000055fc808f5670] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
libva info: VA-API version 1.7.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.so
libva info: va_openDriver() returns -1
[00007fbf04003460] glconv_vaapi_x11 gl error: vaInitialize: unknown libva error
libva info: VA-API version 1.7.0
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
[00007fbf04003460] glconv_vaapi_drm gl error: vaInitialize: unknown libva error
libva info: VA-API version 1.7.0
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
[00007fbf04003460] glconv_vaapi_drm gl error: vaInitialize: unknown libva error
[00007fbf277175a0] avcodec decoder: Using NVIDIA VDPAU Driver Shared Library  470.86  Tue Oct 26 21:45:30 UTC 2021 for hardware decoding
[00007fbf277175a0] main decoder error: Timestamp conversion failed for 185033334: no reference clock
[00007fbf277175a0] main decoder error: Could not convert timestamp 0 for FFmpeg
[00007fbf277175a0] main decoder error: Timestamp conversion failed for 787500001: no reference clock
[00007fbf277175a0] main decoder error: Could not convert timestamp 0 for FFmpeg
[00007fbf1cccee20] main decoder error: Timestamp conversion failed (delay 666000, buffering 66600, bound 3000000)
[00007fbf1cccee20] main decoder error: Could not convert timestamp 7629279603 for faad
[00007fbf1cccee20] main decoder error: Timestamp conversion failed (delay 666000, buffering 66600, bound 3000000)
[00007fbf1cccee20] main decoder error: Could not convert timestamp 7629051597 for faad

我有一台 GTX 1080 和一台 Intel i7 7700k。
Additional Drivers选择了:Using NVIDIA driver metapackage from nvidia-driver-470(proprietary,tested)

$ sudo lshw -c video
[sudo] password for george: 
  *-display                 
       description: VGA compatible controller
       product: GP104 [GeForce GTX 1080]
       vendor: NVIDIA Corporation
       physical id: 0
       bus info: pci@0000:01:00.0
       version: a1
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
       configuration: driver=nvidia latency=0
       resources: irq:149 memory:de000000-deffffff memory:c0000000-cfffffff memory:d0000000-d1ffffff ioport:e000(size=128) memory:c0000-dffff

无论出于什么原因,Ubuntu 都看不到英特尔驱动程序,即使我已经安装了它们:

$ sudo apt-get install xserver-xorg-video-intel

Reading package lists... Done
Building dependency tree       
Reading state information... Done
xserver-xorg-video-intel is already the newest version (2:2.99.917+git20200226-1).
The following packages were automatically installed and are no longer required:
  gyp javascript-common libc-ares2 libjs-inherits libjs-is-typedarray libjs-psl libjs-typedarray-to-buffer libnode-dev libnode64
  libpython2-stdlib libpython2.7-minimal libpython2.7-stdlib libssl-dev libuv1-dev nodejs-doc python-pkg-resources python2
  python2-minimal python2.7 python2.7-minimal
Use 'sudo apt autoremove' to remove them.

0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.

我也删除了~/.config/vlc/很多次以重置 VLC,但无济于事。

我认为 VLC 在 Ubuntu 20 上坏了。
这降低了工作效率,因为我本可以花上几个小时观看教程,但却花了几个小时却找不到 VLC 的问题所在。

我需要一款能够显示字幕、改变播放速度、来回跳过、保存视频播放列表且播放 2 分钟后不会崩溃的媒体播放器。
我试过 Totem,但它缺乏这些功能。

编辑:

这台机器的历史是什么?这里第一次安装的是哪个版本的 Ubuntu?

我格式化了所有可用的驱动器,在一个驱动器上安装了 Ubuntu 20.04.3 LTS,在另一个驱动器上安装了 Windows 10 Pro x64。
这是我第一次安装和使用 Ubuntu。

$ head -n1 /etc/apt/sources.list

# deb cdrom:[Ubuntu 20.04.3 LTS _Focal Fossa_ - Release amd64 (20210819)]/ focal main restricted

$ apt-cache policy vdpau-driver-all mesa-vdpau-drivers libvdpau-va-gl1

vdpau-driver-all:
  Installed: 1.3-1ubuntu2
  Candidate: 1.3-1ubuntu2
  Version table:
 *** 1.3-1ubuntu2 500
        500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
        100 /var/lib/dpkg/status
mesa-vdpau-drivers:
  Installed: 21.0.3-0ubuntu0.3~20.04.4
  Candidate: 21.0.3-0ubuntu0.3~20.04.4
  Version table:
 *** 21.0.3-0ubuntu0.3~20.04.4 500
        500 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     20.0.4-2ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
libvdpau-va-gl1:
  Installed: (none)
  Candidate: 0.4.2-1build2
  Version table:
     0.4.2-1build2 500
        500 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages

$ dpkg -S dri/nvidia_drv_video.so

dpkg-query: no path found matching pattern *dri/nvidia_drv_video.so*

$ vainfo

libva info: VA-API version 1.7.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.so
libva info: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit

答案1

已使用相当老旧的 Nvidia GT425M 和 Ubuntu MATE 22.04 LTS(开发版)进行确认。需要注意的是,我在实际硬件上没有 Ubuntu 20.04 LTS,因此测试了最新版本。

你刚刚发现了众所周知的错误 1890815。请将自己标记为受到影响。

可以通过手动下载并安装相关软件包来修复,其中包含nvidia_drv_video.so使用以下命令:

cd ~/Downloads
wget -c http://archive.ubuntu.com/ubuntu/pool/universe/v/vdpau-video/vdpau-va-driver_0.7.4-6ubuntu1_amd64.deb
sudo apt-get install ./vdpau-va-driver_0.7.4-6ubuntu1_amd64.deb

然后重新启动。

相关内容