Score:0

Mpv vaapi not working after updating to ubuntu 22.10

mz flag

I had vaapi working before on Ubuntu 22.04 (checked with intel_gpu_top) but after updating to 22.10, suddenly it stopped working.

Pressing the hotkey CTRL + H to activate hardware decoding, it freezes and then goes green or glitchy (audio is fine).

Here's information from vainfo and mpv log

libva info: VA-API version 1.15.0
libva info: User environment variable requested driver 'i965'
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_10
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.15 (libva 2.12.0)
vainfo: Driver version: Intel i965 driver for Intel(R) Ironlake Mobile - 2.4.1
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointVLD
      VAProfileNone                   : VAEntrypointVideoProc
 (+) Video --vid=1 (*) (h264 1920x1080 30.000fps)
 (+) Audio --aid=1 --alang=eng (*) (opus 2ch 48000Hz)
File tags:
 Uploader: Unreal Sensei
 Channel_URL: https://www.youtube.com/channel/UCue7TFlrt9FxXarpsl872Dg
[vo/gpu/wayland] GNOME's wayland compositor lacks support for the idle inhibit protocol. This means the screen can blank during playback.
AO: [pulse] 48000Hz stereo 2ch float
VO: [gpu] 1920x1080 yuv420p
Cannot load libcuda.so.1(3%) A-V:  0.000 Dropped: 6 Cache: 8.6s/5MB
AV: 00:00:20 / 00:09:53 (3%) A-V:  0.000 Cache: 9.2s/5MB
VO: [gpu] 1920x1080 vaapi[nv12]
AV: 00:00:20 / 00:09:53 (3%) A-V:  0.001 Cache: 16s/10MB
Audio device underrun detected.
AV: 00:00:20 / 00:09:53 (3%) A-V:  0.172 Cache: 17s/10MB
Audio device underrun detected.

Audio/Video desynchronisation detected! Possible reasons include too slow
hardware, temporary CPU spikes, broken drivers, and broken files. Audio
position will not match to the video (see A-V status field).

AV: 00:00:20 / 00:09:53 (4%) A-V:  1.256 Dropped: 13 Cache: 38s/19MB
Audio device underrun detected.
(Paused) AV: 00:01:09 / 00:09:53 (12%) A-V:  0.000 Dropped: 266 Cache: 72s/34MB

Exiting... (Quit)

System information: hardware

Archerbob avatar
sy flag
What version of MPV do you have installed? I think its up to 0.35.0 now, which if you read the release notes requires FFmpeg 4.0 or newer. There are mentions of vaapi in 35 that are not in the previous version it seems, hence I ask what version of mpv you have installed.
novodias avatar
mz flag
MPV is 0.34.1 and FFmpeg is 5.1.1
Archerbob avatar
sy flag
Wow for the hell of it I decided to try and install 0.35.0 myself and found I cannot because the installation methods employ files that have security issues, and whilst I could override and install anyway I'm not going to. I recommend at this point you find another player
Archerbob avatar
sy flag
Mauro Molinari in another thread got it working in VLC it seems - https://askubuntu.com/questions/1238278/how-to-enable-va-api-in-vlc-in-ubuntu-16-04 - though that thread is somewhat old, perhaps give that a try
novodias avatar
mz flag
Tried with VLC and the same issues happens, video goes green or glitchy. Here's the logs - https://pastebin.com/VuV1nBqe - noticed in intel_gpu_top, **Video** goes to 100%
Archerbob avatar
sy flag
You set the codec in tools -> preferences from automatic to VA-API video decoder via X11 or DRM?
novodias avatar
mz flag
I did, both didn't work
Archerbob avatar
sy flag
What file/filetype are you trying to play?
novodias avatar
mz flag
Mp4 files - tried with VLC and mpv, both doesn't work though vainfo shows H264 is supported
Score:0
mz flag

Found the issue, it was a kernel bug, rolled back to 5.15.0-53-generic and now VAAPI is working again.

It seems that is a issue in 5.19.0-23-generic.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.