-
Notifications
You must be signed in to change notification settings - Fork 589
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
interfaces/opengl: Enable parsing of nvidia driver information files #14893
base: master
Are you sure you want to change the base?
Conversation
Some nvidia hardware companion utilities required access to driver information in order to operate properly, for example and nvidia-persistenced.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #14893 +/- ##
===========================================
+ Coverage 78.20% 95.87% +17.67%
===========================================
Files 1151 1156 +5
Lines 151396 801727 +650331
===========================================
+ Hits 118402 768692 +650290
- Misses 25662 25685 +23
- Partials 7332 7350 +18
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@@ -103,6 +103,8 @@ const openglConnectedPlugAppArmor = ` | |||
# nvidia | |||
/etc/vdpau_wrapper.cfg r, | |||
@{PROC}/driver/nvidia/params r, | |||
@{PROC}/driver/nvidia/gpus/[0-9]*:[0-9]*:[0-9]*.[0-9]*/information r, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the 'bus location' known to be only pci-like, or would it make sense to use more generic pattern here?
@{PROC}/driver/nvidia/gpus/[0-9]*:[0-9]*:[0-9]*.[0-9]*/information r, | |
@{PROC}/driver/nvidia/gpus/*/information r, |
@@ -103,6 +103,8 @@ const openglConnectedPlugAppArmor = ` | |||
# nvidia | |||
/etc/vdpau_wrapper.cfg r, | |||
@{PROC}/driver/nvidia/params r, | |||
@{PROC}/driver/nvidia/gpus/[0-9]*:[0-9]*:[0-9]*.[0-9]*/information r, | |||
@{PROC}/driver/nvidia/capabilities/mig/monitor r, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fwiw, what other files are present there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On my system I see:
[zyga@ciri ~]$ find /proc/driver/nvidia/ -ls
4026532876 0 dr-xr-xr-x 11 root root 0 sty 8 08:14 /proc/driver/nvidia/
4026532887 0 dr-xr-xr-x 3 root root 0 sty 8 08:14 /proc/driver/nvidia/gpus
4026532904 0 dr-xr-xr-x 5 root root 0 sty 8 08:14 /proc/driver/nvidia/gpus/0000:02:00.0
4026532907 0 -r--r--r-- 1 root root 0 sty 8 11:07 /proc/driver/nvidia/gpus/0000:02:00.0/power
4026532906 0 -rw-r--r-- 1 root root 0 sty 8 11:07 /proc/driver/nvidia/gpus/0000:02:00.0/registry
4026532905 0 -r--r--r-- 1 root root 0 sty 8 11:07 /proc/driver/nvidia/gpus/0000:02:00.0/information
4026532878 0 -r--r--r-- 1 root root 0 sty 8 08:14 /proc/driver/nvidia/params
4026532884 0 dr-xr-xr-x 3 root root 0 sty 8 11:07 /proc/driver/nvidia/patches
4026532885 0 -r--r--r-- 1 root root 0 sty 8 11:07 /proc/driver/nvidia/patches/README
4026532881 0 -rw-r--r-- 1 root root 0 sty 8 08:36 /proc/driver/nvidia/suspend
4026532886 0 -r--r--r-- 1 root root 0 sty 8 11:07 /proc/driver/nvidia/version
4026532879 0 -rw-r--r-- 1 root root 0 sty 8 11:07 /proc/driver/nvidia/registry
4026532882 0 dr-xr-xr-x 3 root root 0 sty 8 11:07 /proc/driver/nvidia/warnings
4026532883 0 -r--r--r-- 1 root root 0 sty 8 11:07 /proc/driver/nvidia/warnings/README
4026532888 0 dr-xr-xr-x 5 root root 0 sty 8 08:15 /proc/driver/nvidia/capabilities
4026532900 0 dr-xr-xr-x 4 root root 0 sty 8 08:15 /proc/driver/nvidia/capabilities/mig
4026532901 0 -r--r--r-- 1 root root 0 sty 8 08:15 /proc/driver/nvidia/capabilities/mig/config
4026532902 0 -r--r--r-- 1 root root 0 sty 8 08:15 /proc/driver/nvidia/capabilities/mig/monitor
4026533128 0 dr-xr-xr-x 3 root root 0 sty 8 11:07 /proc/driver/nvidia/capabilities/gpu0
4026533129 0 dr-xr-xr-x 2 root root 0 sty 8 11:07 /proc/driver/nvidia/capabilities/gpu0/mig
4026532903 0 -r--r--r-- 1 root root 0 sty 8 11:07 /proc/driver/nvidia/capabilities/fabric-imex-mgmt
4026532880 0 -rw-r--r-- 1 root root 0 sty 8 11:07 /proc/driver/nvidia/suspend_depth
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[zyga@ciri ~]$ cat /proc/driver/nvidia/patches/README
The NVIDIA graphics driver's kernel interface files can be
patched to improve compatibility with new Linux kernels or to
fix bugs in these files. When applied, each official patch
provides a short text file with a short description of itself
in this directory.
[zyga@ciri ~]$ cat /proc/driver/nvidia/warnings/README
The NVIDIA graphics driver tries to detect potential problems
with the host system and warns about them using the system's
logging mechanisms. Important warning message are also logged
to dedicated text files in this directory.
interfaces/opengl: Enable parsing of nvidia driver information files
Some nvidia hardware companion utilities required access to driver information in order to operate properly, for example nvidia-persistenced. This enables read only access to those files.
Example file content:
/proc/driver/nvidia/gpus/0000\:70\:00.0/information
/proc/driver/nvidia/capabilities/mig/monitor