[GH-ISSUE #2124] mpv gpu output not working #1440

Closed
opened 2026-05-05 08:06:16 -06:00 by gitea-mirror · 3 comments
Owner

Originally created by @Artefact2 on GitHub (Sep 27, 2018).
Original GitHub issue: https://github.com/netblue30/firejail/issues/2124

I can't get MPV's gpu output to work correctly when it is being run with firejail. It works with --noprofile.

Silmeria ~ % mpv --version
mpv 0.29.0 Copyright © 2000-2018 mpv/MPlayer/mplayer2 projects
 built on Thu Sep 27 17:24:22 CEST 2018
ffmpeg library versions:
   libavutil       56.14.100
   libavcodec      58.18.100
   libavformat     58.12.100
   libswscale      5.1.100
   libavfilter     7.16.100
   libswresample   3.1.100
ffmpeg version: n4.0.2
Silmeria ~ % firejail --version
firejail version 0.9.54

Compile time support:
        - AppArmor support is disabled
        - AppImage support is enabled
        - bind support is enabled
        - chroot support is enabled
        - file and directory whitelisting support is enabled
        - file transfer support is enabled
        - networking support is enabled
        - overlayfs support is enabled
        - private-home support is enabled
        - seccomp-bpf support is enabled
        - user namespace support is enabled
        - X11 sandboxing support is enabled
Silmeria ~ % uname -sr
Linux 4.18.9-arch1-1-ARCH
Silmeria ~ % firejail mpv foo.mkv 
Reading profile /etc/firejail/mpv.profile
Reading profile /etc/firejail/disable-common.inc
Reading profile /etc/firejail/disable-devel.inc
Reading profile /etc/firejail/disable-interpreters.inc
Reading profile /etc/firejail/disable-passwdmgr.inc
Reading profile /etc/firejail/disable-programs.inc
Reading profile /etc/firejail/whitelist-var-common.inc
Parent pid 25331, child pid 25333
95 programs installed in 55.52 ms
Warning: An abstract unix socket for session D-BUS might still be available. Use --net or remove unix from --protocol set.
Warning: /sbin directory link was not blacklisted
Warning: /usr/sbin directory link was not blacklisted
Blacklist violations are logged to syslog
Child process initialized in 160.87 ms
Playing: foo.mkv
 (+) Video --vid=1 (*) (h264 1920x1080 60.000fps)
 (+) Audio --aid=1 (*) 'Track1' (aac 2ch 48000Hz)
[vo/gpu/x11] X11 error: BadValue (integer parameter out of range for operation)
[vo/gpu/x11] Type: 0, display: 0x7f42bc2224a0, resourceid: 0, serial: 6b
[vo/gpu/x11] Error code: 2, request code: 9a, minor code: 3
[vo/gpu] Could not create GLX context!
libEGL warning: DRI2: failed to authenticate
[vo/gpu/opengl] Suspected software renderer or indirect context.
[vo/gpu/x11] X11 error: BadValue (integer parameter out of range for operation)
[vo/gpu/x11] Type: 0, display: 0x7f42bc380680, resourceid: 0, serial: 6b
[vo/gpu/x11] Error code: 2, request code: 9a, minor code: 3
[vo/gpu] Could not create GLX context!
[vo/gpu/vulkan] vkEnumeratePhysicalDevices(vk->inst, &num, NULL): VK_ERROR_INITIALIZATION_FAILED
[vo/vdpau] Error when calling vdp_device_create_x11: 1
[vo/xv] Warning: this legacy VO has bad quality and performance, and will in particular result in blurry OSD and subtitles. You should fix your graphics drivers, or not force the xv VO.
[mkv] This is a broken file! Packets with incorrect keyframe flag found. Enabling workaround.
AO: [jack] 48000Hz stereo 2ch floatp
VO: [xv] 1920x1080 yuv420p
AV: 00:00:00.050 / 00:02:15.017 (0%) A-V: -0.001 DS: 1.600/0
[vo/xv] X11 can't keep up! Waiting for XShm completion events...
AV: 00:00:06.800 / 00:02:15.017 (5%) A-V: -0.194 DS: 10.600/441
Originally created by @Artefact2 on GitHub (Sep 27, 2018). Original GitHub issue: https://github.com/netblue30/firejail/issues/2124 I can't get MPV's `gpu` output to work correctly when it is being run with firejail. It works with `--noprofile`. ~~~ Silmeria ~ % mpv --version mpv 0.29.0 Copyright © 2000-2018 mpv/MPlayer/mplayer2 projects built on Thu Sep 27 17:24:22 CEST 2018 ffmpeg library versions: libavutil 56.14.100 libavcodec 58.18.100 libavformat 58.12.100 libswscale 5.1.100 libavfilter 7.16.100 libswresample 3.1.100 ffmpeg version: n4.0.2 ~~~ ~~~ Silmeria ~ % firejail --version firejail version 0.9.54 Compile time support: - AppArmor support is disabled - AppImage support is enabled - bind support is enabled - chroot support is enabled - file and directory whitelisting support is enabled - file transfer support is enabled - networking support is enabled - overlayfs support is enabled - private-home support is enabled - seccomp-bpf support is enabled - user namespace support is enabled - X11 sandboxing support is enabled ~~~ ~~~ Silmeria ~ % uname -sr Linux 4.18.9-arch1-1-ARCH ~~~ ~~~ Silmeria ~ % firejail mpv foo.mkv Reading profile /etc/firejail/mpv.profile Reading profile /etc/firejail/disable-common.inc Reading profile /etc/firejail/disable-devel.inc Reading profile /etc/firejail/disable-interpreters.inc Reading profile /etc/firejail/disable-passwdmgr.inc Reading profile /etc/firejail/disable-programs.inc Reading profile /etc/firejail/whitelist-var-common.inc Parent pid 25331, child pid 25333 95 programs installed in 55.52 ms Warning: An abstract unix socket for session D-BUS might still be available. Use --net or remove unix from --protocol set. Warning: /sbin directory link was not blacklisted Warning: /usr/sbin directory link was not blacklisted Blacklist violations are logged to syslog Child process initialized in 160.87 ms Playing: foo.mkv (+) Video --vid=1 (*) (h264 1920x1080 60.000fps) (+) Audio --aid=1 (*) 'Track1' (aac 2ch 48000Hz) [vo/gpu/x11] X11 error: BadValue (integer parameter out of range for operation) [vo/gpu/x11] Type: 0, display: 0x7f42bc2224a0, resourceid: 0, serial: 6b [vo/gpu/x11] Error code: 2, request code: 9a, minor code: 3 [vo/gpu] Could not create GLX context! libEGL warning: DRI2: failed to authenticate [vo/gpu/opengl] Suspected software renderer or indirect context. [vo/gpu/x11] X11 error: BadValue (integer parameter out of range for operation) [vo/gpu/x11] Type: 0, display: 0x7f42bc380680, resourceid: 0, serial: 6b [vo/gpu/x11] Error code: 2, request code: 9a, minor code: 3 [vo/gpu] Could not create GLX context! [vo/gpu/vulkan] vkEnumeratePhysicalDevices(vk->inst, &num, NULL): VK_ERROR_INITIALIZATION_FAILED [vo/vdpau] Error when calling vdp_device_create_x11: 1 [vo/xv] Warning: this legacy VO has bad quality and performance, and will in particular result in blurry OSD and subtitles. You should fix your graphics drivers, or not force the xv VO. [mkv] This is a broken file! Packets with incorrect keyframe flag found. Enabling workaround. AO: [jack] 48000Hz stereo 2ch floatp VO: [xv] 1920x1080 yuv420p AV: 00:00:00.050 / 00:02:15.017 (0%) A-V: -0.001 DS: 1.600/0 [vo/xv] X11 can't keep up! Waiting for XShm completion events... AV: 00:00:06.800 / 00:02:15.017 (5%) A-V: -0.194 DS: 10.600/441 ~~~
Author
Owner

@Artefact2 commented on GitHub (Sep 27, 2018):

After testing some of the options, it seems nogroups in /etc/firejail/mpv.profile is responsible for the breakage.

<!-- gh-comment-id:425140076 --> @Artefact2 commented on GitHub (Sep 27, 2018): After testing some of the options, it seems `nogroups` in `/etc/firejail/mpv.profile` is responsible for the breakage.
Author
Owner

@SkewedZeppelin commented on GitHub (Sep 27, 2018):

@Artefact2 see #1945

<!-- gh-comment-id:425171253 --> @SkewedZeppelin commented on GitHub (Sep 27, 2018): @Artefact2 see #1945
Author
Owner

@Artefact2 commented on GitHub (Sep 27, 2018):

Thanks. Closing this as it is a duplicate.

<!-- gh-comment-id:425171938 --> @Artefact2 commented on GitHub (Sep 27, 2018): Thanks. Closing this as it is a duplicate.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#1440
No description provided.