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

common/gpu/intel: add extraPackages32 #945

Merged
merged 2 commits into from
May 19, 2024

Conversation

OrichalcumCosmonaut
Copy link
Contributor

Description of changes

common/gpu/intel doesn’t add the matching 32-bit packages for video acceleration, resulting in (at least) Steam being unable to play videos on store pages. This can be diagnosed with HelpSteam Runtime Diagnostics:

"x11/vdpau" : {
  "messages" : [
    "Failed to open VDPAU backend libvdpau_va_gl.so: cannot open shared object file: No such file or directory",
    "vdp_device_create_x11 (display, screen, &device, &vdp_get_proc_address) failed: 1"
  ],
  "renderer" : null,
  "version" : null,
  "issues" : [
    "cannot-draw"
  ],
  "exit-status" : 1
},
"x11/vaapi" : {
  "messages" : [
    "libva info: VA-API version 1.21.0",
    "libva info: Trying to open /run/opengl-driver-32/lib/dri/iHD_drv_video.so",
    "libva info: Trying to open /usr/lib/dri/iHD_drv_video.so",
    "libva error: dlopen of /usr/lib/dri/iHD_drv_video.so failed: /usr/lib/dri/iHD_drv_video.so: wrong ELF class: ELFCLASS64",
    "libva info: Trying to open /usr/lib32/dri/iHD_drv_video.so",
    "libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so",
    "libva info: Trying to open /usr/lib/i386-linux-gnu/dri/iHD_drv_video.so",
    "libva info: va_openDriver() returns -1",
    "libva info: Trying to open /run/opengl-driver-32/lib/dri/i965_drv_video.so",
    "libva info: Trying to open /usr/lib/dri/i965_drv_video.so",
    "libva error: dlopen of /usr/lib/dri/i965_drv_video.so failed: /usr/lib/dri/i965_drv_video.so: wrong ELF class: ELFCLASS64",
    "libva info: Trying to open /usr/lib32/dri/i965_drv_video.so",
    "libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so",
    "libva info: Trying to open /usr/lib/i386-linux-gnu/dri/i965_drv_video.so",
    "libva info: va_openDriver() returns -1",
    "vaInitialize (va_display, &major_version, &minor_version) failed: unknown libva error (-1)"
  ],
  "renderer" : null,
  "version" : null,
  "issues" : [
    "cannot-draw"
  ],
  "exit-status" : 1
},

This change fixes this, at least for Intel GPUs:

"x11/vdpau" : {
  "messages" : [
    "libva info: VA-API version 1.21.0",
    "libva info: Trying to open /run/opengl-driver-32/lib/dri/iHD_drv_video.so",
    "libva info: Found init function __vaDriverInit_1_21",
    "libva info: va_openDriver() returns 0"
  ],
  "renderer" : "OpenGL/VAAPI backend for VDPAU\n",
  "version" : null
},
"x11/vaapi" : {
  "messages" : [
    "libva info: VA-API version 1.21.0",
    "libva info: Trying to open /run/opengl-driver-32/lib/dri/iHD_drv_video.so",
    "libva info: Found init function __vaDriverInit_1_21",
    "libva info: va_openDriver() returns 0",
    "Testing H264Main decoding",
    "vaEndPicture (va_display, context) failed: invalid parameter (18)",
    "Testing MPEG2Simple decoding",
    "vaEndPicture (va_display, context) failed: invalid parameter (18)",
    "Testing post-processing with VAProfileNone",
    "vaCreateBuffer (va_display, context, VAEncMiscParameterBufferType, sizeof (VAEncMiscParameterBuffer) + sizeof (VAEncMiscParameterBufferQualityLevel), 1, NULL, &misc_buf_id) failed: invalid parameter (18)"
  ],
  "renderer" : null,
  "version" : null,
  "issues" : [
    "cannot-draw"
  ],
  "exit-status" : 1
},

The VA-API diagnostic does still seem to fail (although it fails differently?), but I can confirm videos on Steam store pages work with this change.

Things done
  • Tested the changes in your own NixOS Configuration
  • Tested the changes end-to-end by using your fork of nixos-hardware and importing it via <nixos-hardware> or Flake input

@Mic92
Copy link
Member

Mic92 commented May 19, 2024

@mergify queue

Copy link
Contributor

mergify bot commented May 19, 2024

queue

✅ The pull request has been merged automatically

The pull request has been merged automatically at f0cf568

@mergify mergify bot merged commit f0cf568 into NixOS:master May 19, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants