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

[Fastfetch] Replace hard coded paths #308849

Closed
CarterLi opened this issue May 3, 2024 · 4 comments · Fixed by #309042
Closed

[Fastfetch] Replace hard coded paths #308849

CarterLi opened this issue May 3, 2024 · 4 comments · Fixed by #309042
Assignees
Labels
0.kind: bug Something is broken

Comments

@CarterLi
Copy link

CarterLi commented May 3, 2024

Describe the bug

Fastfetch uses hwdata/pci.ids and libdrm/amdgpu.ids to convert PCI device ID to human-readable product name.

Currently their paths are hard coded as /usr/share/hwdata/pci.ids and /usr/share/libdrm/amdgpu.ids. It won't work with NixOS of course.

https://github.com/fastfetch-cli/fastfetch/blob/dev/src/detection/gpu/gpu_linux.c#L126-L137

I found some packages that have similar issues. They are patched directly before building:

- file.open("/usr/share/hwdata/pci.ids");

Fastfetch needs to be patched too.

Steps To Reproduce

Steps to reproduce the behavior:

N/A

Expected behavior

Fastfetch can properly find pci.ids and amdgpu.ids

Screenshots

N/A

Additional context

Reference: fastfetch-cli/fastfetch#855

Fastfetch provided cmake config option CUSTOM_PCI_IDS_PATH for pci.ids but not for amdgpu.ids. I can add one if needed.

Notify maintainers

@chewblacka @r-ryantm

Metadata

N/A


Add a 👍 reaction to issues you find important.

@chewblacka
Copy link
Contributor

Fastfetch provided cmake config option CUSTOM_PCI_IDS_PATH for pci.ids but not for amdgpu.ids. I can add one if needed.

Hi thanks for the detailed issue report!
This should be pretty straightforward to fix. If you could add a config option for the amdgpu.ids path that would be great! Many thanks.

@chewblacka chewblacka self-assigned this May 3, 2024
@CarterLi
Copy link
Author

CarterLi commented May 4, 2024

Hi thanks for the detailed issue report! This should be pretty straightforward to fix. If you could add a config option for the amdgpu.ids path that would be great! Many thanks.

Done.

cmake -DCUSTOM_PCI_IDS_PATH=/path/to/pci.ids -DCUSTOM_AMDGPU_IDS_PATH=/path/to/amdgpu.ids

@CarterLi
Copy link
Author

CarterLi commented May 4, 2024

https://github.com/fastfetch-cli/fastfetch/releases/tag/2.11.3 was released with CUSTOM_AMDGPU_IDS_PATH support

@chewblacka
Copy link
Contributor

https://github.com/fastfetch-cli/fastfetch/releases/tag/2.11.3 was released with CUSTOM_AMDGPU_IDS_PATH support

Many thanks! Much appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants