Open ApolloBian opened 6 years ago
It's the get_resolution
func that needs to be fixed
I'm not sure what went wrong here.
Both show 3840 x 2160.
@konimex the refresh rate is wrong, it shows @4kHz
Can you provide a full log?
Also, can you provide a text output (not image screenshot) of system_profiler SPDisplaysDataType
)? The awk is a bit.. broken here. I guess.
Ah, looks like the output of system_profiler SPDisplaysDataType
changed in Mojave. Like, breakingly different it seems. We'll need to add a check for Mojave to fix this one I think
I don't have a Retina Mac with Mojave on it unfortunately though so it'll be blind awk repair
@konimex Here is the full output of system_profiler SPDisplaysDataType
:
Graphics/Displays:
Intel Iris Pro:
Chipset Model: Intel Iris Pro
Type: GPU
Bus: Built-In
VRAM (Dynamic, Max): 1536 MB
Vendor: Intel
Device ID: 0x0d26
Revision ID: 0x0008
Metal: Supported, feature set macOS GPUFamily1 v4
Displays:
DELL U2718Q:
Resolution: 3840 x 2160 (2160p 4K UHD - Ultra High Definition)
UI Looks like: 1920 x 1080 @ 60 Hz
Framebuffer Depth: 24-Bit Color (ARGB8888)
Display Serial Number: 5DWRH7AU05LL
Main Display: Yes
Mirror: Off
Online: Yes
Rotation: Supported
Automatically Adjust Brightness: No
Connection Type: DisplayPort
DELL U2718Q:
Resolution: 2160 x 3840
UI Looks like: 1080 x 1920 @ 60 Hz
Framebuffer Depth: 24-Bit Color (ARGB8888)
Display Serial Number: 5DWRH7AQ12UL
Mirror: Off
Online: Yes
Rotation: 90
Automatically Adjust Brightness: No
Connection Type: DisplayPort
Hope it helps!
@iandrewt I'm seeing the wrong resolution on High Sierra.
ping @iandrewt
@iandrewt I have the same issue as @strafe with the wrong resolution My MacBook Pro 15" has a real resolution of 2880x1800
Seems to be a problem with screenresolution
rather than neofetch.
After running brew uninstall --ignore-dependencies screenresolution
the fallback to system_profiler
's output is accurate, although as mentioned in the changelog where screenresolution
was introduced, there is a noticeable pause before the resolution is printed.
@Omega1902 are you running at 1440x900@2x?
Also, I'm pretty sure the 13" MacBook Pro defaults to 1440x900@2x now instead of 1280x800@2x like on pre-2016 models. The 15" is similar, defaulting to 1680x1050@2x instead of 1440x900@2x.
@dylanaraps are we intending to show the "UI Looks Like" or "Resolution"?
Resolution (Full pixel w/h)
Alright.
I might try doing a full rewrite of macOS resolution detection. My new MacBook Air has another edge case: 1440x900 @ eXtendedHz
We'll have to remove screenresolution
support if we want full pixel w/h, it outputs the "UI Looks Like" resolution. I'll try find a faster alternative to system_profiler too.
@iandrewt yes I did, without realizing... I changed to scaled resolution and now 1440x900@2x is displayed in neofetch. Thanks! And thanks for the great work you do with the whole program ;)
@iandrewt let's remove screenresolution
support for now.
Hey, look, I fixed it. Should I send a PR?
https://github.com/kode54/neofetch/commit/54376dbe8edd57422721ebb05821c9cf7c686142
Yeaaaah, try not to mind the Hack too much. My MBP is in the shop, awaiting a new top case and battery replacement, to the tune of $300. And this Hack has better specs anyway.
Sure, send a PR my way!
@dylanaraps since the maintainer of screenresolution
is incredibly inactive and hasn't responded to certain PRs for 4+ years. We could always switch back to the upstream version if he ever decides to merge some of the outstanding PRs.
Could we consider:
screenresolution
(with https://github.com/jhford/screenresolution/pull/33).neofetch
Homebrew formula to use the forked version.So I installed NeoFetch about 2 months ago. Since then I upgraded my Radeon Sapphire GPU to a Radeon RX 580. NeoFetch still shows the old GPU, but when I directly run system_profiler SPDisplaysDataType
it shows the correct card.
Is there a cache to flush?
Neofetch still shows the wrong resolution.
Output of screenresolution:
Seems to be a problem with
screenresolution
rather than neofetch.After running
brew uninstall --ignore-dependencies screenresolution
the fallback tosystem_profiler
's output is accurate, although as mentioned in the changelog wherescreenresolution
was introduced, there is a noticeable pause before the resolution is printed.
Yes, removing screenresolution works and in my experience neofetch doesn't slow down when doing so. Thanks :-)
Yes, removing screenresolution works and in my experience neofetch doesn't slow down when doing so. Thanks :-)
You can compare the speeds for yourself with the time
command, on my machine both are "fast" but system_profiler is an order of magnitude slower than screensolution on average.
Unfortunately, screenresolution doesn't know how to retrieve the physical versus scaled down resolutions of a display. This is needed to retrieve the 1x versus 2x sizes of a display which is using scaling. Scaling is an arbitrary integer scale, but Apple mostly only supports 2x on desktop machines.
There is an open PR on screenresolution to add a new argument that returns the native resolution.
on brew, I think we need to remove screenresolution
from brew formula dependencies, to force it using system_profiler SPDisplaysDataType
https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/neofetch.rb#L14
I've just submit an issue to homebrew. Hope that it can be fixed. https://github.com/Homebrew/homebrew-core/issues/94002
That's not going to be accepted because screenresolution is still used in neofetch, you'd need to make a PR removing it first. I think a better solution is to switch to the working fork on a private tap though.
Description
I'm running neofetch on MacBook and it doesn't display screen resolution right
Neofetch version
Neofetch 5.0.1
Screenshot
system_profiler SPDisplaysDataType
output: