VLC not playing any video files

Hi everyone,

I am not entirely sure how to even begin debugging this problem, but I wanted to try out running FreeBSD as my main OS and have been having some problems getting VLC to run. I am running 14.2-RELEASE-p1 with XFCE4 on X11 on an old Lenovo ThinkCentre P300 with an Intel Xeon E3-1276 v3 and its integrated graphics. I installed graphics/drm-kmod and added kld_list="i915kms" to my /etc/rc.conf file. Running pciconf -lv|grep -B4 VGA gives me the following information:

Code:
vgapci0@pci0:0:2:0:    class=0x030000 rev=0x06 hdr=0x00 vendor=0x8086 device=0x041a subvendor=0x17aa subdevice=0x30a1
    vendor     = 'Intel Corporation'
    device     = 'Xeon E3-1200 v3 Processor Integrated Graphics Controller'
    class      = display
    subclass   = VGA

Watching YouTube videos or other videos in general through Firefox works without any problems. However, whenever I try to watch an .mp4 (or other video) file directly through VLC, it doesn't want to work. Immediately after opening VLC, I get the following errors:

Code:
VLC media player 3.0.21 Vetinari (revision 3.0.21-0-gdd8bfdbabe8)
[0000000800c58060] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
failed to authenticate magic 1
failed to load driver: crocus
failed to authenticate magic 1
failed to load driver: crocus
[0000000800d26860] main playlist: playlist is empty

When I then actually try playing a file, the following happens:

Code:
libEGL warning: DRI3: Screen seems not DRI3 capable
libEGL warning: DRI2: failed to authenticate
libEGL warning: DRI3: Screen seems not DRI3 capable
MESA: error: ZINK: failed to choose pdev
libEGL warning: egl: failed to create dri2 screen
'-avx512er' is not a recognized feature for this target (ignoring feature)
'-avx512pf' is not a recognized feature for this target (ignoring feature)
'-avx512er' is not a recognized feature for this target (ignoring feature)
'-avx512pf' is not a recognized feature for this target (ignoring feature)
'-avx512er' is not a recognized feature for this target (ignoring feature)
'-avx512pf' is not a recognized feature for this target (ignoring feature)
'-avx512er' is not a recognized feature for this target (ignoring feature)
'-avx512pf' is not a recognized feature for this target (ignoring feature)
[0000000822c8d560] chain filter error: Too high level of recursion (3)
[0000000822c8d1e0] main filter error: Failed to create video converter
[0000000822c8d560] chain filter error: Too high level of recursion (3)
[0000000822c8d1e0] main filter error: Failed to create video converter
[0000000822c8d560] chain filter error: Too high level of recursion (3)
[0000000822c8d1e0] main filter error: Failed to create video converter
[0000000822c8d560] chain filter error: Too high level of recursion (3)
[0000000822c8d1e0] main filter error: Failed to create video converter
[0000000822c8d560] chain filter error: Too high level of recursion (3)
[0000000822c8d1e0] main filter error: Failed to create video converter
[0000000822c8d560] chain filter error: Too high level of recursion (3)
[0000000822c8d1e0] main filter error: Failed to create video converter
[0000000822c8d560] chain filter error: Too high level of recursion (3)
[0000000822c8d1e0] main filter error: Failed to create video converter
[0000000822c8ce60] main filter error: Failed to create video converter
[0000000822c8d560] chain filter error: Too high level of recursion (3)
[0000000822c8d1e0] main filter error: Failed to create video converter
[0000000822c8d560] chain filter error: Too high level of recursion (3)
[0000000822c8d1e0] main filter error: Failed to create video converter
[0000000822c8d560] chain filter error: Too high level of recursion (3)
[0000000822c8d1e0] main filter error: Failed to create video converter
[0000000822c8d560] chain filter error: Too high level of recursion (3)
[0000000822c8d1e0] main filter error: Failed to create video converter
[0000000822c8d560] chain filter error: Too high level of recursion (3)
[0000000822c8d1e0] main filter error: Failed to create video converter
[0000000822c8d560] chain filter error: Too high level of recursion (3)
[0000000822c8d1e0] main filter error: Failed to create video converter
[0000000822c8d560] chain filter error: Too high level of recursion (3)
[0000000822c8d1e0] main filter error: Failed to create video converter
[0000000822c8ce60] main filter error: Failed to create video converter
[0000000822c8d560] chain filter error: Too high level of recursion (3)
[0000000822c8d1e0] main filter error: Failed to create video converter
[0000000822c8d560] chain filter error: Too high level of recursion (3)
[0000000822c8d1e0] main filter error: Failed to create video converter
[0000000822c8d560] chain filter error: Too high level of recursion (3)
[0000000822c8d1e0] main filter error: Failed to create video converter
[0000000822c8d560] chain filter error: Too high level of recursion (3)
[0000000822c8d1e0] main filter error: Failed to create video converter
[0000000822c8d560] chain filter error: Too high level of recursion (3)
[0000000822c8d1e0] main filter error: Failed to create video converter
[0000000822c8d560] chain filter error: Too high level of recursion (3)
[0000000822c8d1e0] main filter error: Failed to create video converter
[0000000822c8d560] chain filter error: Too high level of recursion (3)
[0000000822c8d1e0] main filter error: Failed to create video converter
[0000000822c8ce60] main filter error: Failed to create video converter
[0000000822c8d560] chain filter error: Too high level of recursion (3)
[0000000822c8d1e0] main filter error: Failed to create video converter
[0000000822c8d560] chain filter error: Too high level of recursion (3)
[0000000822c8d1e0] main filter error: Failed to create video converter
[0000000822c8d560] chain filter error: Too high level of recursion (3)
[0000000822c8d1e0] main filter error: Failed to create video converter
[0000000822c8d560] chain filter error: Too high level of recursion (3)
[0000000822c8d1e0] main filter error: Failed to create video converter
[0000000822c8d560] chain filter error: Too high level of recursion (3)
[0000000822c8d1e0] main filter error: Failed to create video converter
[0000000822c8d560] chain filter error: Too high level of recursion (3)
[0000000822c8d1e0] main filter error: Failed to create video converter
[0000000822c8d560] chain filter error: Too high level of recursion (3)
[0000000822c8d1e0] main filter error: Failed to create video converter
[0000000822c8ce60] main filter error: Failed to create video converter
[0000000822c8d560] chain filter error: Too high level of recursion (3)
[0000000822c8d1e0] main filter error: Failed to create video converter
[0000000822c8d560] chain filter error: Too high level of recursion (3)
[0000000822c8d1e0] main filter error: Failed to create video converter
[0000000822c8d560] chain filter error: Too high level of recursion (3)
[0000000822c8d1e0] main filter error: Failed to create video converter
[0000000822c8d560] chain filter error: Too high level of recursion (3)
[0000000822c8d1e0] main filter error: Failed to create video converter
[0000000822c8d560] chain filter error: Too high level of recursion (3)
[0000000822c8d1e0] main filter error: Failed to create video converter
[0000000822c8d560] chain filter error: Too high level of recursion (3)
[0000000822c8d1e0] main filter error: Failed to create video converter
[0000000822c8d560] chain filter error: Too high level of recursion (3)
[0000000822c8d1e0] main filter error: Failed to create video converter
[0000000822c8ce60] main filter error: Failed to create video converter
[0000000822c8d560] chain filter error: Too high level of recursion (3)
[0000000822c8d1e0] main filter error: Failed to create video converter
[0000000822c8d560] chain filter error: Too high level of recursion (3)
[0000000822c8d1e0] main filter error: Failed to create video converter
[0000000822c8d560] chain filter error: Too high level of recursion (3)
[0000000822c8d1e0] main filter error: Failed to create video converter
[0000000822c8d560] chain filter error: Too high level of recursion (3)
[0000000822c8d1e0] main filter error: Failed to create video converter
[0000000822c8d560] chain filter error: Too high level of recursion (3)
[0000000822c8d1e0] main filter error: Failed to create video converter
[0000000822c8d560] chain filter error: Too high level of recursion (3)
[0000000822c8d1e0] main filter error: Failed to create video converter
[0000000822c8d560] chain filter error: Too high level of recursion (3)
[0000000822c8d1e0] main filter error: Failed to create video converter
[0000000822c8ce60] main filter error: Failed to create video converter
[0000000822c8d560] chain filter error: Too high level of recursion (3)
[0000000822c8d1e0] main filter error: Failed to create video converter
[0000000822c8d560] chain filter error: Too high level of recursion (3)
[0000000822c8d1e0] main filter error: Failed to create video converter
[0000000822c8d560] chain filter error: Too high level of recursion (3)
[0000000822c8d1e0] main filter error: Failed to create video converter
[0000000822c8d560] chain filter error: Too high level of recursion (3)
[0000000822c8d1e0] main filter error: Failed to create video converter
[0000000822c8d560] chain filter error: Too high level of recursion (3)
[0000000822c8d1e0] main filter error: Failed to create video converter
[0000000822c8d560] chain filter error: Too high level of recursion (3)
[0000000822c8d1e0] main filter error: Failed to create video converter
[0000000822c8d560] chain filter error: Too high level of recursion (3)
[0000000822c8d1e0] main filter error: Failed to create video converter
[0000000822c8ce60] main filter error: Failed to create video converter
[0000000822c01560] main vout display error: Failed to create video converter
[0000000822c01560] main vout display error: Failed to adapt decoder format to display
[000000081cc0d060] main video output error: video output creation failed
[000000081e06f760] main decoder error: failed to create video output
[0000000822c53060] main filter error: Failed to create video converter
failed to authenticate magic 1
failed to load driver: crocus
failed to authenticate magic 1
failed to load driver: crocus
'-avx512er' is not a recognized feature for this target (ignoring feature)
'-avx512pf' is not a recognized feature for this target (ignoring feature)
'-avx512er' is not a recognized feature for this target (ignoring feature)
'-avx512pf' is not a recognized feature for this target (ignoring feature)
'-avx512er' is not a recognized feature for this target (ignoring feature)
'-avx512pf' is not a recognized feature for this target (ignoring feature)
'-avx512er' is not a recognized feature for this target (ignoring feature)
'-avx512pf' is not a recognized feature for this target (ignoring feature)
'-avx512er' is not a recognized feature for this target (ignoring feature)
'-avx512pf' is not a recognized feature for this target (ignoring feature)
'-avx512er' is not a recognized feature for this target (ignoring feature)
'-avx512pf' is not a recognized feature for this target (ignoring feature)
libva info: VA-API version 1.22.0
libva error: vaGetDriverNames() failed with unknown libva error
'-avx512er' is not a recognized feature for this target (ignoring feature)
'-avx512pf' is not a recognized feature for this target (ignoring feature)
[0000000822c53060] main filter error: Failed to create video converter
[000000081e06f760] avcodec decoder: Using OpenGL/VAAPI backend for VDPAU for hardware decoding
[h264 @ 0x81e048400] Failed setup for format vdpau: hwaccel initialisation returned error.
[000000081e06f760] avcodec decoder error: existing hardware acceleration cannot be reused
The X11 connection broke: No error (code 0)
The X11 connection broke: No error (code 0)
XIO:  fatal IO error 35 (Resource temporarily unavailable) on X server ":0.0"
      after 20 requests (20 known processed) with 0 events remaining.
XIO:  fatal IO error 35 (Resource temporarily unavailable) on X server ":0.0"
      after 4 requests (4 known processed) with 0 events remaining.

I have found someone else with a similar problem where the solution was apparently to install multimedia/libvdpau-va-gl, but that did not help in my case. Now I am a bit stuck, as I don't really know how to even further diagnose this problem. I believe this might be somehow related to a driver problem? I have also tried running xdriinfo, the output of which seems to indicate that it's using software rendering? Unless I am misinterpreting the output:

Code:
failed to authenticate magic 1
failed to load driver: crocus
failed to authenticate magic 1
failed to load driver: crocus
Screen 0: swrast

Perhaps some of you can help with this, I would very much appreciate it!

Regards
Hex
 
Okay, update. Very strangely enough, it works when I reboot but if I then suspend the PC (which I do quite a lot), it stops working again until the next reboot. Before the suspend, the correct video driver is used and running xdriinfo yields:

Code:
Screen 0: crocus

After resuming from suspend, the output is the same as above above.
 
I think you may have fallen foul of the bug described in this thread, something similar hit me a couple of days ago doing a new install of 14.2 on a thinkpad. There are some known bugs in this area.


You can try force installing the previous level of the video driver by running

# pkg install -f drm-515-kmod

There is another known bug where switching to a different VT breaks video acceleration when you switch back to the VT running the X11 session. There is a clue in the output from vlc on your system, 'crocus' (that is says it is unable to load) is the accelerated intel driver for the modesetting X-server. When you suspend the system, it normally momentarily switches to a different VT.

Adding

kern.vt.suspendswitch=0

to your /etc/sysctl.con will prevent the switch to a different VT on suspend. You may even find that that change alone is sufficient and you do not need the previous release video drm kmod.

Having said that, vlc isn't very happy on my box either. It DOES play videos... but it spews out large numbers of other error messages while doing so. In contrast, mpv works well here. Perhaps it's worth giving mpv a try for the time being. I have decided not to bother using vlc for the time being.
 
Thank you very much for your help with this, it does indeed appear to be that bug and in my case, adding the kern.vt.suspendswitch=0 to the config seems to have helped; I did not need to force install the previous driver as you suggested.

Nevertheless, as you already alluded to, VLC still isn't particularly happy and some videos have very strange artifacting for some reason (a black bar at the bottom, mostly). mpv also didn't work before, but that works now as well and can play everything properly, so I guess I'll just be sticking to that for the time being.

Interestingly, VS Code was another program that I wanted to use that gave me trouble because there was no text anywhere at times; this seems to have been caused by this bug as well because it worked after a reboot but *not* after suspend and adding the line to the config makes it so that VS Code always works, even after suspend.
 
I have done a bit more investigation on this. Running
$ glxinfo -B | grep -i accel
will report whether video acceleration is currently working or not.

On my system any manual VT switch still breaks video accel in 14.2 RELEASE. The sysctl mentioned previously prevents VT switch on suspend, but any keyboard initiated VT switch will still result in broken video accel after switching back to X11 session. This is in fact a known bug, there are open bugzilla records for it. Once acceleration is broken, the only way to restore it I that I have found is to restart the X-server, ie log out to the display manager and then back in.

A crappy workaround to prevent myself from inadvertently doing a keyboard VT switch is to block the X-server from processing the VT switch key command sequence; this can be achieved by running

$ setxkbmap -option srvrkeys:none

- of course you can run this at window manager startup time if you like.

And to re-enable the ability to perform manual VT switch, set the value to the empty string, viz

$ setxkbmap -option ''

You can query the current setting with

$ setxkbmap -query

Not using VT's is an annoying limitation, but so is having broken video acceleration in X11 after returning to the gui.
 
Back
Top