[GH-ISSUE #254] Compatiblity with fractional scaling available for retina/HiDPI? (Wayland) #173

Open
opened 2026-02-27 22:08:20 +03:00 by kerem · 5 comments
Owner

Originally created by @workcomplete on GitHub (Apr 19, 2021).
Original GitHub issue: https://github.com/sickcodes/Docker-OSX/issues/254

Hi thanks for this git! I'm running docker in Arch Linux on a MBA9,1 2020 with Gnome - Wayland. The resolution setting on my GDE is set to 2560x1600 scaled up to 200% using fractional scaling. When I run the following:

docker pull sickcodes/docker-osx:auto

docker run -it
--device /dev/kvm
-p 50922:10022
-v /tmp/.X11-unix:/tmp/.X11-unix
-e "DISPLAY=${DISPLAY:-:0.0}"
-e GENERATE_UNIQUE=true
-e WIDTH=2560
-e HEIGHT=1600
sickcodes/docker-osx:auto

OSX is huge and does not fit on my screen. If I set my scaling to 100% on GDE the OSX fits but it too small to use. There is no option to change the scaling in System Preferences > Display. Dropping the resolution down makes it fit but it is too blurry to use.

Originally created by @workcomplete on GitHub (Apr 19, 2021). Original GitHub issue: https://github.com/sickcodes/Docker-OSX/issues/254 Hi thanks for this git! I'm running docker in Arch Linux on a MBA9,1 2020 with Gnome - Wayland. The resolution setting on my GDE is set to 2560x1600 scaled up to 200% using fractional scaling. When I run the following: docker pull sickcodes/docker-osx:auto docker run -it \ --device /dev/kvm \ -p 50922:10022 \ -v /tmp/.X11-unix:/tmp/.X11-unix \ -e "DISPLAY=${DISPLAY:-:0.0}" \ -e GENERATE_UNIQUE=true \ -e WIDTH=2560 \ -e HEIGHT=1600 \ sickcodes/docker-osx:auto OSX is huge and does not fit on my screen. If I set my scaling to 100% on GDE the OSX fits but it too small to use. There is no option to change the scaling in System Preferences > Display. Dropping the resolution down makes it fit but it is too blurry to use.
Author
Owner

@sickcodes commented on GitHub (Apr 20, 2021):

You are using a big display right there, in the QEMU window you can zoom in and out. I'm not sure if you want it bigger or smaller?

<!-- gh-comment-id:822906573 --> @sickcodes commented on GitHub (Apr 20, 2021): You are using a big display right there, in the QEMU window you can zoom in and out. I'm not sure if you want it bigger or smaller?
Author
Owner

@workcomplete commented on GitHub (Apr 20, 2021):

Thanks for the quick reply. Zooming out works, and I can make it fit, but I have the same issue with it becoming blurry.

<!-- gh-comment-id:822908014 --> @workcomplete commented on GitHub (Apr 20, 2021): Thanks for the quick reply. Zooming out works, and I can make it fit, but I have the same issue with it becoming blurry.
Author
Owner

@sickcodes commented on GitHub (Apr 20, 2021):

But have you tried reducing the resolution you have selected:

-e WIDTH=2560 
-e HEIGHT=1600

Personally I prefer 1600x900 as it fits on a 1920x1080 screen and I can see everything

<!-- gh-comment-id:822908772 --> @sickcodes commented on GitHub (Apr 20, 2021): But have you tried reducing the resolution you have selected: ``` -e WIDTH=2560 -e HEIGHT=1600 ``` Personally I prefer 1600x900 as it fits on a 1920x1080 screen and I can see everything
Author
Owner

@sickcodes commented on GitHub (Apr 20, 2021):

Ah I see. You have 200% scaling on the desktop.

Mathematically, it should always be blurry by scaling the outside environment from what I know about the display.

<!-- gh-comment-id:822909183 --> @sickcodes commented on GitHub (Apr 20, 2021): Ah I see. You have 200% scaling on the desktop. Mathematically, it should always be blurry by scaling the outside environment from what I know about the display.
Author
Owner

@matt22207 commented on GitHub (Jan 2, 2026):

There are mentions out there of a few different ways to add custom resolutions / HiDPI to macOS for non-apple HiDPI displays/etc, such as editing various plist files, etc. I tried a few, but the only one I got working (and the simplest) was this one:

https://github.com/waydabber/BetterDisplay

  1. Setup your VM as described in above comments for the full native resolution of your screen, in my case 2560x1600. Ensure your VM boots at full native resolution. The screen real estate will be large at 100% in macOS and with tiny fonts. No option yet in macOS Display settings to use a scaled HiDPI display.
  2. Boot your macOS VM and install BetterDisplay
  3. Launch BetterDisplay, open the menubar item and go to "Manage Display > Configure Display"
  4. Scroll down to the "System Configuration and Flexible Scaling" area..
  5. Enable these: "Edit the system configuration of the display model", "Enable Flexible Scaling", and "Custom Scaled Resolutions" (I didn't need to any any specific custom resolution so maybe this one isn't needed?)
  6. Click "Apply" (top left)
  7. Reboot your macOS VM
  8. You may see the new HiDPI option (in my case 1280x800) in the macOS System Preferences now and select it. If not, open the BetterDisplay menu item and you should now get a "Resolution" slider near the top set to 100%. Set it down to the lowest value on the left (0%?) and you should get a HiDPI resolution. MacOS will show it as half resolution, but it is really full resolution with doubled scale.

In the QEMU window, this results in a full 100% scale resolution window (which will take up twice your monitor space if you have 200% scaling enabled in your linux system prefs), and when you use QEMU's "Zoom to Fit" and Full Screen then QEMU will scale it down to fit your screen. VERY slightly blurry due to downscaling, but i would give it 95% close to being perfect.

Not 100% ideal since macOS is rendering full size, and then QEMU is shinking it down 50% to fit. It would be nice if there was some sort of better native way to do this, but not sure of anything else.

Way better than just using half resolution in the VM config and upscaling resulting in blurry fonts or getting tiny fonts at full resolution.

my TODO:

  • Check if you need to keep running BetterDisplay permanently.
  • Try this with various VNC/headless options to see if other clients display better. (also sunshine/moonlight)
<!-- gh-comment-id:3706350967 --> @matt22207 commented on GitHub (Jan 2, 2026): There are mentions out there of a few different ways to add custom resolutions / HiDPI to macOS for non-apple HiDPI displays/etc, such as editing various plist files, etc. I tried a few, but the only one I got working (and the simplest) was this one: https://github.com/waydabber/BetterDisplay 1. Setup your VM as described in above comments for the full native resolution of your screen, in my case 2560x1600. Ensure your VM boots at full native resolution. The screen real estate will be large at 100% in macOS and with tiny fonts. No option yet in macOS Display settings to use a scaled HiDPI display. 2. Boot your macOS VM and install BetterDisplay 3. Launch BetterDisplay, open the menubar item and go to "Manage Display > Configure Display" 4. Scroll down to the "System Configuration and Flexible Scaling" area.. 5. Enable these: "Edit the system configuration of the display model", "Enable Flexible Scaling", and "Custom Scaled Resolutions" (I didn't need to any any specific custom resolution so maybe this one isn't needed?) 6. Click "Apply" (top left) 7. Reboot your macOS VM 8. You may see the new HiDPI option (in my case 1280x800) in the macOS System Preferences now and select it. If not, open the BetterDisplay menu item and you should now get a "Resolution" slider near the top set to 100%. Set it down to the lowest value on the left (0%?) and you should get a HiDPI resolution. MacOS will show it as half resolution, but it is really full resolution with doubled scale. In the QEMU window, this results in a full 100% scale resolution window (which will take up twice your monitor space if you have 200% scaling enabled in your linux system prefs), and when you use QEMU's "Zoom to Fit" and Full Screen then QEMU will scale it down to fit your screen. VERY slightly blurry due to downscaling, but i would give it 95% close to being perfect. Not 100% ideal since macOS is rendering full size, and then QEMU is shinking it down 50% to fit. It would be nice if there was some sort of better native way to do this, but not sure of anything else. Way better than just using half resolution in the VM config and upscaling resulting in blurry fonts or getting tiny fonts at full resolution. my TODO: - Check if you need to keep running BetterDisplay permanently. - Try this with various VNC/headless options to see if other clients display better. (also sunshine/moonlight)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Docker-OSX#173
No description provided.