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

nvidia: prime render offload #66601

Open
wants to merge 6 commits into
base: master
from

Conversation

@eadwu
Copy link
Contributor

commented Aug 14, 2019

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @

@eadwu

This comment has been minimized.

Copy link
Contributor Author

commented Aug 14, 2019

Patched xorg.xorgserver
Loaded modesetting and glamoregl
Added Option "AllowNVIDIAGPUScreens"
Got NVIDIA(G0) in journalctl
Got NVIDIA-G0 provider in xrandr
Loaded nvidia_drm

Device is detected, nvidia-smi output

➜ nvidia-smi
Tue Aug 13 22:44:48 2019
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 435.17       Driver Version: 435.17       CUDA Version: 10.1     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 105...  Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   59C    P8    N/A /  N/A |     36MiB /  4042MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
+-----------------------------------------------------------------------------+

Still broken

➜ __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia glxinfo
name of display: :0
X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  156 (NV-GLX)
  Minor opcode of failed request:  43 ()
  Serial number of failed request:  17
  Current serial number in output stream:  18
@eadwu eadwu referenced this pull request Aug 14, 2019
3 of 10 tasks complete

@eadwu eadwu force-pushed the eadwu:nvidia/prime-render-offload branch 4 times, most recently from db99540 to 3fc022e Aug 14, 2019

@eadwu eadwu marked this pull request as ready for review Aug 14, 2019

@eadwu eadwu force-pushed the eadwu:nvidia/prime-render-offload branch 3 times, most recently from d12e300 to 5a80896 Aug 14, 2019

@eadwu

This comment has been minimized.

Copy link
Contributor Author

commented Aug 14, 2019

Confirmed PRIME synchronization and render offload works fine on my device.

~
➜ glxinfo | rg vendor
server glx vendor string: SGI
client glx vendor string: Mesa Project and SGI
OpenGL vendor string: Intel

~
➜ nvidia-offload glxinfo | rg vendor
server glx vendor string: NVIDIA Corporation
client glx vendor string: NVIDIA Corporation
OpenGL vendor string: NVIDIA Corporation

~
➜ nvidia-smi
Wed Aug 14 13:45:53 2019
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 435.17       Driver Version: 435.17       CUDA Version: 10.1     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 105...  Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   61C    P3    N/A /  N/A |     37MiB /  4042MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
+-----------------------------------------------------------------------------+

@eadwu eadwu force-pushed the eadwu:nvidia/prime-render-offload branch from 5a80896 to e03a73c Aug 14, 2019

eadwu added some commits Aug 14, 2019

nixos/xserver: introduce attr display to xserver.drivers
Specifically for NVIDIA so that only the device section would be created

@eadwu eadwu force-pushed the eadwu:nvidia/prime-render-offload branch from e03a73c to d81c3a1 Aug 18, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.