fastfetch-cli / fastfetch

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

[BUG] terminal reports "screen" instead of "alacritty" when $TERM set to "screen-256color", neithere it detects wifi when using dhcpcd + wpa_supplicant #811

Closed je-vv closed 6 months ago

je-vv commented 6 months ago

General description of bug:

On neofetch this doesn't happen, it properly detects alacritty:

Terminal: alacritty

Also, fastfetch it's not detecting wifi:

  {
    "type": "Wifi",
    "error": "No Wifi interfaces found",
    "stat": 27
  },

Though I don't use network manager, neither I use iw/iwd... I just use plain wpa_supplicant and dhcpcd.

Screenshot:

                   '                       ...@...
                  'o'                      -----------
                 'ooo'                     OS: Artix Linux x86_64
                'ooxoo'                    Host: HP ZBook 15 G6
               'ooxxxoo'                   Kernel: 6.8.7-artix1-1
              'oookkxxoo'                  Uptime: 3 days, 8 hours, 40 mins
             'oiioxkkxxoo'                 Packages: 2421 (pacman)
            ':;:iiiioxxxoo'                Shell: bash 5.2.26
               `'.;::ioxxoo'               Display (HP V24i): 1920x1080 @ 60Hz (as 1280x720) [External]
          '-.      `':;jiooo'              WM: Wayfire (Wayland)
         'oooio-..     `'i:io'             Theme: Materia-dark [GTK2/3/4]
        'ooooxxxxoio:,.   `'-;'            Icons: Papirus-Dark [GTK2/3/4]
       'ooooxxxxxkkxoooIi:-.  `'           Cursor: Adwaita
      'ooooxxxxxkkkkxoiiiiiji'             Terminal: screen
     'ooooxxxxxkxxoiiii:'`     .i'         CPU: Intel(R) Core(TM) i7-9850H (12) @ 4.60 GHz
    'ooooxxxxxoi:::'`       .;ioxo'        GPU: Intel UHD Graphics 630 @ 1.15 GHz
   'ooooxooi::'`         .:iiixkxxo'       Memory: 6.75 GiB / 15.43 GiB (44%)
  'ooooi:'`                `'';ioxxo'      Swap: 4.20 GiB / 16.60 GiB (25%)
 'i:'`                          '':io'     Disk (/): 295.60 GiB / 467.38 GiB (63%) - ext4
'`                                   `'    Disk (/uefi): 42.43 MiB / 510.98 MiB (8%) - vfat
                                           Local IP (<interface>): <IP> *
                                           Battery: 97% [AC Connected]
                                           Locale: en_US.UTF-8

                                           ████████████████████████
                                           ████████████████████████

The content of the configuration file you use (if any):

None

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

Output of fastfetch --list-features:

threads
vulkan
wayland
xcb-randr
xcb
xrandr
x11
drm
gio
dconf
dbus
imagemagick7
chafa
zlib
xfconf
egl
glx
osmesa
opencl
libpulse
libnm
libddcutil
videodev2
Directx Headers
Proprietary GPU driver API
System yyjson
CarterLi commented 6 months ago

Terminal: screen

It is expected. For other terminal multiplexor like tmux you can't detect the real terminal. For screen you can detect the real terminal because screen doesn't use daemon process, I just report screen to be consistant with other multiplexors.

CarterLi commented 6 months ago

Also, fastfetch it's not detecting wifi

What does ifconfig print?

je-vv commented 6 months ago

Terminal: screen

It is expected. For other terminal multiplexor like tmux you can't detect the real terminal. For screen you can detect the real terminal because screen doesn't use daemon process, I just report screen to be consistant with other multiplexors.

Ohh that's what you prefer, so on purpose. Not that I agree, but I understand then.

je-vv commented 6 months ago

Also, fastfetch it's not detecting wifi

What does ifconfig print?

in-wired-0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 38:22:e2:2a:bb:96  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 16  memory 0xe9200000-e9220000

in-wireless-0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet <...>  netmask <...>  broadcast <...>
        inet6 <...>  prefixlen 64  scopeid 0x20<link>
        ether <...>  txqueuelen 1000  (Ethernet)
        RX packets 18829351  bytes 20986377019 (19.5 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 10052341  bytes 1618699492 (1.5 GiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 177217  bytes 18819411 (17.9 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 177217  bytes 18819411 (17.9 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

...

Those are the fixed names assigned to the interfaces, the NIC/eth one and the wireless one... Not sure if expecting only certain pattern in the wireless interface to detect wifi...

CarterLi commented 6 months ago

Not sure if expecting only certain pattern in the wireless interface to detect wifi...

No we don't.

What does iw dev and ls -l /sys/class/net/*/phy80211 print?

je-vv commented 6 months ago
% iw dev
phy#0
        Unnamed/non-netdev interface
                wdev 0x2
                addr <...>
                type P2P-device
        Interface in-wireless-0
                ifindex 3
                wdev 0x1
                addr <...>
                type managed
                channel 153 (5765 MHz), width: 80 MHz, center1: 5775 MHz
                txpower 22.00 dBm
                multicast TXQ:
                        qsz-byt qsz-pkt flows   drops   marks   overlmt hashcol tx-bytes        tx-packets
                        0       0       0       0       0       0       0       0               0

% ls -l /sys/class/net/*/phy80211
lrwxrwxrwx 1 root root 0 Apr 26 02:53 /sys/class/net/in-wireless-0/phy80211 -> ../../ieee80211/phy0/
CarterLi commented 6 months ago

Can you try the latest dev build? you may download it here: https://github.com/fastfetch-cli/fastfetch/actions/runs/8847532032

CarterLi commented 6 months ago

No more information, closing

je-vv commented 6 months ago

wow, @CarterLi that was just too fast, hahaha. I didn't have time to test a later build before.

I build/install the AUR fastfetch-git package, which is currently using head of the dev branch:

git+https://github.com/fastfetch-cli/fastfetch.git#branch=dev

And guess what, wifi does work with it:

  {
    "type": "Wifi",
    "result": [
      {
        "inf": {
          "description": "in-wireless-0",
          "status": "up"
        },
        "conn": {
          "status": "",
          "ssid": "<my_ssid>",
          "bssid": "<my_bssid>",
          "protocol": "",
          "security": "",
          "signalQuality": 88.0,
          "rxRate": null,
          "txRate": null
        }
      }
    ],
    "stat": 16
  },

Strange it doesn't show up when calling fastfetch, but now I see wifi and its signal strenght is detected...

Thanks !

CarterLi commented 6 months ago

Please try fastfetch -s wifi --show-errors

je-vv commented 6 months ago
%  fastfetch -s wifi --show-errors
                   '                       Wifi: <my_ssid>
                  'o'
                 'ooo'
                'ooxoo'
               'ooxxxoo'
              'oookkxxoo'
             'oiioxkkxxoo'
            ':;:iiiioxxxoo'
               `'.;::ioxxoo'
          '-.      `':;jiooo'
         'oooio-..     `'i:io'
        'ooooxxxxoio:,.   `'-;'
       'ooooxxxxxkkxoooIi:-.  `'
      'ooooxxxxxkkkkxoiiiiiji'
     'ooooxxxxxkxxoiiii:'`     .i'
    'ooooxxxxxoi:::'`       .;ioxo'
   'ooooxooi::'`         .:iiixkxxo'
  'ooooi:'`                `'';ioxxo'
 'i:'`                          '':io'
'`                                   `'
%

There my ssid shows up, :), no additional info, but it shows up...