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

modif: keep /sys/module/nvidia* if prop driver and no no3d #6387

Merged
merged 1 commit into from
Jun 25, 2024

Conversation

kmk3
Copy link
Collaborator

@kmk3 kmk3 commented Jun 17, 2024

It has been reported in #6372 that after upgrading the nvidia
proprietary driver from version 550.78 to 550.90.07, programs using
hardware acceleration fail unless paths in /sys/module/nvidia* are
accessible. Example:

$ firejail --noprofile prime-run /bin/glxdemo
[...]
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  150 (GLX)
  Minor opcode of failed request:  3 (X_GLXCreateContext)
  Value in failed request:  0x0
  Serial number of failed request:  22
  Current serial number in output stream:  23
[...]

Meanwhile, the AMD proprietary driver (AMDGPU Pro) seems to depend on
/sys/module/amdgpu for OpenCL (though it is unclear how to detect that
driver). See commit 95c8e28 ("Allow accessing /sys/module directory",
2018-05-08) and commit 9dd581d ("Allow AMD GPU usage by Blender",
2018-05-08) from PR #1932.

So whitelist /sys/module/nvidia* by default if the nvidia proprietary
driver is detected and no3d is not used.

Note: The driver check is copied from src/firejail/util.c (see #841).

To keep the current behavior (that is, block all modules), add
blacklist /sys/module to globals.local.

Fixes #6372.

Reported-by: @GreatBigWhiteWorld
Reported-by: @orzogc
Reported-by: @krop
Reported-by: @michelesr
Suggested-by: @glitsj16
Tested-by: @flyxyz123

@kmk3 kmk3 added this to In progress in Release 0.9.74 via automation Jun 17, 2024
@kmk3
Copy link
Collaborator Author

kmk3 commented Jun 17, 2024

Nvidia users, do these changes fix the issue?

Kind of relates to #6380.

Copy link
Collaborator

@glitsj16 glitsj16 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@flyxyz123
Copy link

Nvidia users, do these changes fix the issue?

Yes, these changes fix the issue for me.

It has been reported in netblue30#6372 that after upgrading the nvidia
proprietary driver from version 550.78 to 550.90.07, programs using
hardware acceleration fail unless paths in `/sys/module/nvidia*` are
accessible.  Example:

    $ firejail --noprofile prime-run /bin/glxdemo
    [...]
    X Error of failed request:  BadValue (integer parameter out of range for operation)
      Major opcode of failed request:  150 (GLX)
      Minor opcode of failed request:  3 (X_GLXCreateContext)
      Value in failed request:  0x0
      Serial number of failed request:  22
      Current serial number in output stream:  23
    [...]

Meanwhile, the AMD proprietary driver (AMDGPU Pro) seems to depend on
`/sys/module/amdgpu` for OpenCL (though it is unclear how to detect that
driver).  See commit 95c8e28 ("Allow accessing /sys/module directory",
2018-05-08) and commit 9dd581d ("Allow AMD GPU usage by Blender",
2018-05-08) from PR netblue30#1932.

So whitelist `/sys/module/nvidia*` by default if the nvidia proprietary
driver is detected and `no3d` is not used.

Note: The driver check is copied from src/firejail/util.c (see netblue30#841).

To keep the current behavior (that is, block all modules), add
`blacklist /sys/module` to globals.local.

Fixes netblue30#6372.

Reported-by: @GreatBigWhiteWorld
Reported-by: @orzogc
Reported-by: @krop
Reported-by: @michelesr
Suggested-by: @glitsj16
Tested-by: @flyxyz123
@kmk3 kmk3 force-pushed the modif-keep-nvidia-module branch from d4cb440 to 21b8ef1 Compare June 25, 2024 22:48
@kmk3 kmk3 merged commit af44e33 into netblue30:master Jun 25, 2024
14 checks passed
@kmk3 kmk3 deleted the modif-keep-nvidia-module branch June 25, 2024 22:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Release 0.9.74
  
In progress
Development

Successfully merging this pull request may close these issues.

Nvidia driver 550.90.07 needs access to /sys/module/nvidia*
3 participants