Update: This method in this post requires trial and error if you have lot of displays. Konstantin Gredeskoul has created an automated bash script and shared it on GitHub. Check his comment.
Or directly go to GitHub for instructions: Changing OSX Underscan
I recently purchased an Asus external monitor. The first thing I noticed on plugging it to my MacBook was that there was a blank space at each of the edges. This wasted quite a bit of screen estate and also made everything blurry. This can generally happen due to wrong underscan/overscan settings.
On testing monitor with other laptops, I found that it was working fine. So it was something with my Mac. macOS has a slider to adjust overscan in system preferences. However, it only appears for TVs. So it was not appearing for me.
It took me two hours but I finally fixed it with help of command line and Stack Overflow.
The Stack Overflow question: “How to reload .com.apple.iokit.graphics underscan without restarting?”. This was unrelated to my problem but helped me to find the file where configuration is stored.
In case you encounter same issue, here’s a step by step guide to save you a couple of hours:
Disclaimer: You may damage your system with a wrong command, so proceed with caution. I am just sharing what worked for me and am not responsible for any loss or harm caused by anything in this post. It worked for me on a MacBook Pro (Retina, 13-inch, Early 2015) running macOS High Sierra (10.13.2), it may or may not work for you.
- Open terminal.
- You want to open
/var/db/.com.apple.iokit.graphicsfile. To do that, enter following command in terminal:
open -a TextEdit /var/db/.com.apple.iokit.graphics
- TextEdit will open with the file. You’ll notice that the file has following structure:
- Starting with line 5, every
keytag is a separate display and following
dictis list of preferences for it.
- Note: You may need to do a bit of trial and error to find the correct display. In my case, I only use a limited number of displays, so I reset the settings for every display, restarted and it was fixed.
- Find the lines that say
<key>pscn</key>. This is the preference that controls underscan/overscan.
- Next line after every
pscnkey will look like this:
<integer>10000</integer>(line 34 above).
- 10000 means that there is no underscan. Value less than 10000 means that display will be underscanned, larger value means it is overscanned.
- For values less than 10000, change them back to 10000.
- Save the file, you may need to enter your admin password.
The issue should be fixed. I hope it will save some time for you. In meantime, if you find any shortcuts, do let me know via comments.