Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mpv - OpenGL doesn't work with the proprietary Nvidia driver #1945

Closed
aidanharris opened this issue May 13, 2018 · 7 comments
Closed

Mpv - OpenGL doesn't work with the proprietary Nvidia driver #1945

aidanharris opened this issue May 13, 2018 · 7 comments
Labels
information_old (Deprecated; use "doc-todo" or "needinfo" instead) Information was/is required

Comments

@aidanharris
Copy link

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).

@SkewedZeppelin
Copy link
Collaborator

SkewedZeppelin commented 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

@l29ah
Copy link
Contributor

l29ah commented May 15, 2018

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

@chiraag-nataraj
Copy link
Collaborator

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

@chiraag-nataraj
Copy link
Collaborator

chiraag-nataraj commented 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.

@g3ngr33n
Copy link
Contributor

g3ngr33n commented 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.

@chiraag-nataraj
Copy link
Collaborator

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

@chiraag-nataraj
Copy link
Collaborator

Let's document this and close.

chiraag-nataraj added a commit that referenced this issue Jul 25, 2018
@chiraag-nataraj chiraag-nataraj added the information_old (Deprecated; use "doc-todo" or "needinfo" instead) Information was/is required label Jul 25, 2018
kmk3 added a commit to kmk3/firejail that referenced this issue Nov 30, 2021
`nogroups` should not have been causing issues with rendering on nvidia
since commit 623e682 ("temporary fix for nvidia/nogroups/noroot issue
(netblue30#3644, netblue30#841)", 2020-10-02) and commit cb460c3 ("more nvidia (netblue30#3644)",
2020-10-03), which had made it a no-op on nvidia.  And the handling of
the "render" and "video" groups are independent to the handling of
`nogroups` now; see the previous 3 commits.

Commits which introduced the comments on each profile:

* kodi.profile: commit ce462b6 ("fix netblue30#3501", 2020-07-16)
* mpsyt.profile: commit e17b48f ("new profile mpsyt.profile",
  2018-11-28)
* mpv.profile: commit cc7c489 ("Document netblue30#1945", 2018-07-25)
* steam.profile: commit d6f8169 ("steam fixes; netblue30#841, netblue30#3267",
  2020-03-15)

Commands used to find the comments:

    git grep -i nvidia -- etc/profile-* | grep -v private-etc

Relates to netblue30#4632.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
information_old (Deprecated; use "doc-todo" or "needinfo" instead) Information was/is required
Projects
None yet
Development

No branches or pull requests

5 participants