12

My VLC player crashes every time I'm trying to open any video file. Removing/purging vlc, and reinstalling it does not change anything.

I recently upgraded my distro to 20.04 from 19.10. I never had this problem on any other operating system before. I also tried to reinstall the whole operating system from scratch (because I also had some other minor issues). Then VLC worked fine on a fresh installation, but at some point it started to crash again, and now again it always crashes.

Running vlc from terminal gives the following output when I try opening a file.

[00005586d4e98290] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
[00005586d4f6d1c0] main audio output error: too low audio sample frequency (0)
[00007fa264ccaa20] main decoder error: failed to create audio output
[00005586d4f6d1c0] vlcpulse audio output error: digital pass-through stream connection failure: Not supported
[00005586d4f6d1c0] main audio output error: module not functional
[00007fa264ccaa20] main decoder error: failed to create audio output
libva info: VA-API version 1.7.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_7
libva info: va_openDriver() returns 0
Segmentation fault (core dumped)

And this is the log about that shown in the gnome-logs:

vlc[602364]: segfault at 24 ip 00007fe5731011d4 sp 00007fe546ff6c50 error 6 in iris_dri.so[7fe5726d0000+d48000]
11
  • Looks like the problem is with the audio output module.Try using a different one in Tools->Preferences->Audio->Output module. Jun 28, 2020 at 16:57
  • 1
    There's a bug report about that here.Does exporting MESA_LOADER_DRIVER_OVERRIDE=i965 work for you? I mean try running VLC after that. Jun 28, 2020 at 21:29
  • 1
    Open the file /usr/share/applications/vlc.desktop(with root access of course), search for Exec.There should be something like this : Exec=/usr/bin/vlc --started-from-file %U.Add the aforementioned variable before it.It should now looks like this : Exec=MESA_LOADER_DRIVER_OVERRIDE=i965 /usr/bin/vlc --started-from-file %U.But if you want to open it in terminal for whatever reason , you have to also add that variable to your ~/.bashrc file. Jun 28, 2020 at 22:28
  • 1
    This doesn't work, it either doesn't launch or still launches incorrectly. But I can run it fine from terminal by adding the command to the ~/.bashrc file. For the time being this is fine by me, I guess I will wait until the aforementioned bug gets fixed. Thanks for the help.
    – Iras
    Jun 28, 2020 at 23:45
  • 1
    Oh my bad.You have to add env before the variable.Now it should look like this : Exec= env MESA_LOADER_DRIVER_OVERRIDE=i965 /usr/bin/vlc --started-from-file %U Jun 29, 2020 at 8:11

2 Answers 2

21

There's a bug report about that here.In fact VLC is not to blame.There's a bug in the intel driver iris_dri which is a linux Direct Rendering Infrastructure driver for the intel IRIS graphics cards.

Whenever a program tries to bypass the X server and renders directly using OpenGL on the underlying GPU , it has to use that driver indirectly.And a bug causes segmentation fault when someone issues OpenGL calls.

As suggested in the bug report , you have to use the intel driver i965 instead.In order to do that you have to define the environment variable

env MESA_LOADER_DRIVER_OVERRIDE=i965

So if you want to open VLC in the terminal , you have to add that line to your ~/.bashrc file or if you want to open it from the application menu or by clicking on a media file , you have to tamper the line beginning with Exec= in the .desktop file /usr/share/applications/vlc.desktop :

Exec=env MESA_LOADER_DRIVER_OVERRIDE=i965 /usr/bin/vlc --started-from-file %U

And if you want to set that globally for all of your applications , add this line to the file /etc/environment:

MESA_LOADER_DRIVER_OVERRIDE=i965
4
  • 1
    The same problem seems to be affecting many other applications as well, and the same solution works. But still this is really annoying. Is there a way to solve this problem globally?
    – Iras
    Jul 17, 2020 at 0:12
  • 1
    @Iras Thanks to this answer , I found that you can edit the file /etc/environment and add that env variable there until a fix arrives. Jul 17, 2020 at 5:46
  • Strange. I was under the impression that 20.04.01 would fix this. Sadly, it hasn't. I believe this bug is of relevance.
    – J. Mini
    Nov 4, 2020 at 14:13
  • @ParsaMousavi There are two .confg files in /etc/environment. In which of the file do I need to add MESA..... line? Jul 2, 2021 at 3:36
5

For those like me who had no luck with Parsa Mousavi's answer, there is still one possibility: delete the ~/.config/vlc/ folder, and retry to use VLC as usual. That worked for me, at least!

2
  • 1
    Worked on upgraded 20.10 to 21.04... Dec 8, 2021 at 21:32
  • Worked for me on Pop os 22.04
    – Life5ign
    Jan 18 at 7:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .