Skip to content

nixos-rebuild fails, when xserver.videoDrivers is set to [ "amdgpu-pro" ] #78031

Closed

Description

@thilobillerbeck

Describe the bug
When I switch my video drivers to "amdgpu-pro", my rebuild fails with the error message:

error: unsupported xorg abiCompat 1.19 for xorg-server-1.20.5
(use '--show-trace' to show detailed location information)

Additionally, when I use boot.kernelPackages = pkgs.linuxPackages_latest;, it has a conflict with a boot.kernelPackages in the amdgpu_pro module.

The option `boot.kernelPackages' has conflicting definitions, in `/path/to/my/config/hardware.nix' and `/nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/hardware/video/amdgpu-pro.nix'.

To Reproduce
Steps to reproduce the behavior:

  1. set services.xserver.videoDrivers to [ "amdgpu-pro" ];
  2. nixos-rebuild switch
  3. To reproduce the secound error: set boot.kernelPackages to pkgs.linuxPackages_latest;

Expected behavior
The rebuild should run without errors, and X should use the amdgpu-pro drivers after a reboot.

Metadata

 - system: `"x86_64-linux"`
 - host os: `Linux 5.4.13, NixOS, 19.09.1912.5b9eee22acf (Loris)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.3.2`
 - channels(thilo): `""`
 - channels(root): `"nixos-19.09.1912.5b9eee22acf, nixos-unstable-20.03pre209690.c438ce12a85"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute:
- services.xserver.videoDrivers
module:
- /modules/hardware/video/amdgpu-pro.nix

Activity

  1. added
    6.topic: hardware
    6.topic: nixos
    on Jan 19, 2020
  2. DieGoldeneEnte commented on Feb 1, 2020

    @DieGoldeneEnte
    Contributor

    I have the same problem.
    I suspect the abiCompat problem is the result of nixos-19.09 using xorg-server 1.20.* instead of 1.19.* .
    Regarding the second (kernelPackages) problem: I don't think this is a bug, but the result of amdgpu-pro containing closed-source components, which requires a specific kernel.

    I don't have time at the moment, but will try to have a look in a week or so.

  3. DieGoldeneEnte commented on Feb 8, 2020

    @DieGoldeneEnte
    Contributor

    I can't debug this, because I need a newer kernel than amdgpu-pro supports :/ (I will look into that, but that is not a high priority for me at the moment)
    At the moment the newest release of amdgpu-pro seems to require something around kernel 4.16 (I could only find the supported Distributions), the build using 5.4 failed for me, but I can't say I fully understand the video-driver setup.

    Maybe @corngood could take a look at it? The main problem in this issue is the xorg-version expected by amdgpu-pro (as set in the package) and the xorg version in nixpkgs.

    There also is a new version 19.50.

    If someone gets it working on a newer kernel I would gladly help testing.

  4. scalavision commented on May 11, 2020

    @scalavision
    Contributor

    The new version you point to seems to support kernel v 5, since it supports ubuntu 18.03 which has kernel v 5 ..

  5. DieGoldeneEnte commented on May 11, 2020

    @DieGoldeneEnte
    Contributor

    I didn't look up the versions at that point, since I find it is quite cumbersome to find the kernel being used in the distribution (maybe I just look in the wrong places?).
    There is also #79562 (and #46765 with 18.03), with version 20.10, (Used in Ubuntu 18.04.4). I had a short look, but didn't get to much done yet. In that issue @killercup also started on updating it.
    I use rocm, which I use for at the moment to get OpenCL.

  6. davidak commented on May 17, 2020

    @davidak
    Member

    I didn't look up the versions at that point, since I find it is quite cumbersome to find the kernel being used in the distribution (maybe I just look in the wrong places?).

    You can find versions of ubuntu packages here: https://packages.ubuntu.com/bionic/kernel-image

    I also found this page: https://ubuntu.com/kernel/lifecycle

    Here are also information: https://en.wikipedia.org/wiki/Ubuntu_version_history#Ubuntu_18.04_LTS_(Bionic_Beaver)

    So the initial release of Ubuntu 18.04 seem to has kernel 4.15 and later had 5.3.

    I use rocm, which I use for at the moment to get OpenCL.

    OpenCL works with amdgpu in this PR: #87990

  7. killercup commented on Jun 13, 2020

    @killercup
    Member
  8. 6AA4FD commented on Jul 3, 2020

    @6AA4FD
    Contributor

    @corngood do you have any plans to work on this?

  9. corngood commented on Jul 3, 2020

    @corngood
    Contributor

    I haven't had a use for it in a while, so probably not any time soon.

  10. stale commented on Dec 31, 2020

    @stale

    I marked this as stale due to inactivity. → More info

  11. added
    2.status: stale
    on Dec 31, 2020
  12. Jiehong commented on Feb 20, 2021

    @Jiehong
    Contributor

    I confirm this issue is still unresolved.

  13. removed
    2.status: stale
    on Feb 20, 2021
  14. tobkratz commented on Feb 25, 2021

    @tobkratz
    Contributor

    can also replicate this issue on 20.09

  15. TheOddler commented on Aug 14, 2021

    @TheOddler

    I now have the same issue on 21.05.

  16. davidak commented on Apr 9, 2022

    @davidak
    Member

    This is fixed on unstable. The pinned kernel version has a dedicated issue.

  17. ezracelli commented on Mar 15, 2023

    @ezracelli

    Looks like this may have cropped up again? I'm on unstable (5a1dc8a), and getting the following:

    $ cat /etc/nixos/configuration.nix | grep "amdgpu"
      services.xserver.videoDrivers = [ "amdgpu-pro" ];
    # nixos-rebuild switch --flake /etc/nixos#nixos
    building the system configuration...
    error: attribute 'name' missing
    
           at /nix/store/nbp8axqsz7zbkd03zia0v60jhi382ly9-source/pkgs/servers/x11/xorg/overrides.nix:653:67:
    
              652|           }
              653|         else throw "unsupported xorg abiCompat ${abiCompat} for ${attrs_passed.name}";
                 |                                                                   ^
              654|
           Did you mean pname?
    (use '--show-trace' to show detailed location information)

    The error message seems to be due to #167893, but looks like it's trying to throw this error.

    • amdgpu-pro has version 21.30 (note, there is actually a new version 22.40 out)
    • "amdgpu-pro" driver sets abiCompat = "1.20"
    • xorg-server has version 21.1.7

    Metadata

    $ nix run nixpkgs#nix-info -- -m
     - system: `"x86_64-linux"`
     - host os: `Linux 6.1.18, NixOS, 23.05 (Stoat), 23.05.20230312.5a1dc8a`
     - multi-user?: `yes`
     - sandbox: `yes`
     - version: `nix-env (Nix) 2.13.3`
     - channels(root): `"nixos-22.11"`
     - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: bug6.topic: hardware6.topic: nixos

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions