Contribute
Register

NVIDIA: How-to Get Rid of the Black Border

Status
Not open for further replies.
Joined
Feb 7, 2013
Messages
2
Motherboard
J
CPU
i7
Graphics
660ti
Mac
Classic Mac
Mobile Phone
I've posted the code to patch vbios using Clover in several threads now. I'll try to find it and link one.

Here is the Clover vbios patch for 1920x1080. Doesn't always work for HDMI connections.

http://www.tonymacx86.com/graphics/167279-native-boot-resolution.html#post1095810

Hi thanks for the information but I think that only is a fix for GPU's that don't support the 1920x1080 VESA mode. My boot screen is already outputting at 1080p but it is getting scaled down. OP states how to fix the scaling issue but his instructions are for a MBR and I'm using Clover with UEFI so the instructions in the OP aren't compatible.
 
Joined
Feb 17, 2016
Messages
46
Motherboard
Asus P5Q-SE2
CPU
Intel Core 2 Quad Q8400
Graphics
Nvidia GeForce GTX460 1GB
Mac
  1. MacBook Pro
Mobile Phone
  1. Android
  2. iOS
Where can I see the detailed Level 3 and Level 4 solutions?
 
Joined
Oct 9, 2015
Messages
16
Motherboard
Gigabyte Z97x-UD5H
CPU
i7
Graphics
GTX 970
Mac
  1. iMac
  2. MacBook Pro
Mobile Phone
  1. Android
Hello,

I am having a similar problem with my Hackintosh, but it's the other way around: the black border is there when OSX has booted, and when booting, Clover is full screen.

This problem just happened all of a sudden after more than a year of running this machine with no such problems whatsoever. I tried messing with resolutions in System preferences, but with no avail. It's like it does not display full resolution over the entire screen, instead it shrinks it. I am using 2 monitors setup, the second monitor is smaller, and I got the feeling it's got something to do with that.

Any help would be much appreciated.

OSX Yosemite
4 GHz Intel Core i7
16 GB RAM
NVIDIA GeForce GTX 970 4095 MB
 
Last edited:
Joined
Jul 21, 2014
Messages
2
Mac
Classic Mac
Mobile Phone
[GUIDE] NVIDIA: How-to Get Rid of the Black Border

This topic is about NVIDIA cards, If you have AMD card, check this http://www.tonymacx86.com/general-h...-correct-widescreen-resolution-boot-time.html

What is the Black Border? A picture is better than 1k words:

black-border-jpg.79364


Black border also appears in Windows without nvidia drivers installed. It's because that's a graphical card-specific issue.

win-jpg.79363


Even when I change screen resolution, the size occupied area of the screens does not change, size of border stays constant. That's because VBIOS works in scale mode.

There are three modes supported by nvidia bios:
1) Scale (default). It just stretch image and leave the black border around. No matter what resolution you have it will not affect the size of the border.
2) Centered 1:1 (we will switch to this mode below)
3) Left Corner 1:1

Why does the black border appear?
The video drivers are much complicated in our days and for this reason they need much space to be saved. Also complicated drivers can have bugs and need a way to be updated easily. For these reasons it make sense to save them as driver files instead of putting everything to video card ROM.

There are 5 solutions so far.

Level 0 Solution: Ignore
Just leave everything as is. This black border is not a problem because it will disappear as soon as OS X will load video driver during boot.

Level 1 Solution: Change background color to black like Windows does (Can I boot, Daddy?)

As you probably noticed, starting from Windows XP boot screen always has black background. This way the black border is not visible. Let’s do the same!

Modify the background color:
Code:
sudo perl -pi.bak -e 's;\xff\xff\xff\xbf\xbf\xbf;\xff\xff\xff\x00\x00\x00;g' /boot
(This command will backup file /boot to /boot.bak before patching)
In order this howto not to become a novel, I provided a short command, but you can find more details in http://www.tonymacx86.com/customiza...lack-stretched-boots-no-more-hex-editing.html

Apple logo also could be changed, it is located in /extra/themes/<themename>/boot.png
If you changed logo, ensure that LegacyLogo option is set to “No”, otherwise this file will not be used by chimera.

Here we go:
theme-jpg.79359


Advantages: this approach is safe and border is not longer visible
The disadvantage: Logo is stretched

Level 2 Solution: Unstretch (Don’t hurt me)

WARNING! After you apply this patch, your hard drive will boot only on PCs with Nvidia video card. I guess Intel and AMD will fail boot, but I haven't a chance to give it a shot. Please feel free to leave a comment if you was not scared to try.

The idea of this solution is just to call bios function which will switch video card from stretched to Centered mode:

Code:
    mov ax,4F14h ;VESA VBE OEM function
    mov bl,2     ;Subfunction 02 = Set Panel Expansion/Centering
    mov bh,1     ;00 = Return Current Setting, 01 = Set Centering/Expansion
    mov cx,0001h ;Exp. mode: 00 = Scaled, 01 = Centered 1:1, 02 = Left Corner 1:1
    int 10h      ;call VGA/VBE service

We need to build a custom master boot record (MBR) which will execute this code and write the MBR to disk.

There are two options
a) download binary boot0 attached http://www.tonymacx86.com/attachments/boot0-zip.79365/
b) get source code here http://forge.voodooprojects.org/svn/chameleon/branches/Chimera, apply boot0.patch attached http://www.tonymacx86.com/attachments/center-patch-txt.79362/ and build

Now, when you have boot0, install it:
Code:
sudo dd if=boot0 of=/dev/diskX bs=440 count=1
Unfortunately you can not do this on running Mac OS X, you’ll have to attach your hard drive to another machine to rewrite boot sector.

Before:
before-jpg.79366

After:
after-jpg.79367


We can see that stretching is disabled now.

HINT: if you combine Level 1 and Level 2, you will get a very beautiful black splash screen. Unfortunately I was not able to take good photo using my phone. Professional camera is needed to manage contrast. On this reason I'm pasting a screenshot:

level2-jpg.79370


Advantages:
- image becomes much sharper
- apple logo is not stretched
- works with any operating system: Mac, Linux, Windows, DOS, whatever
- does not require flashing video card
- could be easily undone by reinstalling chimera
Disadvantages:
- possible troubles while booting with non-NVIDIA video card (not tested).

Level 3 Solution (Bring 'em on)
Patch VBIOS in memory.
<Will be described later>

Level 4 Solution (I’m Death incarnate)
Patch Hardware Video Card
<Will be described later>

P.S. Press "Recommend" in the top of this page if this guide helped you ;)



Here is the Solution Step By Step Follow me on Youtube Click on the Link below.

 
Joined
Jul 21, 2014
Messages
2
Mac
Classic Mac
Mobile Phone
How to Fix Black Border Boot Up Screen on Hacintosh in Hindi

How to Fix Black Border and change Custom Boot Up Screen on Hacintosh. So This is the Solution, I will show you Step By Step. And Yes, Please Before doing this first backup your mac OS and Boot file.

1) step Download Hex Editor Software from here.

http://ridiculousfish.com/hexfiend/

Copy and Paste this Code in terminal.


defaults write com.apple.finder AppleShowAllFiles 1 && killall Finder


For ReHidden type this command

defaults write com.apple.finder AppleShowAllFiles 0 && killall Finder


 
Status
Not open for further replies.
Top