fastfetch-cli / fastfetch

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

[MacBook Pro][Linux] `Host: MacBookPro14,1 (1.0)` #537

Closed osalbahr closed 1 year ago

osalbahr commented 1 year ago

General description of bug:

I don't know. But I did noticed the bug doesn't occur on macOS using the same version:

% fastfetch | grep 'Host\|OS'
OS: macOS Ventura 13.5.1 22G90 x86_64
Host: MacBook Pro (13-inch, 2017, Two Thunderbolt 3 ports)
brew install fastfetch

I don't know how to use the latest dev build.

Often helpful information:

Output of env NO_CONFIG=1 fastfetch --load-config all --show-errors --stat --multithreading false --disable-linewrap false --hide-cursor false:

             .',;::::;,'.                 dracula@fedora                                                                    0ms
         .';:cccccccccccc:;,.             --------------                                                                    0ms
      .;cccccccccccccccccccccc;.          OS: Fedora Linux 38 (Silverblue) x86_64                                           0ms
    .:cccccccccccccccccccccccccc:.        Host: MacBookPro14,1 (1.0)                                                        1ms
  .;ccccccccccccc;.:dddl:.;ccccccc;.      Bios: 515.0.0.0.0 (0.1)                                                           0ms
 .:ccccccccccccc;OWMKOOXMWd;ccccccc:.     Board: Mac-B4831CEBD52A0C4C (MacBookPro14,1)                                      0ms
.:ccccccccccccc;KMMc;cc;xMMc;ccccccc:.    Chassis: Laptop (Mac-B4831CEBD52A0C4C)                                            0ms
,cccccccccccccc;MMM.;cc;;WW:;cccccccc,    Kernel: 6.4.11-200.fc38.x86_64                                                    0ms
:cccccccccccccc;MMM.;cccccccccccccccc:    Uptime: 8 mins                                                                    0ms
:ccccccc;oxOOOo;MMM000k.;cccccccccccc:    Processes: 1029                                                                   0ms
cccccc;0MMKxdd:;MMMkddc.;cccccccccccc;    Packages: 1478 (rpm), 31 (flatpak), 139 (brew)                                  177ms
ccccc;XMO';cccc;MMM.;cccccccccccccccc'    Shell: bash 5.2.15                                                              106ms
ccccc;MMo;ccccc;MMW.;ccccccccccccccc;     Display (Color LCD): 2560x1600 @ 60Hz (as 1280x800)                             168ms
ccccc;0MNc.ccc.xMMd;ccccccccccccccc;      Brightness (acpi_video0): 17%                                                     1ms
cccccc;dNMWXXXWM0:;cccccccccccccc:,       Monitor (Color LCD): 2560x1600 px - 286x179 mm (13.28 inches, 227.27 ppi)         1ms
cccccccc;.:odl:.;cccccccccccccc:,.        LM: gdm-password 44.1 (Wayland)                                                  16ms
ccccccccccccccccccccccccccccc:'.          DE: Gnome 44.3                                                                    0ms
:ccccccccccccccccccccccc:;,..             WM: Mutter (Wayland)                                                              0ms
 ':cccccccccccccccc::;,.                  WM Theme: Adwaita                                                                14ms
                                          Theme: Adwaita [GTK2/3/4]                                                         0ms
                                          Icons: Adwaita [GTK2/3/4]                                                         0ms
                                          Font: Cantarell (11pt) [GTK2/3/4]                                                 0ms
                                          Cursor: Adwaita (24px)                                                            0ms
                                          Wallpaper: f38-01-day.png                                                         0ms
                                          Terminal: gnome-terminal 3.48.1                                                   0ms
                                          Terminal Font: Source Code Pro (10pt)                                             0ms
                                          Terminal Size: 128 columns x 24 rows (1024px x 432px)                            31ms
                                          CPU: Intel(R) Core(TM) i5-7360U (4) @ 3.6 GHz                                     1ms
                                          CPU Usage: 60%                                                                    0ms
                                          GPU: Intel(R) Iris(R) Plus Graphics 640 (Kaby Lake GT3e) (KBL GT3) [Integrated] 144ms
                                          Memory: 2.88 GiB / 7.61 GiB (38%)                                                 0ms
                                          Swap: 8.25 MiB / 7.61 GiB (0%)                                                    0ms
                                          Disk (/sysroot): 31.99 GiB / 44.96 GiB (71%) - btrfs                              2ms
                                          Battery: 44% [Discharging]                                                        1ms
                                          Power Adapter: Not supported on this platform                                     0ms
                                          Media Player: No media found                                                      7ms
                                          Media: No media found                                                             0ms
                                          Public IP: 152.7.255.235 (Raleigh, US)                                           69ms
                                          Local IP (wlp2s0): 10.137.6.251 *                                                 0ms
                                          Wifi: eduroam                                                                     3ms
                                          Date & Time: 2023-08-24 19:12:34                                                  0ms
                                          Locale: en_US.UTF-8                                                               1ms
                                          Vulkan: 1.3.243 - Intel open-source Mesa driver [Mesa 23.1.6]                     0ms
                                          OpenGL: 4.6 (Compatibility Profile) Mesa 22.3.6                                 160ms
                                          OpenCL: Fastfetch was build without OpenCL support                                0ms
                                          Users: dracula                                                                    0ms
                                          Bluetooth: Failed to connect to DBus                                              1ms
                                          Sound: Dummy Output (46%)                                                        26ms
                                          Gamepad: No devices detected                                                      0ms
                                          Weather: +94°F - Partly cloudy (Raleigh, North Carolina, United States)         252ms
                                          Version: fastfetch 2.0.3 (x86_64)                                                 0ms
                                                                                                                            0ms
                                          ████████████████████████
                                          ████████████████████████                                                          0ms

Output of fastfetch --list-features:

threads
vulkan
wayland
xcb-randr
xcb
xrandr
x11
gio
dbus
imagemagick7
chafa
zlib
sqlite3
rpm
egl
libpulse
libddcutil
CarterLi commented 1 year ago

That's expected. SMBIOS reports model name ( that's MacBookPro14,1 ) and we convert it to product name only for macOS. Neofetch does the same

However with Asahi Linux getting more and more popular, we may do it for Linux too, if one can confirm that Asahi Linux reports the same model name as macOS does.

osalbahr commented 1 year ago

I think Neofetch fails to "beautify" the model name in this switch statement because of the model+=' 1.0' (logs) but not 100% sure.

CarterLi commented 1 year ago

Did you see this line? https://github.com/hykilpikonna/hyfetch/blob/b353cb724762b17a93d2b8ac189a82a1b471aacc/neofetch#L1514

osalbahr commented 1 year ago

I did. But the logs I linked above show that https://github.com/hykilpikonna/hyfetch/blob/b353cb724762b17a93d2b8ac189a82a1b471aacc/neofetch#L1527 is somehow still reached which puzzles me a bit.

CarterLi commented 1 year ago

Impossible. The log shows OS: Fedora Linux 38.20230821.0 (Silverblue) x86_64 but not OS: macOS or something.

osalbahr commented 1 year ago

I got + case $model in by running neofetch -vv 2>neofetch.log. Am I misinterpreting what the log means? I thought any line that starts with + is a line being executed by bash.

CarterLi commented 1 year ago

Just add a line echo $os to the content of neofetch and see what it prints

osalbahr commented 1 year ago

Oh.... yeah you're absolutely right. I missed that there's a second case $model in.

$ git diff
diff --git a/neofetch b/neofetch
index 5eecbe63..3700340b 100755
--- a/neofetch
+++ b/neofetch
@@ -1524,6 +1524,7 @@ get_model() {
                     model=$(sysctl -n hw.model)
                 fi

+                echo "HERE $model 1"
                 case $model in
                     Mac14,15):              "MacBook Air (15-inch, M2, 2023)" ;;
                     Mac14,14):              "Mac Studio (M2 Max, 2023)" ;;
@@ -1768,6 +1769,7 @@ get_model() {
     model=${model//All Series}
     model=${model//�}

+    echo "HERE $model 2"
     case $model in
         "Standard PC"*) model="KVM/QEMU (${model})" ;;
         OpenBSD*)       model="vmm ($model)" ;;
$ ./neofetch 
             .',;::::;,'.                dracula@fedora 
         .';:cccccccccccc:;,.            -------------- 
      .;cccccccccccccccccccccc;.         OS: Fedora Linux 38.20230824.0 (Silverblue) x86_64 
HERE MacBookPro14,1 1.0 2ccccccc:.
  .;ccccccccccccc;.:dddl:.;ccccccc;.     Host: MacBookPro14,1 1.0 
 .:ccccccccccccc;OWMKOOXMWd;ccccccc:.    Kernel: 6.4.11-200.fc38.x86_64 
.:ccccccccccccc;KMMc;cc;xMMc;ccccccc:.   Uptime: 10 mins 
,cccccccccccccc;MMM.;cc;;WW:;cccccccc,   Packages: 1480 (rpm), 139 (brew), 30 (flatpak-system) 
:cccccccccccccc;MMM.;cccccccccccccccc:   Shell: bash 5.2.15 
:ccccccc;oxOOOo;MMM0OOk.;cccccccccccc:   Resolution: 2560x1600 
cccccc;0MMKxdd:;MMMkddc.;cccccccccccc;   DE: GNOME 44.3 (wayland) 
ccccc;XM0';cccc;MMM.;cccccccccccccccc'   WM: Mutter 
ccccc;MMo;ccccc;MMW.;ccccccccccccccc;    WM Theme: Adwaita 
ccccc;0MNc.ccc.xMMd;ccccccccccccccc;     Theme: Adwaita [GTK2/3] 
cccccc;dNMWXXXWM0:;cccccccccccccc:,      Icons: Adwaita [GTK2/3] 
cccccccc;.:odl:.;cccccccccccccc:,.       Terminal: gnome-terminal 
:cccccccccccccccccccccccccccc:'.         CPU: Intel i5-7360U (4) @ 3.600GHz 
.:cccccccccccccccccccccc:;,..            GPU: Intel Iris Plus Graphics 640 
  '::cccccccccccccc::;,.                 Memory: 2326.57 MiB / 7793.02 MiB 
CarterLi commented 1 year ago

I'm curious what does mount -l print?

osalbahr commented 1 year ago

Sure. I'm curious to know what made you curious.

$ mount -l
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime,seclabel)
devtmpfs on /dev type devtmpfs (rw,nosuid,seclabel,size=4096k,nr_inodes=986109,mode=755,inode64)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,seclabel,inode64)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,seclabel,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,seclabel,size=1596012k,nr_inodes=819200,mode=755,inode64)
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,seclabel,nsdelegate,memory_recursiveprot)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime,seclabel)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
bpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
ramfs on /run/credentials/systemd-vconsole-setup.service type ramfs (ro,nosuid,nodev,noexec,relatime,seclabel,mode=700)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
/dev/mapper/luks-ecdf3111-d8f8-4148-a323-53da903d831f on /sysroot type btrfs (ro,relatime,seclabel,compress=zstd:1,ssd,space_cache=v2,subvolid=258,subvol=/root)
/dev/mapper/luks-ecdf3111-d8f8-4148-a323-53da903d831f on / type btrfs (rw,relatime,seclabel,compress=zstd:1,ssd,space_cache=v2,subvolid=258,subvol=/root)
/dev/mapper/luks-ecdf3111-d8f8-4148-a323-53da903d831f on /etc type btrfs (rw,relatime,seclabel,compress=zstd:1,ssd,space_cache=v2,subvolid=258,subvol=/root)
/dev/mapper/luks-ecdf3111-d8f8-4148-a323-53da903d831f on /usr type btrfs (ro,relatime,seclabel,compress=zstd:1,ssd,space_cache=v2,subvolid=258,subvol=/root)
/dev/mapper/luks-ecdf3111-d8f8-4148-a323-53da903d831f on /sysroot/ostree/deploy/fedora/var type btrfs (rw,relatime,seclabel,compress=zstd:1,ssd,space_cache=v2,subvolid=258,subvol=/root)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,nosuid,noexec,relatime)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=33,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=19705)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,seclabel,pagesize=2M)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime,seclabel)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime,seclabel)
tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime,seclabel)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
ramfs on /run/credentials/systemd-sysctl.service type ramfs (ro,nosuid,nodev,noexec,relatime,seclabel,mode=700)
ramfs on /run/credentials/systemd-tmpfiles-setup-dev.service type ramfs (ro,nosuid,nodev,noexec,relatime,seclabel,mode=700)
/dev/mapper/luks-ecdf3111-d8f8-4148-a323-53da903d831f on /var type btrfs (rw,relatime,seclabel,compress=zstd:1,ssd,space_cache=v2,subvolid=256,subvol=/var)
/dev/nvme0n1p4 on /boot type ext4 (rw,relatime,seclabel)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,seclabel,size=3990024k,nr_inodes=1048576,inode64)
/dev/mapper/luks-ecdf3111-d8f8-4148-a323-53da903d831f on /var/home type btrfs (rw,relatime,seclabel,compress=zstd:1,ssd,space_cache=v2,subvolid=257,subvol=/home)
/dev/nvme0n1p3 on /boot/efi type hfsplus (rw,relatime,umask=22,uid=0,gid=0,nls=utf8)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)
ramfs on /run/credentials/systemd-tmpfiles-setup.service type ramfs (ro,nosuid,nodev,noexec,relatime,seclabel,mode=700)
ramfs on /run/credentials/systemd-resolved.service type ramfs (ro,nosuid,nodev,noexec,relatime,seclabel,mode=700)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,seclabel,size=798004k,nr_inodes=199501,mode=700,uid=1000,gid=1000,inode64)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
portal on /run/user/1000/doc type fuse.portal (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
CarterLi commented 1 year ago

The Disk module didn't print the information of /, maybe it's because / comes after /sysroot

CarterLi commented 1 year ago

Works as expected