NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.58k stars 13.74k forks source link

NVidia Prime Render sync doesn't work with vdpau #83722

Open mdedetrich opened 4 years ago

mdedetrich commented 4 years ago

Describe the bug If you are using nvidia prime render sync it doesn't appear to work with vdpau (required for GPU accelerated video playback).

To Reproduce Steps to reproduce the behavior:

  1. Enable nvidia prime render sync using hardware.nvidia.prime.sync.enable = true (plus other steps) and install vdpauinfo
  2. Add vaapiIntel, vaapiVdpau, libvdpau-va-gl, intel-media-driver to hardware.opengl.extraPackages.
  3. Run vdpauinfo either directly

Expected behavior vpdauinfo works correctly. Instead it prints

display: :0   screen: 0
Xlib:  extension "GLX" missing on display ":0".
libvdpau-va-gl: GLXGlobalContext::GLXGlobalContext: glXChooseVisual failed
Xlib:  extension "GLX" missing on display ":0".
Error creating VDPAU device: 23

Additional context Relevant settings

  hardware.nvidia = {
    modesetting.enable = true;
    prime = {
      sync.enable = true;  
      nvidiaBusId = "PCI:1:0.0";
      intelBusId = "PCI:0:2.0";
    };
  };  

  hardware.opengl = {
    enable = true;
    driSupport32Bit = true;
    extraPackages = with pkgs; [
      vaapiIntel
      vaapiVdpau
      libvdpau-va-gl
      intel-media-driver
    ];
  };

  services.xserver.videoDrivers = [ "intel" "nvidiaBeta" ];

Metadata Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

 - system: `"x86_64-linux"`
 - host os: `Linux 5.5.13, NixOS, 20.09pre218613.ae6bdcc5358 (Nightingale)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.3.3`
 - channels(root): `"nixos-20.09pre218613.ae6bdcc5358"`
 - channels(mdedetrich): `"nixpkgs-20.09pre218717.05f0934825c"`
 - nixpkgs: `/home/mdedetrich/.nix-defexpr/channels/nixpkgs`

Maintainer information:

attribute: hardware.nvidia, hardware.opengl
eadwu commented 4 years ago

sync != offload, although vdpauinfo should be working in Prime SYNC as well.

mdedetrich commented 4 years ago

@eadwu Thanks, I have updated the issue

stale[bot] commented 4 years ago

Hello, I'm a bot and I thank you in the name of the community for opening this issue.

To help our human contributors focus on the most-relevant reports, I check up on old issues to see if they're still relevant. This issue has had no activity for 180 days, and so I marked it as stale, but you can rest assured it will never be closed by a non-human.

The community would appreciate your effort in checking if the issue is still valid. If it isn't, please close it.

If the issue persists, and you'd like to remove the stale label, you simply need to leave a comment. Your comment can be as simple as "still important to me". If you'd like it to get more attention, you can ask for help by searching for maintainers and people that previously touched related code and @ mention them in a comment. You can use Git blame or GitHub's web interface on the relevant files to find them.

Lastly, you can always ask for help at our Discourse Forum or at #nixos' IRC channel.