Skip to content
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

Does not list / use HIDPI resolutions #18

Open
wackywendell opened this issue Aug 5, 2014 · 5 comments
Open

Does not list / use HIDPI resolutions #18

wackywendell opened this issue Aug 5, 2014 · 5 comments

Comments

@wackywendell
Copy link

On a MacBook with a Retina display, resolutions with hi-dpi are not listed and seemingly not accessible. For example:

$ ./screenresolution list
2014-08-05 15:33:43.994 screenresolution[13007:507] starting screenresolution argv=./screenresolution list
Available Modes on Display 0
   640x 480x32@0        1024x 768x32@0          1440x 900x32@0
   800x 600x32@0        1152x 720x32@0          1650x1050x32@0
   840x 524x32@0        1280x 800x32@0          2048x1280x32@0
  1024x 768x32@0 
$ ./screenresolution get
2014-08-05 15:33:48.503 screenresolution[13010:507] starting screenresolution argv=./screenresolution get
2014-08-05 15:33:48.509 screenresolution[13010:507] Display 0: 1280x800x32@0
$ ./screenresolution set 1280x800x32@0
2014-08-05 15:34:03.217 screenresolution[13012:507] starting screenresolution argv=./screenresolution set 1280x800x32@0
2014-08-05 15:34:03.223 screenresolution[13012:507] set mode on display 0 to 1280x800x32@0
$ ./screenresolution get
2014-08-05 15:34:07.031 screenresolution[13017:507] starting screenresolution argv=./screenresolution get
2014-08-05 15:34:07.037 screenresolution[13017:507] Display 0: 1280x800x32@0

While this may look perfectly fine, the original resolution was 1280x800 with HIDPI, and after the set command, the resolution changed to 1280x800 without HIDPI.

I have some coding experience, and access to such a macbook, so with a little guidance I can probably help in developing / testing any changes.

@dzg
Copy link

dzg commented Mar 4, 2015

Yes, please add ability to switch to HiDPI resolutions

@ELLIOTTCABLE
Copy link

👍

@nigels-com
Copy link

I did some hacking of get mode to report the number of pixels in addition to the logical resolution:

$ ./screenresolution get
2016-12-16 11:04:17.871 screenresolution[26642:545489] starting screenresolution argv=./screenresolution get 
2016-12-16 11:04:17.875 screenresolution[26642:545489] Display 0: 1440x900x32@0 [2880x1800 pixels]

The relevant code fragment:

    NSLog(CFSTR("Display %d: %ux%ux%u@%.0f [%ux%u pixels]"),
           displayNum,
           CGDisplayModeGetWidth(currentMode),
           CGDisplayModeGetHeight(currentMode),
           bitDepth(currentMode),
           CGDisplayModeGetRefreshRate(currentMode),
           CGDisplayModeGetPixelWidth(currentMode),
           CGDisplayModeGetPixelHeight(currentMode));

@jjarava
Copy link

jjarava commented Jan 15, 2019

Hi!

Looking around for a solution to this, I found pull request #21 that, after some "digging", led me to https://github.com/avibrazil/RDM -- which is a project that seems to be based on this, that actually provides a command line utility and a GUI one, and supports Retina displays. It seems to do what I was looking for...

So take this as a FYI

@svenjacobs
Copy link

Hello everyone 👋🏼

Unfortunately in the meantime RDM was archived by the owner.

What is currently the best solution to programmatically change display resolutions including support for HiDPI (Retina) resolutions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants