Skip to content

macOS: native display resolution reported incorrectly (when using a scaled resolution, very common on macOS) #512

@rxhfcy

Description

@rxhfcy

General description of bug:

  • What happened:
    fastfetch doesn't report the native display resolution correctly on macOS

I tried multiple different (scaled) resolutions on 2 different computers on 2 different macOS versions (macOS 14 beta and macOS 13)

Looks like "Display:" is using "scaled as" x 2 instead of the native resolution (when using a scaled resolution which is the default behavior on macOS).

Some examples:
(M1 MacBook Air (2020), the native resolution of the built-in display is 2560x1600)

scaled to look like 1024x640 (in System Settings / Displays):

Display: 2048x1280 @ 60Hz (as 1024x640)

"as 1280x800"
(now "Display: 2560x1600" is reported correctly, probably because it happens to be scaled x 2):

Display: 2560x1600 @ 60Hz (as 1280x800)

"as 1440x900" (I believe this is the default setting for M1 MacBook Air laptops):

Display: 2880x1800 @ 60Hz (as 1440x900)

"as 1680x1050":

Display: 3360x2100 @ 60Hz (as 1680x1050)

From the other computer (as 1920x1080, as 2560x1440, as 3008x1692, as 3360x1890, as 3840x2160 (native)
Native resolution of the monitor: 3840x2160

Display: 3840x2160 @ 60Hz (as 1920x1080)
Display: 5120x2880 @ 60Hz (as 2560x1440)
Display: 6016x3384 @ 60Hz (as 3008x1692)
Display: 6720x3780 @ 60Hz (as 3360x1890)
Display: 3840x2160 @ 60Hz 

PS. I also tried on neofetch, which always (only) shows the scaled resolution, unless you "brew uninstall --ignore-dependencies screenresolution" (after that neofetch only shows the native resolution)

  • What should happen:
    Should show the correct native resolution. I normally use "1440x900" so in my case it should be:
Display: 2560x1600 @ 60Hz (as 1440x900)
  • Did it work in an older version: didn't test
  • Where did you get the binary: homebrew ("brew install fastfetch")
  • Does this issue still occurs in the latest dev build? didn't test

Often helpful information:

Output of fastfetch --version:

fastfetch 1.12.2 (aarch64)

(clip)If this isn't possible (or too much work) for you, post the output of env NO_CONFIG=1 fastfetch --show-errors --stat --multithreading false --disable-linewrap false --hide-cursor false.

                     c.'          x@x.local                                                       0ms
                 ,xNMM.           --------------                                                       0ms
               .OMMMMo            OS: macOS Sonoma 14.0 23A5301h arm64                                 0ms
               lMM"               Host: MacBook Air (M1, 2020)                                         0ms
     .;loddo:.  .olloddol;.       Kernel: 23.0.0                                                       0ms
   cKMMMMMMMMMMNWMMMMMMMMMM0:     Uptime: 4 days, 13 hours, 44 mins                                    0ms
 .KMMMMMMMMMMMMMMMMMMMMMMMWd.     Packages: 91 (brew), 6 (brew-cask)                                   0ms
 XMMMMMMMMMMMMMMMMMMMMMMMX.       Shell: bash 5.2.15                                                   7ms
;MMMMMMMMMMMMMMMMMMMMMMMM:        Display: 2880x1800 @ 60Hz (as 1440x900)                             69ms
:MMMMMMMMMMMMMMMMMMMMMMMM:        DE: Aqua                                                             0ms
.MMMMMMMMMMMMMMMMMMMMMMMMX.       WM: Quartz Compositor                                                0ms
 kMMMMMMMMMMMMMMMMMMMMMMMMWd.     WM Theme: Blue (Dark)                                                0ms
 'XMMMMMMMMMMMMMMMMMMMMMMMMMMk    Theme: Not supported on this platform                                0ms
  'XMMMMMMMMMMMMMMMMMMMMMMMMK.    Icons: Not supported on this platform                                0ms
    kMMMMMMMMMMMMMMMMMMMMMMd      Font: .AppleSystemUIFont [System], Helvetica [User]                  4ms
     ;KMMMMMMMWXXWMMMMMMMk.       Cursor: Fill - Black, Outline - White (42px)                         0ms
       "cooc*"    "*coo'"         Terminal: iTerm 3.5.20230805-nightly                                 0ms
                                  Terminal Font: JetBrainsMonoNF-Regular (14pt)                        1ms
                                  CPU: Apple M1 (8)                                                    0ms
                                  GPU: Apple M1 (7)                                                    2ms
                                  Memory: 7.62 GiB / 16.00 GiB (47%)                                   0ms
                                  Disk (/): 162 GiB / 210 GiB (77%)
                                  Disk (/Volumes/x): 1.85 GiB / 2.33 GiB (79%)                3ms
                                  Battery: 93%                                                         1ms
                                  Power Adapter: not connected                                         0ms
                                  Locale: en_US.UTF-8                                                  0ms
                                                                                                       0ms
                                  ████████████████████████
                                  ████████████████████████                                             0ms

Output of fastfetch --list-features:

threads
vulkan
imagemagick7
chafa
zlib
sqlite3

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions