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

[BUG] trailing newline on gpu name #1303

Closed
Dariqq opened this issue Sep 29, 2024 · 5 comments
Closed

[BUG] trailing newline on gpu name #1303

Dariqq opened this issue Sep 29, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@Dariqq
Copy link
Contributor

Dariqq commented Sep 29, 2024

General description of bug:

  • What happened: Updated fastfetch on a raspberry pi and there is an extra "\n" in the gpu name which breaks the formatted output
  • What should happen:
  • Fastfetch version used: 2.26.1
  • Did it work in an older version: Previous versions had an error instead
  • Where did you get the binary: Built from source with minimal dependencies.
  • Does this issue still occur in the latest dev build? Yes

Often helpful information:

 fastfetch --list-features
threads
zlib
linux/videodev2
linux/wireless

Output on 2.26.1

fastfetch -s gpu --format json
[
  {
    "type": "GPU",
    "result": [
      {
        "index": null,
        "coreCount": null,
        "coreUsage": null,
        "memory": {
          "dedicated": {
            "total": null,
            "used": null
          },
          "shared": {
            "total": null,
            "used": null
          }
        },
        "driver": "vc4-drm",
        "name": "bcm2835-vc4\n",
        "temperature": null,
        "type": "Integrated",
        "vendor": "Brcm",
        "platformApi": "DRM (card0)",
        "frequency": 0,
        "deviceId": 0
      }
    ]
  }
]

The output on 2.25.0

 ./fastfetch -s gpu --format json
[
  {
    "type": "GPU",
    "error": "GPU detection failed"
  }
]
``
@Dariqq Dariqq added the bug Something isn't working label Sep 29, 2024
@CarterLi
Copy link
Member

Please test

@Dariqq
Copy link
Contributor Author

Dariqq commented Sep 29, 2024

Works, thanks :)

[
  {
    "type": "GPU",
    "result": [
      {
        "index": null,
        "coreCount": null,
        "coreUsage": null,
        "memory": {
          "dedicated": {
            "total": null,
            "used": null
          },
          "shared": {
            "total": null,
            "used": null
          }
        },
        "driver": "vc4-drm",
        "name": "bcm2835-vc4",
        "temperature": null,
        "type": "Integrated",
        "vendor": "Brcm",
        "platformApi": "DRM (card0)",
        "frequency": 0,
        "deviceId": 0
      }
    ]
  }
]
``

@XhmikosR
Copy link
Contributor

@CarterLi do you plan to cut a new patch release with this fix?

@CarterLi
Copy link
Member

Just made some changes to cpu gpu and board modules. If you can test the changes if they work fine for raspberry pi, I'm happy to cut a release.

@Dariqq
Copy link
Contributor Author

Dariqq commented Sep 30, 2024

This is the new output on my pi3b (aarch64) on d77f0fe:

/proc/device-tree/board does not exist here.

[
  {
    "type": "CPU",
    "result": {
      "cpu": "BCM2837",
      "vendor": "Broadcom",
      "cores": {
        "physical": 4,
        "logical": 4,
        "online": 4
      },
      "frequency": {
        "base": 0,
        "max": 1200
      },
      "coreTypes": [],
      "temperature": null
    }
  },
  {
    "type": "GPU",
    "result": [
      {
        "index": null,
        "coreCount": null,
        "coreUsage": null,
        "memory": {
          "dedicated": {
            "total": null,
            "used": null
          },
          "shared": {
            "total": null,
            "used": null
          }
        },
        "driver": "vc4-drm",
        "name": "bcm2835-vc4",
        "temperature": null,
        "type": "Integrated",
        "vendor": "Broadcom",
        "platformApi": "DRM (card0)",
        "frequency": 0,
        "deviceId": 0
      }
    ]
  },
  {
    "type": "Board",
    "result": {
      "name": "3-model-b",
      "vendor": "raspberrypi",
      "version": "",
      "serial": ""
    }
  }
]

Output on: d97999d:

[
  {
    "type": "CPU",
    "result": {
      "cpu": "Cortex-A53*4",
      "vendor": "ARM",
      "cores": {
        "physical": 4,
        "logical": 4,
        "online": 4
      },
      "frequency": {
        "base": 0,
        "max": 1200
      },
      "coreTypes": [],
      "temperature": null
    }
  },
  {
    "type": "GPU",
    "result": [
      {
        "index": null,
        "coreCount": null,
        "coreUsage": null,
        "memory": {
          "dedicated": {
            "total": null,
            "used": null
          },
          "shared": {
            "total": null,
            "used": null
          }
        },
        "driver": "vc4-drm",
        "name": "bcm2835-vc4",
        "temperature": null,
        "type": "Integrated",
        "vendor": "Brcm",
        "platformApi": "DRM (card0)",
        "frequency": 0,
        "deviceId": 0
      }
    ]
  },
  {
    "type": "Board",
    "result": {
      "name": "3-model-b",
      "vendor": "raspberrypi",
      "version": "",
      "serial": ""
    }
  }
]

Difference is in the CPU which now gets identifies as BCM2837 vs Cortex-A53*4 which seems to be the correct name of the soc (rather than components used in the soc).

GPU vendor is now Broadcom rather than Brcm

CarterLi added a commit to CarterLi/fastfetch that referenced this issue Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants