greshake / i3status-rust

Very resourcefriendly and feature-rich replacement for i3status, written in pure Rust
GNU General Public License v3.0
2.82k stars 472 forks source link

amd_gpu: select device automatically #1935

Closed MaxVerevkin closed 11 months ago

MaxVerevkin commented 11 months ago

Resolves #1928

ammgws commented 11 months ago

I was bit by #1935 too, but on my system I have an Intel iGPU which is at card0, so even with this fix the automatic selection would be wrong. I guess you only have one GPU and it is card1?

Wonder if we can check any of the other properties in /sys/class/drm/card0x to prefer ones that say 'AMD' or something. Though that still might not be perfect if your iGPU was AMD

MaxVerevkin commented 11 months ago

I guess you only have one GPU and it is card1?

Yes.

Wonder if we can check any of the other properties in /sys/class/drm/card0x to prefer ones that say 'AMD' or something.

That would be nice. rg -i amd /sys/class/drm/card1/device/ showed a few results, /sys/class/drm/card1/device/uevent is probably the best. On my system it has a line DRIVER=amdgpu.

I'm not aware of a way to check if a given GPU is integrated or not.