[GH-ISSUE #1945] mpv: OpenGL doesn't work with the proprietary Nvidia driver #1301

Closed
opened 2026-05-05 07:49:34 -06:00 by gitea-mirror · 7 comments
Owner

Originally created by @aidanharris on GitHub (May 13, 2018).
Original GitHub issue: https://github.com/netblue30/firejail/issues/1945

OS: Gentoo
Kernel: 4.14.40-gentoo

nogroups seems to cause this for some reason. Commenting it out as follows fixed my issue:

# Firejail profile for mpv
# This file is overwritten after every install/update
# Persistent local customizations
include /etc/firejail/mpv.local
# Persistent global definitions
include /etc/firejail/globals.local

noblacklist ${HOME}/.config/mpv
noblacklist ${HOME}/.netrc

# Allow python (blacklisted by disable-interpreters.inc)
noblacklist ${PATH}/python2*
noblacklist ${PATH}/python3*
noblacklist /usr/lib/python2*
noblacklist /usr/lib/python3*

include /etc/firejail/disable-common.inc
include /etc/firejail/disable-devel.inc
include /etc/firejail/disable-interpreters.inc
include /etc/firejail/disable-passwdmgr.inc
include /etc/firejail/disable-programs.inc

include /etc/firejail/whitelist-var-common.inc

apparmor
caps.drop all
netfilter
#nodbus # Commented out so mpv-mpris works
#nogroups # Commented out because the proprietary nvidia driver doesn't play nicely
nonewprivs
noroot
protocol unix,inet,inet6
seccomp
shell none
tracelog

private-bin mpv,youtube-dl,python*,env,dbus*
private-dev

I have no issues on my laptop (a Dell XPS 13) which uses Intel graphics so feel free to close this issue (not sure what your stance is on reporting issues with profiles but at least this gives other people that might also have this problem something to search for).

Originally created by @aidanharris on GitHub (May 13, 2018). Original GitHub issue: https://github.com/netblue30/firejail/issues/1945 ![](https://i.imgur.com/b1KehT5.png) OS: Gentoo Kernel: 4.14.40-gentoo `nogroups` seems to cause this for some reason. Commenting it out as follows fixed my issue: ``` # Firejail profile for mpv # This file is overwritten after every install/update # Persistent local customizations include /etc/firejail/mpv.local # Persistent global definitions include /etc/firejail/globals.local noblacklist ${HOME}/.config/mpv noblacklist ${HOME}/.netrc # Allow python (blacklisted by disable-interpreters.inc) noblacklist ${PATH}/python2* noblacklist ${PATH}/python3* noblacklist /usr/lib/python2* noblacklist /usr/lib/python3* include /etc/firejail/disable-common.inc include /etc/firejail/disable-devel.inc include /etc/firejail/disable-interpreters.inc include /etc/firejail/disable-passwdmgr.inc include /etc/firejail/disable-programs.inc include /etc/firejail/whitelist-var-common.inc apparmor caps.drop all netfilter #nodbus # Commented out so mpv-mpris works #nogroups # Commented out because the proprietary nvidia driver doesn't play nicely nonewprivs noroot protocol unix,inet,inet6 seccomp shell none tracelog private-bin mpv,youtube-dl,python*,env,dbus* private-dev ``` I have no issues on my laptop (a Dell XPS 13) which uses Intel graphics so feel free to close this issue (not sure what your stance is on reporting issues with profiles but at least this gives other people that might also have this problem something to search for).
gitea-mirror 2026-05-05 07:49:34 -06:00
Author
Owner

@SkewedZeppelin commented on GitHub (May 14, 2018):

Does commenting noroot instead of nogroups also work?

noroot is known to cause issues with the NVIDIA proprietary driver

to workaround in all profiles echo "ignore noroot" >> /etc/firejail/globals.local

<!-- gh-comment-id:388668036 --> @SkewedZeppelin commented on GitHub (May 14, 2018): Does commenting noroot instead of nogroups also work? noroot is known to cause issues with the NVIDIA proprietary driver to workaround in all profiles `echo "ignore noroot" >> /etc/firejail/globals.local`
Author
Owner

@l29ah commented on GitHub (May 15, 2018):

I experience the same with palemoon on intel video, removing nogroups fixed it.

<!-- gh-comment-id:389062979 --> @l29ah commented on GitHub (May 15, 2018): I experience the same with palemoon on intel video, removing nogroups fixed it.
Author
Owner

@chiraag-nataraj commented on GitHub (May 30, 2018):

I'm actually getting this issue no matter how I call mpv (whether inside of firejail or outside of it). The output looks something like this:

[vo/gpu] Could not set GLX context!
[vo/gpu/x11] X11 error: BadWindow (invalid Window parameter)
[vo/gpu/x11] Type: 0, display: 0x7f1d1023e200, resourceid: 2600002, serial: 80
[vo/gpu/x11] Error code: 3, request code: 9b, minor code: 4
[vo/gpu/x11] X11 error: GLXBadContextTag
[vo/gpu/x11] Type: 0, display: 0x7f1d1023e200, resourceid: 2600002, serial: 81
[vo/gpu/x11] Error code: a2, request code: 97, minor code: 5
<!-- gh-comment-id:393313658 --> @chiraag-nataraj commented on GitHub (May 30, 2018): I'm actually getting this issue no matter how I call `mpv` (whether inside of firejail or outside of it). The output looks something like this: ``` [vo/gpu] Could not set GLX context! [vo/gpu/x11] X11 error: BadWindow (invalid Window parameter) [vo/gpu/x11] Type: 0, display: 0x7f1d1023e200, resourceid: 2600002, serial: 80 [vo/gpu/x11] Error code: 3, request code: 9b, minor code: 4 [vo/gpu/x11] X11 error: GLXBadContextTag [vo/gpu/x11] Type: 0, display: 0x7f1d1023e200, resourceid: 2600002, serial: 81 [vo/gpu/x11] Error code: a2, request code: 97, minor code: 5 ```
Author
Owner

@chiraag-nataraj commented on GitHub (May 30, 2018):

mpv -vo vdpau seems to help for me (whether inside or outside of firejail).
[edit] never mind, I had a separate issue with opengl.

<!-- gh-comment-id:393314683 --> @chiraag-nataraj commented on GitHub (May 30, 2018): `mpv -vo vdpau` seems to help for me (whether inside or outside of firejail). [edit] never mind, I had a separate issue with opengl.
Author
Owner

@g3ngr33n commented on GitHub (May 31, 2018):

It maybe no related, but I got some error message too using nouveau and i915 (dual gpu) with electrum

libGL error: MESA-LOADER: failed to retrieve device information
MESA-LOADER: failed to retrieve device information
 libGL error: failed to create dri screen
libGL error: failed to load driver: i915
libGL error: failed to open drm device: Permission denied
libGL error: failed to load driver: i965
QXcbConnection: XCB error: 2 (BadValue), sequence: 598, resource id: 600, major code: 130 (Unknown), minor code: 3
QXcbConnection: XCB error: 2 (BadValue), sequence: 603, resource id: 600, major code: 130 (Unknown), minor 
....

The window login will be buggy (transparent) and the QXcbConnection error will prompt every seconds as long I don't resize a bit the window using alt+ right mouse click.

Parameters used

--seccomp
--caps.drop=all
--machine-id
--nonewprivs
--no3d
--noroot
--nogroups
--novideo
--noprofile
--nosound
--notv
--nodvd
--private=~/electrumjail/
--private-dev
--private-tmp
--disable-mnt
--ipc-namespace
--netfilter \

Removing noroot, nogroups, novideo, private-dev, private-tmp, no3d doesn't fix this bug. I haven't seen this bug with another app so far.

<!-- gh-comment-id:393550560 --> @g3ngr33n commented on GitHub (May 31, 2018): It maybe no related, but I got some error message too using nouveau and i915 (dual gpu) with electrum ``` libGL error: MESA-LOADER: failed to retrieve device information MESA-LOADER: failed to retrieve device information libGL error: failed to create dri screen libGL error: failed to load driver: i915 libGL error: failed to open drm device: Permission denied libGL error: failed to load driver: i965 QXcbConnection: XCB error: 2 (BadValue), sequence: 598, resource id: 600, major code: 130 (Unknown), minor code: 3 QXcbConnection: XCB error: 2 (BadValue), sequence: 603, resource id: 600, major code: 130 (Unknown), minor .... ``` The window login will be buggy (transparent) and the QXcbConnection error will prompt every seconds as long I don't resize a bit the window using alt+ right mouse click. ### Parameters used > --seccomp \ > --caps.drop=all \ > --machine-id \ > --nonewprivs \ > --no3d \ > --noroot \ > --nogroups \ > --novideo \ > --noprofile \ > --nosound \ > --notv \ > --nodvd \ > --private=~/electrumjail/ \ > --private-dev \ > --private-tmp \ > --disable-mnt \ > --ipc-namespace \ > --netfilter \ Removing noroot, nogroups, novideo, private-dev, private-tmp, no3d doesn't fix this bug. I haven't seen this bug with another app so far.
Author
Owner

@chiraag-nataraj commented on GitHub (Jun 1, 2018):

@g3ngr33n Did you comment on the wrong issue? mpv doesn't have a login window or use Qt.

<!-- gh-comment-id:394008142 --> @chiraag-nataraj commented on GitHub (Jun 1, 2018): @g3ngr33n Did you comment on the wrong issue? mpv doesn't have a login window or use Qt.
Author
Owner

@chiraag-nataraj commented on GitHub (Jul 25, 2018):

Let's document this and close.

<!-- gh-comment-id:407924768 --> @chiraag-nataraj commented on GitHub (Jul 25, 2018): Let's document this and close.
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#1301
No description provided.