fastfetch-cli / fastfetch

An actively maintained, feature-rich and performance oriented, neofetch like system information tool.
MIT License
9.96k stars 398 forks source link

[BUG] Error: GPU detection failed on Android (Termux). #976

Closed AcatXIo closed 4 months ago

AcatXIo commented 4 months ago

General description of bug:

Often helpful information:

The content of the configuration file you use (if any): I used all.jsonc without changes.

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

{
  "type": "GPU",
  "error": "GPU detection failed"
}

Output of fastfetch --list-features:

threads
vulkan
freetype
linux/videodev2
linux/wireless
CarterLi commented 4 months ago

What does fastfetch -s vulkan --format json print?

AcatXIo commented 4 months ago
{
  "type": "Vulkan",
  "error": "ffvkCreateInstance() failed"
}

The phone/OS supports Vulkan API version 1.1.

CarterLi commented 4 months ago
{
  "type": "Vulkan",
  "error": "ffvkCreateInstance() failed"
}

No luck. Fastfetch relies on working Vulkan driver reporting GPU models. All other methods are disabled on Vulkan because they are known not to work in non-rooted devices.

CarterLi commented 4 months ago

some android system information apps from play store

Fastfetch has much more limitations compare to native android apps, because fastfetch doesn't have access to the Android Java APIs.

CarterLi commented 4 months ago

In v2.14.0, fastfetch will report more information about why creating vulkan instance fails. You should try it after fastfetch gets updated by Termux

AcatXIo commented 4 months ago

It now says:

{
  "type": "Vulkan",
  "error": "ffvkCreateInstance() failed: VK_ERROR_INCOMPATIBLE_DRIVER"
}

Is there any way I can fix this, or is this the OS's fault?

CarterLi commented 4 months ago

That means the OS doesn't provide a proper GPU driver with vulkan support.

It should print something like this

[
  {
    "type": "Vulkan",
    "result": {
      "apiVersion": "1.3.128",
      "conformanceVersion": "1.3",
      "driver": "Qualcomm Technologies Inc. Adreno Vulkan Driver",
      "gpus": [
        {
          "type": "Integrated",
          "vendor": "Qualcomm",
          "name": "Adreno (TM) 750",
          "driver": "Driver Build: 62c1f322ce, Id0077aad60, 1700555917\nDate: 11/21/23\nCompiler Version: E031.42.23.09\nDriver Branch: \n",
          "platformApi": "Vulkan 1.3.128",
          "memory": {
            "dedicated": {
              "total": 0,
              "used": null
            },
            "shared": {
              "total": 20240965632,
              "used": null
            }
          },
          "deviceId": 1124406273
        }
      ]
    }
  }
]

You can test the vulkan module on Windows too.

AcatXIo commented 4 months ago

Well on my older laptops, which don't support vulkan, I get:

{
  "type": "Vulkan",
  "error": "ffvkEnumeratePhysicalDevices() failed: VK_ERROR_INITIALIZATION_FAILED"
}

And on newer ones I get:

{
  "type": "Vulkan",
  "result": {
    "apiVersion": "1.2.203",
    "conformanceVersion": "1.2.1",
    "driver": "Intel Corporation [Intel driver]",
    "gpus": [
      {
        "type": "Integrated",
        "vendor": "Intel",
        "name": "Intel(R) HD Graphics 620",
        "driver": "Intel driver",
        "platformApi": "Vulkan 1.2.203",
        "memory": {
          "dedicated": {
            "total": 0,
            "used": null
          },
          "shared": {
            "total": 8515602432,
            "used": null
          }
        },
        "deviceId": 22806
      }
    ]
  }
}

And:

{
  "type": "Vulkan",
  "result": {
    "apiVersion": "1.3.277",
    "conformanceVersion": "1.3.2",
    "driver": "NVIDIA [552.12]",
    "gpus": [
      {
        "type": "Discrete",
        "vendor": "NVIDIA",
        "name": "NVIDIA GeForce GTX 1060 with Max-Q Design",
        "driver": "552.12",
        "platformApi": "Vulkan 1.3.277",
        "memory": {
          "dedicated": {
            "total": 6548357120,
            "used": null
          },
          "shared": {
            "total": 17154297856,
            "used": null
          }
        },
        "deviceId": 7264
      }
    ]
  }
}

Btw. Here is more information about the Vulkan setup that I have on my phone: https://vulkan.gpuinfo.org/displayreport.php?id=30816 Maybe you will know why exactly is it incompatible, since I've got no idea.

CarterLi commented 4 months ago

You need to ask LineageOS. GPU / hardware support is not enough. A proper driver need to be installed to.

AcatXIo commented 4 months ago

Alright, thanks for your help. I will ask them now.