- Joined
- Dec 23, 2011
- Messages
- 170
- Motherboard
- HP ProBook 430 G6
- CPU
- i5-8265U
- Graphics
- UHD 620, 1920x1080
- 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 also appears in Windows without nvidia drivers installed. It's because that's a graphical card-specific issue.
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:
(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:
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:
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:
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:
After:
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:
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
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 also appears in Windows without nvidia drivers installed. It's because that's a graphical card-specific issue.
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
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:
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
Before:
After:
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:
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
Attachments
Last edited by a moderator: