fastfetch-cli / fastfetch

A maintained, feature-rich and performance oriented, neofetch like system information tool.
MIT License
10.63k stars 408 forks source link

[BUG] AMD GPU not detected #855

Closed attilaolah closed 6 months ago

attilaolah commented 6 months ago

General description of bug:

Often helpful information:

GPU reported by:

screenfetch (probably the most correct)

GPU: AMD/ATI Navi 10 [Radeon RX 5600 OEM/5600 XT / 5700/5700 XT]

neofetch (still right but less useful)

GPU: AMD ATI Radeon RX 5600 OEM/5600 XT / 5700/5700 XT

fastfetch 2.10.2

GPU: AMD  [Integrated]

fastfetch from git head

GPU: AMD  @ 0.03 GHz [Discrete]

Output of fastfetch -c ci.jsonc --format json:

[
  {
    "type": "Title",
    "result": {
      "userName": "ao",
      "hostName": "home",
      "homeDir": "/home/ao/",
      "exePath": "/nix/store/dqa7v5kdsi8yqbk12cs4kph1wsprdw3c-fastfetch-2.10.2/bin/.fastfetch-wrapped",
      "userShell": "/etc/profiles/per-user/ao/bin/fish",
      "pageSize": 4096
    },
    "stat": 0
  },
  {
    "type": "Separator",
    "error": "Unsupported for JSON format",
    "stat": 0
  },
  {
    "type": "OS",
    "result": {
      "buildID": "24.05.20240502.63c3a29",
      "codename": "uakari",
      "id": "nixos",
      "idLike": "",
      "name": "NixOS",
      "prettyName": "NixOS 24.05 (Uakari)",
      "variant": "",
      "variantID": "",
      "version": "24.05 (Uakari)",
      "versionID": "24.05"
    },
    "stat": 1
  },
  {
    "type": "Host",
    "result": {
      "family": "",
      "name": "X99-Turbo",
      "version": "",
      "sku": "",
      "vendor": "",
      "serial": "",
      "uuid": ""
    },
    "stat": 0
  },
  {
    "type": "Bios",
    "result": {
      "date": "12/09/2022",
      "release": "5.11",
      "vendor": "American Megatrends Inc.",
      "version": "5.11",
      "type": "UEFI"
    },
    "stat": 0
  },
  {
    "type": "Board",
    "result": {
      "name": "X99-Turbo",
      "vendor": "",
      "version": "",
      "serial": ""
    },
    "stat": 0
  },
  {
    "type": "Chassis",
    "result": {
      "type": "Desktop",
      "vendor": "",
      "version": "",
      "serial": ""
    },
    "stat": 0
  },
  {
    "type": "Kernel",
    "result": {
      "architecture": "x86_64",
      "name": "Linux",
      "release": "6.6.29",
      "version": "#1-NixOS SMP PREEMPT_DYNAMIC Sat Apr 27 15:11:44 UTC 2024",
      "displayVersion": ""
    },
    "stat": 0
  },
  {
    "type": "Uptime",
    "result": {
      "uptime": 24004220,
      "bootTime": "2024-05-04T00:23:08.819+0200"
    },
    "stat": 0
  },
  {
    "type": "Processes",
    "result": 567,
    "stat": 1
  },
  {
    "type": "Packages",
    "result": {
      "all": 1270,
      "apk": 0,
      "brew": 0,
      "brewCask": 0,
      "choco": 0,
      "dpkg": 0,
      "emerge": 0,
      "eopkg": 0,
      "flatpakSystem": 0,
      "flatpakUser": 0,
      "nixDefault": 0,
      "nixSystem": 1270,
      "nixUser": 0,
      "pacman": 0,
      "paludis": 0,
      "pkg": 0,
      "pkgtool": 0,
      "macports": 0,
      "rpm": 0,
      "scoop": 0,
      "snap": 0,
      "winget": 0,
      "xbps": 0,
      "opkg": 0,
      "am": 0,
      "pacmanBranch": ""
    },
    "stat": 296
  },
  {
    "type": "Shell",
    "result": {
      "exe": "fish",
      "exeName": "fish",
      "exePath": "/nix/store/l4yds7aqk64bmbmvgjwa8csp5f7k6vcb-fish-3.7.1/bin/fish",
      "pid": 2108923,
      "ppid": 2105643,
      "processName": "fish",
      "prettyName": "fish",
      "version": "3.7.1",
      "tty": 3
    },
    "stat": 5
  },
  {
    "type": "Display",
    "result": [
      {
        "width": 1440,
        "height": 2560,
        "id": 0,
        "name": "DELL P2720DC",
        "primary": false,
        "refreshRate": 59.951,
        "rotation": 270,
        "scaledHeight": 2560,
        "scaledWidth": 1440,
        "type": "Unknown"
      },
      {
        "width": 1440,
        "height": 2560,
        "id": 0,
        "name": "P27h-20",
        "primary": false,
        "refreshRate": 59.951,
        "rotation": 90,
        "scaledHeight": 2560,
        "scaledWidth": 1440,
        "type": "Unknown"
      },
      {
        "width": 3840,
        "height": 2160,
        "id": 0,
        "name": "U32J59x",
        "primary": false,
        "refreshRate": 59.997,
        "rotation": 0,
        "scaledHeight": 2160,
        "scaledWidth": 3840,
        "type": "Unknown"
      }
    ],
    "stat": 7
  },
  {
    "type": "Brightness",
    "error": "No result is detected.",
    "stat": 118
  },
  {
    "type": "Monitor",
    "result": [
      {
        "hdrCompatible": false,
        "name": "P27h-20",
        "resolution": {
          "width": 2560,
          "height": 1440
        },
        "physical": {
          "height": 349,
          "width": 609
        },
        "manufactureDate": {
          "year": 2020,
          "week": 45
        },
        "serial": null
      },
      {
        "hdrCompatible": false,
        "name": "DELL P2720DC",
        "resolution": {
          "width": 2560,
          "height": 1440
        },
        "physical": {
          "height": 336,
          "width": 597
        },
        "manufactureDate": {
          "year": 2020,
          "week": 4
        },
        "serial": 827541075
      },
      {
        "hdrCompatible": false,
        "name": "U32J59x",
        "resolution": {
          "width": 3840,
          "height": 2160
        },
        "physical": {
          "height": 392,
          "width": 697
        },
        "manufactureDate": {
          "year": 2023,
          "week": 9
        },
        "serial": 810434865
      }
    ],
    "stat": 0
  },
  {
    "type": "LM",
    "result": {
      "service": "greetd",
      "type": "Wayland",
      "version": ""
    },
    "stat": 0
  },
  {
    "type": "DE",
    "error": "No DE found",
    "stat": 0
  },
  {
    "type": "WM",
    "result": {
      "processName": "Hyprland",
      "prettyName": "Hyprland",
      "protocolName": "Wayland",
      "pluginName": ""
    },
    "stat": 0
  },
  {
    "type": "WMTheme",
    "error": "Unknown WM: Hyprland",
    "stat": 0
  },
  {
    "type": "Theme",
    "result": "vimix-dark-grey [GTK2/3/4]",
    "stat": 1
  },
  {
    "type": "Icons",
    "result": "Vimix-Black-dark [GTK2/3/4]",
    "stat": 0
  },
  {
    "type": "Font",
    "error": "No fonts found",
    "stat": 0
  },
  {
    "type": "Cursor",
    "result": {
      "theme": "Adwaita",
      "size": "24"
    },
    "stat": 0
  },
  {
    "type": "Wallpaper",
    "error": "Failed to detect the current wallpaper path",
    "stat": 0
  },
  {
    "type": "Terminal",
    "result": {
      "processName": ".any-nix-shell-",
      "exe": "/nix/store/dy2z01kpnxn7dn2kgfdxs4fm8xy9mb89-bash-5.2p26/bin/sh",
      "exeName": "sh",
      "exePath": "/nix/store/dy2z01kpnxn7dn2kgfdxs4fm8xy9mb89-bash-5.2p26/bin/bash",
      "pid": 2105641,
      "ppid": 2098728,
      "prettyName": ".any-nix-shell-",
      "version": "",
      "tty": ""
    },
    "stat": 0
  },
  {
    "type": "TerminalFont",
    "error": "Unknown terminal: .any-nix-shell-",
    "stat": 0
  },
  {
    "type": "TerminalSize",
    "error": "Failed to detect terminal size",
    "stat": 0
  },
  {
    "type": "TerminalTheme",
    "error": "Failed to detect terminal theme",
    "stat": 0
  },
  {
    "type": "CPU",
    "result": {
      "cpu": "Intel(R) Xeon(R) E5-2666 v3",
      "vendor": "GenuineIntel",
      "cores": {
        "physical": 10,
        "logical": 20,
        "online": 20
      },
      "frequency": {
        "base": 2.331362,
        "max": 3.5,
        "min": 1.2
      },
      "temperature": null
    },
    "stat": 1
  },
  {
    "type": "CPUUsage",
    "result": [
      5.0,
      0.0,
      0.0,
      0.0,
      0.0,
      9.523809523809524,
      4.761904761904762,
      4.761904761904762,
      4.761904761904762,
      5.0,
      0.0,
      5.0,
      0.0,
      0.0,
      4.761904761904762,
      0.0,
      0.0,
      9.523809523809524,
      0.0,
      0.0
    ],
    "stat": 200
  },
  {
    "type": "GPU",
    "result": [
      {
        "coreCount": null,
        "memory": {
          "dedicated": {
            "total": null,
            "used": null
          },
          "shared": {
            "total": 268435456,
            "used": 1278144512
          }
        },
        "driver": "amdgpu",
        "name": "",
        "temperature": null,
        "type": "Integrated",
        "vendor": "AMD",
        "platformApi": "",
        "frequency": null
      }
    ],
    "stat": 1
  },
  {
    "type": "Memory",
    "result": {
      "total": 134909960192,
      "used": 7857975296
    },
    "stat": 0
  },
  {
    "type": "Swap",
    "result": {
      "total": 0,
      "used": 0
    },
    "stat": 0
  },
  {
    "type": "Disk",
    "result": [
      {
        "bytes": {
          "available": 2227065499648,
          "free": 2389859430400,
          "total": 3936838303744,
          "used": 1546978873344
        },
        "files": {
          "total": 244187136,
          "used": 12328214
        },
        "filesystem": "ext4",
        "mountpoint": "/",
        "mountFrom": "/dev/nixvg/root",
        "name": "",
        "volumeType": [
          "Regular"
        ],
        "createTime": "2024-03-01T20:39:58.000+0100"
      },
      {
        "bytes": {
          "available": 1378926592,
          "free": 1378926592,
          "total": 2143272960,
          "used": 764346368
        },
        "files": {
          "total": null,
          "used": null
        },
        "filesystem": "vfat",
        "mountpoint": "/boot",
        "mountFrom": "/dev/sdf1",
        "name": "",
        "volumeType": [
          "Hidden"
        ],
        "createTime": null
      },
      {
        "bytes": {
          "available": 223302701056,
          "free": 235612876800,
          "total": 240872513536,
          "used": 5259636736
        },
        "files": {
          "total": 15007744,
          "used": 40
        },
        "filesystem": "ext4",
        "mountpoint": "/home/ao/backup",
        "mountFrom": "/dev/mapper/cryptusb",
        "name": "USB: Backups",
        "volumeType": [
          "Regular"
        ],
        "createTime": "2024-03-02T20:35:26.000+0100"
      },
      {
        "bytes": {
          "available": 2227065499648,
          "free": 2389859430400,
          "total": 3936838303744,
          "used": 1546978873344
        },
        "files": {
          "total": 244187136,
          "used": 12328214
        },
        "filesystem": "ext4",
        "mountpoint": "/nix/store",
        "mountFrom": "/dev/nixvg/root",
        "name": "",
        "volumeType": [
          "Subvolume",
          "Read-only"
        ],
        "createTime": "2024-03-02T09:41:28.454+0100"
      }
    ],
    "stat": 0
  },
  {
    "type": "Battery",
    "error": "\"/sys/class/power_supply/\" doesn't contain any battery folder",
    "stat": 0
  },
  {
    "type": "PowerAdapter",
    "error": "No power adapters found",
    "stat": 0
  },
  {
    "type": "Player",
    "error": "No media found",
    "stat": 10
  },
  {
    "type": "Media",
    "error": "No media found",
    "stat": 0
  },
  {
    "type": "PublicIp",
    "result": {
      "ip": "REDACTED",
      "location": "REDACTED"
    },
    "stat": 0
  },
  {
    "type": "LocalIp",
    "result": [
      {
        "defaultRoute": true,
        "ipv4": "SOME CIDR",
        "ipv6": "SOME CIDR",
        "mac": "",
        "name": "enp9s0"
      }
    ],
    "stat": 1
  },
  {
    "type": "Wifi",
    "result": [
      {
        "inf": {
          "description": "stable",
          "status": "Unavailable"
        },
        "conn": {
          "status": "",
          "ssid": "",
          "bssid": "",
          "protocol": "",
          "security": "",
          "signalQuality": null,
          "rxRate": null,
          "txRate": null
        }
      }
    ],
    "stat": 47
  },
  {
    "type": "DateTime",
    "result": 1714750985287,
    "stat": 0
  },
  {
    "type": "Locale",
    "result": "en_US.UTF-8",
    "stat": 0
  },
  {
    "type": "Vulkan",
    "result": {
      "apiVersion": "1.3.269",
      "conformanceVersion": "1.3.1",
      "driver": "AMD open-source driver [2023.Q4.2 (LLPC)]",
      "gpus": [
        {
          "type": "Discrete",
          "vendor": "AMD",
          "name": "AMD Radeon RX 5700 XT",
          "driver": "2023.Q4.2 (LLPC)",
          "platformApi": "Vulkan 1.3.269",
          "memory": {
            "dedicated": {
              "total": 8573157376,
              "used": null
            },
            "shared": {
              "total": 67454894080,
              "used": null
            }
          },
          "deviceId": 29471
        }
      ]
    },
    "stat": 106
  },
  {
    "type": "OpenGL",
    "result": {
      "version": "4.6 (Compatibility Profile) Mesa 24.0.5",
      "renderer": "AMD Radeon RX 5700 XT (radeonsi, navi10, LLVM 17.0.6, DRM 3.54, 6.6.29)",
      "vendor": "AMD",
      "slv": "4.60"
    },
    "stat": 191
  },
  {
    "type": "OpenCL",
    "result": {
      "version": "2.0",
      "device": "gfx1010:xnack-",
      "vendor": "Advanced Micro Devices, Inc."
    },
    "stat": 34
  },
  {
    "type": "Users",
    "result": [],
    "stat": 0
  },
  {
    "type": "Bluetooth",
    "result": [],
    "stat": 1
  },
  {
    "type": "Sound",
    "result": [
      {
        "active": true,
        "main": true,
        "volume": 49,
        "name": "Built-in Audio Analog Stereo",
        "identifier": "alsa_output.pci-0000_00_1b.0.analog-stereo"
      },
      {
        "active": true,
        "main": false,
        "volume": 39,
        "name": "Navi 10 HDMI Audio Digital Stereo (HDMI 4)",
        "identifier": "alsa_output.pci-0000_07_00.1.hdmi-stereo-extra3"
      }
    ],
    "stat": 9
  },
  {
    "type": "Camera",
    "result": [
      {
        "name": "Logitech Webcam C925e",
        "vendor": "",
        "colorSpace": "sRGB",
        "id": "usb-0000:00:14.0-1.4",
        "width": 160,
        "height": 90
      }
    ],
    "stat": 0
  },
  {
    "type": "Gamepad",
    "error": "No devices detected",
    "stat": 0
  },
  {
    "type": "Weather",
    "result": "+13°C - Partly cloudy (Zurich, Switzerland)",
    "stat": 0
  },
  {
    "type": "NetIO",
    "result": [
      {
        "name": "enp9s0",
        "defaultRoute": true,
        "txBytes": 1373,
        "rxBytes": 1730,
        "txPackets": 16,
        "rxPackets": 11,
        "rxErrors": 0,
        "txErrors": 0,
        "rxDrops": 0,
        "txDrops": 0
      }
    ],
    "stat": 1
  },
  {
    "type": "DiskIO",
    "result": [
      {
        "name": "Kingston DataTraveler 3.0",
        "devPath": "/dev/sdf",
        "bytesRead": 0,
        "bytesWritten": 0,
        "readCount": 0,
        "writeCount": 0
      },
      {
        "name": "WD_BLACK SN770 2TB",
        "devPath": "/dev/nvme0n1",
        "bytesRead": 0,
        "bytesWritten": 659456,
        "readCount": 0,
        "writeCount": 127
      },
      {
        "name": "ATA WDC WDS500G2B0A-",
        "devPath": "/dev/sdd",
        "bytesRead": 0,
        "bytesWritten": 0,
        "readCount": 0,
        "writeCount": 0
      },
      {
        "name": "ATA Samsung SSD 870",
        "devPath": "/dev/sdb",
        "bytesRead": 0,
        "bytesWritten": 0,
        "readCount": 0,
        "writeCount": 0
      },
      {
        "name": "ATA TOSHIBA MQ01ABD0",
        "devPath": "/dev/sde",
        "bytesRead": 0,
        "bytesWritten": 0,
        "readCount": 0,
        "writeCount": 0
      },
      {
        "name": "ATA SanDisk SD8SB8U2",
        "devPath": "/dev/sdc",
        "bytesRead": 0,
        "bytesWritten": 0,
        "readCount": 0,
        "writeCount": 0
      },
      {
        "name": "WD_BLACK SN770 2TB",
        "devPath": "/dev/nvme1n1",
        "bytesRead": 0,
        "bytesWritten": 0,
        "readCount": 0,
        "writeCount": 0
      },
      {
        "name": "ATA SK hynix SC401 S",
        "devPath": "/dev/sda",
        "bytesRead": 0,
        "bytesWritten": 0,
        "readCount": 0,
        "writeCount": 0
      }
    ],
    "stat": 0
  },
  {
    "type": "PhysicalDisk",
    "result": [
      {
        "name": "Kingston DataTraveler 3.0",
        "devPath": "/dev/sdf",
        "interconnect": "USB",
        "kind": "HDD",
        "size": 248034361344,
        "serial": "",
        "removable": true,
        "readOnly": false,
        "revision": "",
        "temperature": null
      },
      {
        "name": "WD_BLACK SN770 2TB",
        "devPath": "/dev/nvme0n1",
        "interconnect": "NVMe",
        "kind": "SSD",
        "size": 2000398934016,
        "serial": "233439804279",
        "removable": false,
        "readOnly": false,
        "revision": "731100WD",
        "temperature": null
      },
      {
        "name": "ATA WDC WDS500G2B0A-",
        "devPath": "/dev/sdd",
        "interconnect": "ATA",
        "kind": "SSD",
        "size": 500107862016,
        "serial": "",
        "removable": false,
        "readOnly": false,
        "revision": "",
        "temperature": null
      },
      {
        "name": "ATA Samsung SSD 870",
        "devPath": "/dev/sdb",
        "interconnect": "ATA",
        "kind": "SSD",
        "size": 1000204886016,
        "serial": "",
        "removable": false,
        "readOnly": false,
        "revision": "",
        "temperature": null
      },
      {
        "name": "ATA TOSHIBA MQ01ABD0",
        "devPath": "/dev/sde",
        "interconnect": "ATA",
        "kind": "HDD",
        "size": 750156374016,
        "serial": "",
        "removable": false,
        "readOnly": false,
        "revision": "",
        "temperature": null
      },
      {
        "name": "ATA SanDisk SD8SB8U2",
        "devPath": "/dev/sdc",
        "interconnect": "ATA",
        "kind": "SSD",
        "size": 256060514304,
        "serial": "",
        "removable": false,
        "readOnly": false,
        "revision": "",
        "temperature": null
      },
      {
        "name": "WD_BLACK SN770 2TB",
        "devPath": "/dev/nvme1n1",
        "interconnect": "NVMe",
        "kind": "SSD",
        "size": 2000398934016,
        "serial": "233440804349",
        "removable": false,
        "readOnly": false,
        "revision": "731100WD",
        "temperature": null
      },
      {
        "name": "ATA SK hynix SC401 S",
        "devPath": "/dev/sda",
        "interconnect": "ATA",
        "kind": "SSD",
        "size": 256060514304,
        "serial": "",
        "removable": false,
        "readOnly": false,
        "revision": "",
        "temperature": null
      }
    ],
    "stat": 1
  },
  {
    "type": "Version",
    "result": {
      "projectName": "fastfetch",
      "architecture": "x86_64",
      "version": "2.10.2",
      "versionTweak": "",
      "cmakeBuiltType": "Release",
      "compileTime": "Jan  1 1980, 00:00:00",
      "compiler": "gcc 13.2.0",
      "debugMode": false,
      "libc": "glibc 2.39"
    },
    "stat": 0
  },
  {
    "type": "Break",
    "error": "Unsupported for JSON format",
    "stat": 0
  },
  {
    "type": "Colors",
    "error": "Unsupported for JSON format",
    "stat": 0
  }
]```

Output of `fastfetch --list-features`:

threads vulkan wayland xcb-randr xcb xrandr x11 gio dconf dbus imagemagick7 chafa zlib xfconf sqlite3 egl glx opencl libpulse libnm libddcutil videodev2 Proprietary GPU driver API System yyjson



## If fastfatch crashed or freezed

Nope.

* The bug is reproduceable with fresh / clean shell configuration (i.e. `fastfetch` is the single line of `.zshrc` or `~/.config/fish/config.fish`): Haven't tried.
* Does `sleep 1` before running `fastfetch` work? Makes no difference.
CarterLi commented 6 months ago

Seems nix doesn't use standard unix paths, so that fastfetch failed to find some important files. What do find / -name pci.ids and find / -name amdgpu.ids print?

CarterLi commented 6 months ago

You may use fastfetch --gpu-force-vulkan as a workaround for now.

CarterLi commented 6 months ago
./nix/store/3c8nq431csyqkyj0gwhb5iqr4caljlv3-system-path/share/pci.ids
./nix/store/50c3kvhrjzr57j4fs1ilnj0zj070zbbx-hwdata-0.376/share/hwdata/pci.ids
./nix/store/qbi10b9c4idvydmbvp6yhdv512j8dqbs-pciutils-3.10.0/share/pci.ids
find: ‘./nix/.rw-store/work’: Permission denied
./nix/.ro-store/3c8nq431csyqkyj0gwhb5iqr4caljlv3-system-path/share/pci.ids
./nix/.ro-store/50c3kvhrjzr57j4fs1ilnj0zj070zbbx-hwdata-0.376/share/hwdata/pci.ids
./nix/.ro-store/qbi10b9c4idvydmbvp6yhdv512j8dqbs-pciutils-3.10.0/share/pci.ids

The paths are so weird that I really don't know how to handle them. I need some explainations from a nix expert.

CarterLi commented 6 months ago

Closing in favor of https://github.com/NixOS/nixpkgs/issues/308849

tdtooke commented 5 months ago

I also noticed my discrete gpu (nvidia) is not detected lately. This workaround also works for me.

attilaolah commented 5 months ago

Hey, sorry for not tending back to this issue. Indeed, on NixOS all those files are expected to be in the Nix store, not in a well known location. The solution should indeed be to point to the right location when building for Nix, thanks for linking to the relevant NixOS bug.

attilaolah commented 5 months ago

I should also confirm that with the latest package update on NixOS, the AMD GPU is detected properly.

:tada: