KyleGospo / aura-gpu-dkms

DKMS Driver package providing an i2c driver for AURA capable GPUs on Fedora, RHEL, OpenSUSE, and OpenMandriva
https://copr.fedorainfracloud.org/coprs/kylegospo/aura-gpu-dkms/
GNU General Public License v2.0
0 stars 1 forks source link

Incorrect pci id for Asus RX 480 strix #2

Open KayJay7 opened 4 months ago

KayJay7 commented 4 months ago

Real issue

Upon better inspection, the id in the file is incorrect, as shown in this output of lspci -vnn:

...
01:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] [1002:67df] (rev c7) (prog-if 00 [VGA controller])
        Subsystem: ASUSTeK Computer Inc. Radeon RX 480 [1043:04fb]
        Flags: bus master, fast devsel, latency 0, IRQ 101, IOMMU group 12
        Memory at fa00000000 (64-bit, prefetchable) [size=8G]
        Memory at fc00000000 (64-bit, prefetchable) [size=2M]
        I/O ports at f000 [size=256]
        Memory at fcf00000 (32-bit, non-prefetchable) [size=256K]
        Expansion ROM at fcf40000 [disabled] [size=128K]
        Capabilities: <access denied>
        Kernel driver in use: amdgpu
        Kernel modules: amdgpu
...

The correct pci id is 1002:67df:1043:04fb while the file reports 1002:67df:1043:04fd (the last hex is different). This is probably an error from the author or the pull request that added support for the card as here the same id as mine is listed.

On the pci id repository both ids are bound to the RX 480, so I think it's possible that some cards come with one and some with the other. I don't think it depends on the amount of vram, because my card has 8gb as well. Maybe both ids should be kept.

I still can't build the module, so I haven't tested it.

Old issue (No pci device found even though the id is in the pci_ids.h file)

I kept the old issue for the record, most of it is not relevant anymore.

I'm trying to use this module with an Asus RX 480 strix, and the module fails to detect it.

The output of dmesg | grep aura is:

[    6.195316] aura_gpu: loading out-of-tree module taints kernel.
[    6.195318] aura_gpu: module verification failed: signature and/or required key missing - tainting kernel
[    6.195909] lights aura: [/var/lib/dkms/aura-gpu/0.0.git.26.8adff84a/build/aura-gpu-hw.c:458] Failed to find a valid pci device
[    6.195911] lights aura: arg 'adapter' is NULL
[    6.195916] WARNING: CPU: 1 PID: 798 at /var/lib/dkms/aura-gpu/0.0.git.26.8adff84a/build/main.c:14 aura_module_init+0x34/0xff0 [aura_gpu]
[    6.195922] Modules linked in: aura_gpu(OE+) loop zram hid_logitech_hidpp amdgpu crct10dif_pclmul crc32_pclmul crc32c_intel polyval_clmulni amdxcp polyval_generic i2c_algo_bit drm_ttm_helper ttm drm_exec ghash_clmulni_intel sha512_ssse3 gpu_sched nvme drm_suballoc_helper sha256_ssse3 drm_buddy sha1_ssse3 ccp drm_display_helper nvme_core r8169 sp5100_tco cec realtek nvme_auth video wmi hid_logitech_dj ip6_tables ip_tables fuse i2c_dev
[    6.195943] RIP: 0010:aura_module_init+0x34/0xff0 [aura_gpu]
[    6.195959]  ? aura_module_init+0x34/0xff0 [aura_gpu]
[    6.195967]  ? aura_module_init+0x34/0xff0 [aura_gpu]
[    6.195985]  ? __pfx_aura_module_init+0x10/0x10 [aura_gpu]
[    6.195990]  ? aura_module_init+0x34/0xff0 [aura_gpu]
[    6.196033] lights aura: [/var/lib/dkms/aura-gpu/0.0.git.26.8adff84a/build/main.c:15] Failed to assign 'adapter': ENOMEM

On the third line, the module fails to find a valid pci device

The output of lspci -nn | grep VGA is:

01:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] [1002:67df] (rev c7)
0d:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Raphael [1002:164e] (rev c3)

On the first line, the 480 has id 1002:67df which coincides with the id on line 14 of the pci_ids.h file.

I would test the original repo (not your fork) to provide more info, but I fail to build it.

KayJay7 commented 4 months ago

I identified the real issue and update the previous comment.

KayJay7 commented 4 months ago

I have news, adding the pci id is not enough. As a matter of facts, this driver should only work for vega gpus end not polaris.

Vega gpus use the uc line (?) number 7, while polaris gpus use 6. this commit from hartmark changes the line to 7 to support the vega card he uses, so now the driver should only works for vega gpus.

I have confirmed that adding the pci id and changing the line works and I can succesfully control the rgb of my card.

KayJay7 commented 3 months ago

This solves this issue