Closed hughobrien closed 6 months ago
Can't reproduce that. What do you have configured in hardware.opengl.extraPackages
?
opengl = {
enable = true;
extraPackages = with pkgs; [ libvdpau-va-gl vaapiVdpau intel-media-driver ];
};
The issue appears related to the presence of a DisplayLink (not Port) device.
~ master*
❯ ls /dev/dri
by-path card0 card1 renderD128
~ master*
❯ echo $WLR_DRM_DEVICES
/dev/dri/card0:/dev/dri/card1
When the device is not present, or not present at sway
startup then vainfo
works correctly. This did work correctly until a recent update (perhaps 3/4 weeks since I updated.)
I will try and rollback a few packages to see if I can find the trigger, but would appreciate any suggestions.
Digging into this some more I traced the error back and found that there was a nullcheck removed from libva-utils, since re-added.
When I add it back I trigger it
[nix-shell:/data/nixpkgs/pkgs/development/libraries/libva/source/build]$ LD_LIBRARY_PATH=$PWD/va vainfo
Trying display: wayland
libva info: VA-API version 1.20.0
libva error: vaGetDriverNames() failed with invalid VADisplay
vaInitialize failed with error code 3 (invalid VADisplay),exit
I think the root cause for this is the evdi
device showing up in /dev/dri
, and for some reason taking the card0
slot where it used to be card1
. There seems to be more than a few complaints where multi-gpu system owners find software assuming card0
has rendering abilities.
Just closing out for any one in the future, I think the root cause was the (allowed) renumbering of the /dev/dri
devices.
I had been using the patch that allows renderless evdi devices to use the main renderer of the host system, as you can see it contains a hardcoded card0
reference. In addition, one needs to set
WLR_DRM_DEVICES = "/dev/dri/card0:/dev/dri/card1
to 'encourage' sway to use both 'cards'.
I resolved the issue by updating the patch to use renderD128
by default, and by no longer setting WLR_DRM_DEVICES
.
overlays = [
(final: prev: {
wlroots_0_17 = prev.wlroots_0_17.overrideAttrs (old: {
patches = (old.patches or [ ]) ++ [
(prev.fetchpatch {
url = "https://gist.githubusercontent.com/hughobrien/7879f1faeab354dbc07a8af2f053e715/raw/9155431b6c30d1ab92898238e050c75764ecbe0e/DisplayLink.patch";
hash = "sha256-VUAoYgEs4A2T3bVOf5dRHZq+a9FRimU12ndBMEESw/M=";
})
];
});
})
];
Apologies for the noise Sandro.
vaapiVdpau
Whats the reason why you are still using that? It is pretty old and unmaintained.
Glad you find a solution. I don't have any multi GPU systems and things usually work smoother on just intel GPUs.
Probably just carbon copying from the wiki
Describe the bug
Segfault with recent libva. Affects mpv (with gpu target) but can be reproduced with
vainfo
Steps To Reproduce
Steps to reproduce the behavior:
Screenshots
Additional context
(Framework 13" Intel)
Notify maintainers
@SuperSandro2000
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.Add a :+1: reaction to issues you find important.