Skip to content

[BUG?] fastfetch says [HDD, fixed] for virtual disk. #1669

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

Closed
1 task done
gdr2333 opened this issue Apr 4, 2025 · 2 comments
Closed
1 task done

[BUG?] fastfetch says [HDD, fixed] for virtual disk. #1669

gdr2333 opened this issue Apr 4, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@gdr2333
Copy link

gdr2333 commented Apr 4, 2025

Read the FAQ first

  • I have checked the FAQ but the issue is not covered

Description

I have a virtual cloud server that uses a virtio-based virtual disk. But fastfetch reports that this disk is an HDD.

Version used

fastfetch 2.40.1 (x86_64)

Bug prevalence

Always

Regression

Not sure

Installation

GitHub Releases

Package manager

apt(dpkg)

Other

I don't force you to identify virtual devices from all sorts of clues, because if someone wants to hide them, then it's almost impossible to identify them.

However, in this case, it's a virtual hard drive that couldn't be more obvious. It uses the Virtio driver, and the device naming program calls it "vda"(/dev/vda).

For this kind of device, I believe we should say [Virtual] or [Virtual, Fixed] instead of [HDD, Fixed].

lshw:

df1050@hcss-ecs-9fec:~$ sudo lshw -class disk
  *-virtio3
       description: Virtual I/O device
       physical id: 0
       bus info: virtio@3
       logical name: /dev/vda
       size: 20GiB (21GB)
       capabilities: partitioned partitioned:dos
       configuration: driver=virtio_blk logicalsectorsize=512 sectorsize=512 signature=1593843c

Configuration

all.json(Not edited)

System information

df1050@hcss-ecs-9fec:~$ fastfetch -c all.jsonc --stat --format json
[
  {
    "type": "Title",
    "result": {
      "userName": "df1050",
      "hostName": "hcss-ecs-9fec",
      "homeDir": "/home/df1050/",
      "exePath": "/usr/bin/fastfetch",
      "userShell": "/bin/bash"
    },
    "stat": 0.0026000000070780516
  },
  {
    "type": "Separator",
    "error": "Unsupported for JSON format",
    "stat": 0.0004439998883754015
  },
  {
    "type": "OS",
    "result": {
      "buildID": "",
      "codename": "bookworm",
      "id": "debian",
      "idLike": "",
      "name": "Debian GNU/Linux",
      "prettyName": "Debian GNU/Linux 12 (bookworm)",
      "variant": "",
      "variantID": "",
      "version": "12.10",
      "versionID": "12.10"
    },
    "stat": 0.028491999953985214
  },
  {
    "type": "Host",
    "result": {
      "family": "Virtual Machine",
      "name": "OpenStack Nova",
      "version": "13.2.1-20241109181723_e08a0fe",
      "sku": "",
      "vendor": "OpenStack Foundation",
      "serial": "",
      "uuid": ""
    },
    "stat": 0.0496690000873059
  },
  {
    "type": "Bios",
    "result": {
      "date": "04/01/2014",
      "release": "0.0",
      "vendor": "SeaBIOS",
      "version": "rel-1.12.1-0-ga5cab58-20240811_152225-szxrtosci10000",
      "type": "BIOS"
    },
    "stat": 0.020626000128686428
  },
  {
    "type": "Bootmgr",
    "error": "Failed to read efivar: BootCurrent",
    "stat": 0.0022040000185370445
  },
  {
    "type": "Board",
    "error": "board_name is not set.",
    "stat": 0.010360999964177608
  },
  {
    "type": "Chassis",
    "result": {
      "type": "Other",
      "vendor": "",
      "version": "pc-i440fx-4.1",
      "serial": ""
    },
    "stat": 0.021810000063851476
  },
  {
    "type": "Kernel",
    "result": {
      "architecture": "x86_64",
      "name": "Linux",
      "release": "6.1.0-32-amd64",
      "version": "#1 SMP PREEMPT_DYNAMIC Debian 6.1.129-1 (2025-03-06)",
      "displayVersion": "",
      "pageSize": 4096
    },
    "stat": 0.0011049997992813587
  },
  {
    "type": "InitSystem",
    "result": {
      "name": "systemd",
      "exe": "/usr/lib/systemd/systemd",
      "version": "252.36-1~deb12u1",
      "pid": 1
    },
    "stat": 0.2579710001591593
  },
  {
    "type": "Uptime",
    "result": {
      "uptime": 1497600,
      "bootTime": "2025-04-05T01:55:00.511+0800"
    },
    "stat": 0.02502300008200109
  },
  {
    "type": "Loadavg",
    "result": [
      0.0,
      0.0,
      0.0
    ],
    "stat": 0.006693999981507659
  },
  {
    "type": "Processes",
    "result": 109,
    "stat": 0.09682099986821413
  },
  {
    "type": "Packages",
    "result": {
      "all": 529,
      "amSystem": 0,
      "amUser": 0,
      "apk": 0,
      "brew": 0,
      "brewCask": 0,
      "choco": 0,
      "dpkg": 529,
      "emerge": 0,
      "eopkg": 0,
      "flatpakSystem": 0,
      "flatpakUser": 0,
      "guixSystem": 0,
      "guixUser": 0,
      "guixHome": 0,
      "hpkgSystem": 0,
      "hpkgUser": 0,
      "linglong": 0,
      "mport": 0,
      "nixDefault": 0,
      "nixSystem": 0,
      "nixUser": 0,
      "opkg": 0,
      "pacman": 0,
      "pacstall": 0,
      "paludis": 0,
      "pisi": 0,
      "pkg": 0,
      "pkgtool": 0,
      "pkgsrc": 0,
      "qi": 0,
      "macports": 0,
      "rpm": 0,
      "scoop": 0,
      "snap": 0,
      "sorcery": 0,
      "winget": 0,
      "xbps": 0,
      "pacmanBranch": ""
    },
    "stat": 0.22834899998269975
  },
  {
    "type": "Shell",
    "result": {
      "exe": "bash",
      "exeName": "bash",
      "exePath": "/usr/bin/bash",
      "pid": 2318,
      "ppid": 2317,
      "processName": "bash",
      "prettyName": "bash",
      "version": "5.2.15",
      "tty": 0
    },
    "stat": 1.0718149999156594
  },
  {
    "type": "Editor",
    "error": "$VISUAL or $EDITOR not set",
    "stat": 0.0025939999613910913
  },
  {
    "type": "Display",
    "result": [
      {
        "id": 0,
        "name": "VGA-1",
        "primary": false,
        "output": {
          "width": 1024,
          "height": 768,
          "refreshRate": 0.0
        },
        "scaled": {
          "width": 0,
          "height": 0
        },
        "preferred": {
          "width": 0,
          "height": 0,
          "refreshRate": 0.0
        },
        "physical": {
          "width": 0,
          "height": 0
        },
        "rotation": 0,
        "bitDepth": 0,
        "hdrStatus": null,
        "type": "External",
        "manufactureDate": null,
        "serial": null,
        "platformApi": "sysfs-drm"
      }
    ],
    "stat": 0.22503699990920722
  },
  {
    "type": "Brightness",
    "result": [],
    "stat": 0.08084599999710917
  },
  {
    "type": "Monitor",
    "error": "Monitor module is an alias of Display module",
    "stat": 0.000662999926134944
  },
  {
    "type": "LM",
    "result": {
      "service": "sshd",
      "type": "TTY",
      "version": ""
    },
    "stat": 0.28466999996453524
  },
  {
    "type": "DE",
    "error": "No DE found",
    "stat": 0.00101200002245605
  },
  {
    "type": "WM",
    "error": "No WM found",
    "stat": 0.0006960001774132252
  },
  {
    "type": "WMTheme",
    "error": "WM Theme needs successful WM detection",
    "stat": 0.0010969999711960554
  },
  {
    "type": "Theme",
    "error": "Theme isn't supported in TTY",
    "stat": 0.0007159998640418053
  },
  {
    "type": "Icons",
    "error": "Icons aren't supported in TTY",
    "stat": 0.00043800007551908493
  },
  {
    "type": "Font",
    "error": "Font isn't supported in TTY",
    "stat": 0.0009579998441040516
  },
  {
    "type": "Cursor",
    "error": "Cursor isn't supported in TTY",
    "stat": 0.001184999942779541
  },
  {
    "type": "Wallpaper",
    "error": "Failed to detect the current wallpaper path",
    "stat": 0.020573999965563416
  },
  {
    "type": "Terminal",
    "result": {
      "processName": "sshd",
      "exe": "sshd: df1050@pts/0",
      "exeName": "0",
      "exePath": "",
      "pid": 2317,
      "ppid": 2311,
      "prettyName": "/dev/pts/0",
      "version": "",
      "tty": "/dev/pts/0"
    },
    "stat": 0.04280699999071658
  },
  {
    "type": "TerminalFont",
    "error": "Unknown terminal: sshd",
    "stat": 0.002196999965235591
  },
  {
    "type": "TerminalSize",
    "result": {
      "columns": 252,
      "rows": 61,
      "width": 640,
      "height": 480
    },
    "stat": 0.0013510000426322222
  },
  {
    "type": "TerminalTheme",
    "error": "Failed to detect terminal theme",
    "stat": 100.1373059998732
  },
  {
    "type": "CPU",
    "result": {
      "cpu": "General Purpose",
      "vendor": "GenuineIntel",
      "packages": 1,
      "cores": {
        "physical": 1,
        "logical": 2,
        "online": 2
      },
      "frequency": {
        "base": 2600,
        "max": 0
      },
      "coreTypes": [],
      "temperature": null
    },
    "stat": 0.08759699994698167
  },
  {
    "type": "CPUCache",
    "result": {
      "l1": [
        {
          "size": 49152,
          "num": 1,
          "lineSize": 64,
          "type": "data"
        },
        {
          "size": 32768,
          "num": 1,
          "lineSize": 64,
          "type": "instruction"
        }
      ],
      "l2": [
        {
          "size": 1310720,
          "num": 1,
          "lineSize": 64,
          "type": "unified"
        }
      ],
      "l3": [
        {
          "size": 44040192,
          "num": 1,
          "lineSize": 64,
          "type": "unified"
        }
      ]
    },
    "stat": 0.20216399990022182
  },
  {
    "type": "CPUUsage",
    "result": [
      0.0,
      0.0
    ],
    "stat": 200.1168680000119
  },
  {
    "type": "GPU",
    "result": [
      {
        "index": null,
        "coreCount": null,
        "coreUsage": null,
        "memory": {
          "dedicated": {
            "total": null,
            "used": null
          },
          "shared": {
            "total": null,
            "used": null
          },
          "type": null
        },
        "driver": "cirrus",
        "name": "GD 5446",
        "temperature": null,
        "type": "Unknown",
        "vendor": "Cirrus Logic",
        "platformApi": "DRM (card0)",
        "frequency": 0,
        "deviceId": 20
      }
    ],
    "stat": 0.892176000168547
  },
  {
    "type": "Memory",
    "result": {
      "total": 479043584,
      "used": 138375168
    },
    "stat": 0.014276999980211258
  },
  {
    "type": "PhysicalMemory",
    "error": "Failed to get SMBIOS data",
    "stat": 0.006892000092193484
  },
  {
    "type": "Swap",
    "result": {
      "total": 0,
      "used": 0
    },
    "stat": 0.007579999975860119
  },
  {
    "type": "Disk",
    "result": [
      {
        "bytes": {
          "available": 17050095616,
          "free": 18033082368,
          "total": 21023531008,
          "used": 2990448640
        },
        "files": {
          "total": 1310720,
          "used": 54170
        },
        "filesystem": "ext4",
        "mountpoint": "/",
        "mountFrom": "/dev/vda1",
        "name": "",
        "volumeType": [
          "Regular"
        ],
        "createTime": "2024-07-07T14:26:50.000+0800"
      }
    ],
    "stat": 0.11862299987114966
  },
  {
    "type": "Btrfs",
    "error": "opendir(\"/sys/fs/btrfs\") == NULL",
    "stat": 0.003446000162512064
  },
  {
    "type": "Zpool",
    "error": "dlopen libzfs.so failed",
    "stat": 0.08970999997109175
  },
  {
    "type": "Battery",
    "result": [],
    "stat": 0.005570000037550926
  },
  {
    "type": "PowerAdapter",
    "result": [],
    "stat": 0.003244000021368265
  },
  {
    "type": "Player",
    "error": "Player module is an alias of Media module",
    "stat": 0.0003440000582486391
  },
  {
    "type": "Media",
    "error": "No media found",
    "stat": 1.2478859999682754
  },
  {
    "type": "PublicIp",
    "result": {
      "ip": "[DATA ERASED]",
      "location": "Hong Kong, HK"
    },
    "stat": 0.055570000084117055
  },
  {
    "type": "LocalIp",
    "result": [
      {
        "name": "eth0",
        "defaultRoute": true,
        "ipv4": "192.168.2.178/20",
        "ipv6": "fe80::3944:4fef:4f81:6c9c/64",
        "mac": "fa:16:3e:3c:96:46",
        "mtu": 1500,
        "speed": -1,
        "flags": "UP,BROADCAST,RUNNING,MULTICAST,LOWER_UP"
      }
    ],
    "stat": 0.06239700014702976
  },
  {
    "type": "DNS",
    "result": [
      "100.125.1.250"
    ],
    "stat": 0.013176999986171722
  },
  {
    "type": "Wifi",
    "result": [],
    "stat": 0.023723000194877386
  },
  {
    "type": "DateTime",
    "result": "2025-04-05T02:19:58.416+0800",
    "stat": 0.007012000074610114
  },
  {
    "type": "Locale",
    "result": "zh_CN.UTF-8",
    "stat": 0.0006979999598115683
  },
  {
    "type": "Vulkan",
    "error": "dlopen libvulkan.so failed",
    "stat": 0.059425999876111746
  },
  {
    "type": "OpenGL",
    "error": "dlopen glx failed",
    "stat": 0.07728299987502396
  },
  {
    "type": "OpenCL",
    "error": "dlopen libOpenCL.so failed",
    "stat": 0.03312400006689131
  },
  {
    "type": "Users",
    "result": [
      {
        "name": "df1050",
        "hostName": "[DATA ERASED]",
        "sessionName": "pts/0",
        "clientIp": "[DATA ERASED]",
        "loginTime": "2025-04-05T01:56:40.010+0800"
      }
    ],
    "stat": 0.033648999873548746
  },
  {
    "type": "Bluetooth",
    "result": [],
    "stat": 0.002247000113129616
  },
  {
    "type": "BluetoothRadio",
    "error": "Failed to open /sys/class/bluetooth",
    "stat": 0.0021780000533908606
  },
  {
    "type": "Sound",
    "error": "Failed to load libpulse.so",
    "stat": 0.024191000033169985
  },
  {
    "type": "Camera",
    "result": [],
    "stat": 0.0036219998728483915
  },
  {
    "type": "Gamepad",
    "result": [],
    "stat": 0.010107999900355935
  },
  {
    "type": "Mouse",
    "result": [
      {
        "serial": "28754-0000:00:01.2-1",
        "name": "QEMU QEMU USB Tablet"
      },
      {
        "serial": "",
        "name": "VirtualPS/2 VMware VMMouse"
      },
      {
        "serial": "",
        "name": "VirtualPS/2 VMware VMMouse"
      }
    ],
    "stat": 0.059240000089630485
  },
  {
    "type": "Keyboard",
    "result": [
      {
        "serial": "",
        "name": "AT Translated Set 2 keyboard"
      }
    ],
    "stat": 0.02528199995867908
  },
  {
    "type": "Weather",
    "result": "-1°C - Sunny (not found)",
    "stat": 358.35416899994016
  },
  {
    "type": "NetIO",
    "result": [
      {
        "name": "eth0",
        "defaultRoute": true,
        "txBytes": 609,
        "rxBytes": 902,
        "txPackets": 7,
        "rxPackets": 8,
        "rxErrors": 0,
        "txErrors": 0,
        "rxDrops": 0,
        "txDrops": 0
      }
    ],
    "stat": 335.1577300000936
  },
  {
    "type": "DiskIO",
    "result": [
      {
        "name": "0x1af4 ",
        "devPath": "/dev/vda",
        "bytesRead": 0,
        "bytesWritten": 0,
        "readCount": 0,
        "writeCount": 0
      }
    ],
    "stat": 0.06542899995110929
  },
  {
    "type": "PhysicalDisk",
    "result": [
      {
        "name": "0x1af4",
        "devPath": "/dev/vda",
        "interconnect": "",
        "kind": "HDD",
        "size": 21474836480,
        "serial": "",
        "removable": false,
        "readOnly": false,
        "revision": "",
        "temperature": null
      }
    ],
    "stat": 0.07764200004749
  },
  {
    "type": "TPM",
    "error": "TPM device is not found",
    "stat": 0.0037670000456273556
  },
  {
    "type": "Version",
    "result": {
      "projectName": "fastfetch",
      "sysName": "Linux",
      "architecture": "x86_64",
      "version": "2.40.1",
      "versionGit": "",
      "cmakeBuiltType": "RelWithDebInfo",
      "compileTime": "Apr  3 2025, 16:51:01",
      "compiler": "gcc 9.4.0",
      "debugMode": false,
      "libc": "glibc 2.31"
    },
    "stat": 0.0020719999447464943
  },
  {
    "type": "Break",
    "error": "Unsupported for JSON format",
    "stat": 0.0005140001885592937
  },
  {
    "type": "Colors",
    "error": "Unsupported for JSON format",
    "stat": 0.0006430000066757202
  }
]

Features built-in

df1050@hcss-ecs-9fec:~$ fastfetch --list-features
threads
vulkan
wayland
xcb-randr
xrandr
drm
drm_amdgpu
gio
dconf
dbus
imagemagick7
imagemagick6
chafa
zlib
xfconf
sqlite3
rpm
egl
glx
opencl
libpulse
libddcutil
libelf
libzfs
Directx Headers
linux/videodev2
linux/wireless
Embedded pciids
@gdr2333 gdr2333 added the bug Something isn't working label Apr 4, 2025
@CarterLi
Copy link
Member

CarterLi commented Apr 5, 2025

What do readlink /sys/block/vda/device and realpath /sys/block/vda/device print?

@gdr2333
Copy link
Author

gdr2333 commented Apr 5, 2025

What do readlink /sys/block/vda/device and realpath /sys/block/vda/device print?

df1050@hcss-ecs-9fec:~$ readlink /sys/block/vda/device
../../../virtio3
df1050@hcss-ecs-9fec:~$ realpath /sys/block/vda/device
/sys/devices/pci0000:00/0000:00:05.0/0000:02:01.0/virtio3

Yeah, it says virtio

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

2 participants