Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Dayo

macrumors 68020
Dec 21, 2018
2,257
1,279
The fix attempt couldn't find firmware GOP on the GPU.

I can't be certain whether this was because the GPU doesn't have GOP or an issue with the attempted fix unless someone with a GPU confirmed to have GOP tests on a cMP 5,1 and reports back or someone confirms whether the nvidia gtx 1060 does have GOP.
 

bootjac

macrumors newbie
Jul 8, 2020
11
0
5:197 0:022 Get Graphics Status:
5:217 0:019 - ConsoleControl ...ok
5:233 0:016 - UgaDraw ...ok
5:250 0:016 - GraphicsOutput ...NOT OK!

5:276 0:025 Attempt to Fix GraphicsOutputProtocol:
5:292 0:016 LocateHandleBuffer ...Success
5:309 0:016 AltGraphicsOutputProtocol Search Loop 0
5:325 0:016 AltGraphicsOutputProtocol Status: Not Found
5:342 0:016 Could not Implement GraphicsOutputProtocol

5:358 0:016 Attempt to Implement UgaDraw:
5:376 0:017 GetMode ... Success
5:392 0:016 Implemented UgaDraw

except UgaDraw doesn't actually DO anything.
 
Last edited:

Dayo

macrumors 68020
Dec 21, 2018
2,257
1,279
Interesting ... and a step forward.

Did the logging stop at that point? Expected there would be some lines after that.
 

Dayo

macrumors 68020
Dec 21, 2018
2,257
1,279
Updated file in Post 256. Please try this. Not likely to change outcome but should reveal whether Refind can find Firmware GOP on your CPU or not.

Would appreciate if another 5,1 user with something like the RX 580 could also test and post the log as from Get Graphics Status: @startergo?

Somewhere, I posted a complied version of ScreenModes.efi, maybe useful here.
Awesome, do you have the source code?
 
Last edited:

bootjac

macrumors newbie
Jul 8, 2020
11
0
Ok, I've got "screenmodes.efi" downloaded, but I've no idea what to do with it.
trying the next iteration of debug now... well, as soon as I turn off SIP, again. This machine WILL do what I tell it. Eventually.
 

Dayo

macrumors 68020
Dec 21, 2018
2,257
1,279
Ok, I've got "screenmodes.efi" downloaded, but I've no idea what to do with it.
trying the next iteration of debug now... well, as soon as I turn off SIP, again. This machine WILL do what I tell it. Eventually.
It tells you what is available on your rig ... basically the info I was trying to get at.
I found the source code and will merge into Refind but in the meantime, can you try the updated version I posted.
Hopefully some other 5,1 user will also step up although this old post is a good start.

Definitely possible to fix I think and once we get a handle on what's happening, we can see about the potential fix
 
  • Like
Reactions: startergo

bootjac

macrumors newbie
Jul 8, 2020
11
0
Ok, well, this took way longer than it should have.

Code:
5:097  0:021  Get Graphics Status:
5:108  0:011    - ConsoleControl ...ok
5:125  0:016    - UgaDraw ...ok
5:141  0:016    - GraphicsOutput ...NOT OK!

5:166  0:024  Attempt to Implement GraphicsOutputProtocol:
5:184  0:017  Locate GOP HandleBuffer ... Success
5:200  0:016  GOP Handle Count = 1
5:217  0:016  HandleBuffer Index = 1
5:233  0:016  Found GOP on ConsoleOutHandle at HandleBuffer Index 0
5:250  0:016  FirmwareHandle GOP Seek Status ... Not Found
5:266  0:016  Activate GOP on ConsoleOutHandle ... Not Found
5:283  0:016  Attempt to Implement UgaDraw:
5:300  0:017  Implemented UgaDraw ... Screen Resolution = 640x480
------------

5:325  0:024  Allocate buffer for screen area
5:342  0:016  Getting fullscreen image with UgaDraw
178:869  173:527  Allocate buffer for screen area
178:902  0:032  Getting fullscreen image with UgaDraw
178:939  0:036  Allocate buffer for screen area
178:969  0:030  Getting fullscreen image with UgaDraw
179:297  0:327  Allocate buffer for screen area
179:319  0:021  Getting fullscreen image with UgaDraw

and I keep having to restart (because I keep messing things up) and then I forget I have to wait 30 seconds and press enter after the startup chime.. can you make the "press any key" thing.. timeout?

If I take away the OsxAptioFix, the only change is...

Code:
0:976  0:016  Allocate buffer for screen area
0:993  0:016  Getting fullscreen image with UgaDraw
6:272  5:278  Allocate buffer for screen area
6:304  0:031  Getting fullscreen image with UgaDraw
6:352  0:047  Allocate buffer for screen area
6:390  0:038  Getting fullscreen image with UgaDraw
6:407  0:017  Allocate buffer for screen area
6:423  0:015  Getting fullscreen image with UgaDraw
 
Last edited:

startergo

macrumors 603
Sep 20, 2018
5,022
2,283
I beleive this is the point where OC replaces the invalid GOP FirmwareHandle. Maybe the code from OC can be integrated in rEFInd.
Code:
5:233  0:016  Found GOP on ConsoleOutHandle at HandleBuffer Index 0
5:250  0:016  FirmwareHandle GOP Seek Status ... Not Found
 

Dayo

macrumors 68020
Dec 21, 2018
2,257
1,279
Basically can't find GOP on your GPU and attempt to try UGA doesn't work.

Need to see whether the GPU GOP thing is down to an issue with my coding (Don't really know the C language) or whether it is specific to your GPU.

Need another 5,1 user to test and report .


I beleive this is the point where OC replaces the invalid GOP FirmwareHandle. Maybe the code from OC can be integrated in rEFInd.
Those are logging output I added to attempt at implementing OC GOP swap.

In his case, only the console handle GOP is found. Firmware GOP is not found. Need another checker to see whether this is down to coding error in the search or whether his GPU just doesn't have GOP.
 

Dayo

macrumors 68020
Dec 21, 2018
2,257
1,279
@bootjac

Updated Post 256.

Basically a cleaned up version. Managed to stop the need to press key to continue btw.
Waiting for someone with different GPU to test but would like to see one last output from your setup.
 

startergo

macrumors 603
Sep 20, 2018
5,022
2,283
@bootjac

Updated Post 256.

Basically a cleaned up version. Managed to stop the need to press key to continue btw.
Waiting for someone with different GPU to test but would like to see one last output from your setup.
Code:
14:430  0:011  InitScreen...
14:438  0:008  Get Graphics Status:
14:447  0:008    - ConsoleControl ...ok
14:459  0:011    - UgaDraw ...ok
14:468  0:008    - GraphicsOutput ...ok

14:476  0:008  DumpGOPVideoModes:
14:485  0:008  Modes: 1, FrameBufferBase: A0000000, FrameBufferSize: 0x7E9000
14:494  0:008    - GraphicsOutputQuery on Mode 0 ... Success
14:503  0:008      Mode 0: 1920x1080, PixelFormat: 8bit BGR, PixelsPerScannedLine: 1920

14:512  0:008  Set Screen Resolution:
14:521  0:008  Best Mode = GOP Mode 0 [1920x1080]
14:530  0:008  Screen Resolution Already Set

14:538  0:008  SetupScreen...
14:561  0:022  SetVolumeIcons...
14:732  0:170  ScanForBootloaders...
14:774  0:042  Reallocating buffer from 256 to 290
14:783  0:009  Reallocating buffer from 256 to 366
14:792  0:008  Reallocating buffer from 256 to 368
14:802  0:010  Reallocating buffer from 256 to 290
14:814  0:011  Reallocating buffer from 256 to 366
14:823  0:009  Reallocating buffer from 256 to 368
15:366  0:542  ScanForTools...
15:905  0:539  Done
------------
Ok So this is a boot with 2 Identical Radeon cards. One of them with a regular GOP and the other with MVC EFI vbios.
[automerge]1594917784[/automerge]
This boot is with a single GOP Radeon card:
Code:
4:051  0:014  InitScreen...
4:059  0:008  Get Graphics Status:
4:068  0:008    - ConsoleControl ...ok
4:077  0:008    - UgaDraw ...ok
4:085  0:008    - GraphicsOutput ...NOT OK!

4:094  0:008  Attempt to Implement GraphicsOutputProtocol:
4:105  0:011  Locate GOP HandleBuffer ... Success
4:113  0:008  GOP Handle Count: 2
4:122  0:008  HandleBuffer Index = 0
4:130  0:008  HandleBuffer Index = 1
4:139  0:008  FirmwareHandle GOP found at HandleBuffer Index 1
4:147  0:008  FirmwareHandle GOP Seek Status ... Success
4:156  0:008  Disable MainGOPGuid on ConsoleOutHandle
4:164  0:008  Reset GOP on ConsoleOutHandle ... Invalid Parameter
4:173  0:008  Attempt to Implement UgaDraw:
4:182  0:008  Implemented UgaDraw ... Screen Resolution = 640x480

4:190  0:008  SetupScreen...
4:199  0:008  SetVolumeIcons...
4:415  0:216  ScanForBootloaders...
4:895  0:480  Reallocating buffer from 256 to 290
4:905  0:009  Reallocating buffer from 256 to 366
4:916  0:011  Reallocating buffer from 256 to 368
4:932  0:015  Reallocating buffer from 256 to 290
4:941  0:009  Reallocating buffer from 256 to 366
4:949  0:008  Reallocating buffer from 256 to 368
5:109  0:159  ScanForTools...
5:659  0:550  Done
------------
 
Last edited:

bootjac

macrumors newbie
Jul 8, 2020
11
0
Sorry about the delay here, been trying to do more than 1 thing at a time, and that's just never a good idea.

Code:
1:054  0:029  InitScreen...
1:075  0:020  Get Graphics Status:
1:091  0:016    - ConsoleControl ...ok
1:108  0:016    - UgaDraw ...ok
1:124  0:016    - GraphicsOutput ...NOT OK!

1:142  0:017  Attempt to Implement GraphicsOutputProtocol:
1:158  0:016  Locate GOP HandleBuffer ... Success
1:183  0:024  GOP Handle Count: 1
1:200  0:016  HandleBuffer Index = 0
1:216  0:016  FirmwareHandle GOP Seek Status ... Not Found
1:233  0:016  Attempt to Implement UgaDraw:
1:250  0:017  Implemented UgaDraw ... Screen Resolution = 640x480

1:267  0:016  SetupScreen...
1:283  0:016  SetVolumeIcons...
1:357  0:073  ScanForBootloaders...
1:631  0:273  ScanForTools...
1:666  0:034  Done

thanks for removing the "press any key" that sped things up a bit.
 

Dayo

macrumors 68020
Dec 21, 2018
2,257
1,279
@bootjac

I presume you did not get bootscreen. Right?

Inferences from comparing your log with that from startergo:
  • Refind cannot find GOP on your GPU
    • This appers to be because your GPU does not have GOP as the same code finds it on his. I.E., not a coding issue
  • UgaDraw does not seem to be working on your GPU
    • Not yet sure whether it does on his but seems to be doing more than what it did on yours
in summary, seems your GPU is incompatible ... at least with GOP.
Will pay more attention to the UgaDraw part later and tag you once done.
Thanks for giving all the feedback. When you are doing such stuff, feedback is key but you will be surprised at how difficult it is to get!


@startergo
Just to be clear...

Q1: You are running a 5,1. Right?
Q2: If so, is it native or a 4,1 -> 5,1? (just for info .... should not make a difference)

Ok So this is a boot with 2 Identical Radeon cards. One of them with a regular GOP and the other with MVC EFI vbios.
Q3: Did you get boot screen with this setup?
Q4: I presume you always did have a boot screen with this setup because of the MVC EFI card. Right?


This boot is with a single GOP Radeon card:
Q5: Did you get bootscreen with this setup?
Q6: I presume you previously did not have a boot screen with this setup. Right?

4:164 0:008 Reset GOP on ConsoleOutHandle ... Invalid Parameter
I need to fix this
 
Last edited:

startergo

macrumors 603
Sep 20, 2018
5,022
2,283
Q1: You are running a 5,1. Right?
Q2: If so, is it native or a 4,1 -> 5,1? (just for info .... should not make a difference)
Native 5,1
Q3: Did you get boot screen with this setup?
Q4: I presume you always did have a boot screen with this setup because of the MVC EFI card. Right?
Correct
Q5: Did you get bootscreen with this setup?
Q6: I presume you previously did not have a boot screen with this setup. Right?
I never before until OC got a boot screen with this card. No boot screen yet with rEFInd
 

Dayo

macrumors 68020
Dec 21, 2018
2,257
1,279
I never before until OC got a boot screen with this card. No boot screen yet with rEFInd
OK, can focus on this setup then.

The UGADraw thing seems a dead end. Getting all the info that it is active but it doesn't work ... I presume the newer GPUs have all dropped support. Will do one UGA focused code update for benefit for anyone with an old supported card before trying to fix the invalid parameter thing.
 
  • Like
Reactions: startergo

Dayo

macrumors 68020
Dec 21, 2018
2,257
1,279
@bootjac, @startergo

Updated Post 256.

Can you kindly run and post logs?

Focused on expanding logging and closing out the UGADraw item.
Will move on to hopefully finalising the GOP problem after reviewing these logs.
 

startergo

macrumors 603
Sep 20, 2018
5,022
2,283
Code:
13:808  0:009  Read Config...
13:823  0:014  Adjust Default Selection...
13:832  0:009  Init Screen...
13:842  0:009  Get Graphics Status:
13:854  0:012    - ConsoleControl ...ok
13:863  0:009    - UGADraw ...ok
13:872  0:009    - GraphicsOutput ...NOT OK!

13:882  0:009  Attempt to Implement GraphicsOutputProtocol:
13:891  0:009  Locate GOP HandleBuffer ... Success
13:900  0:009    - GOP Handle Count = 2
13:910  0:009    - GOP HandleBuffer Index: 0
13:920  0:009     * Appears to be ConsoleOutHandle GOP ...SKIPPED!
13:929  0:009    - GOP HandleBuffer Index: 1
13:938  0:009     * FirmwareHandle GOP found
13:947  0:009     * FirmwareHandle GOP ...ok
13:956  0:008  FirmwareHandle GOP Seek ... Success
13:966  0:009  Disable MainGOPGuid on ConsoleOutHandle
13:975  0:009  Could not Enable AltGOPGuid on ConsoleOutHandle
13:984  0:009  Reset GOP on ConsoleOutHandle ... Invalid Parameter

13:995  0:011  Attempt to Implement UniversalGraphicsAdapterProtocol:
14:005  0:009  Locate UGADraw HandleBuffer
14:014  0:009   ... Success
14:023  0:009    - UGADraw Handle Count = 1
14:032  0:009    - UGADraw HandleBuffer Index: 0
14:041  0:009     * UGA Screen Width: 640
14:051  0:009     * UGA Screen Height: 480
14:060  0:009     * UGA Colour Depth: 32
14:070  0:009     * UGA Refresh Rate: 60
14:079  0:009     * UGADraw Set to HandleBuffer Index: 0
14:103  0:024  Implemented UGADraw @ 640x480 Resolution

14:112  0:008  Setup Screen...
14:121  0:008  Set Volume Icons...
14:336  0:214  Scan for Bootloaders...
14:842  0:506  Reallocating buffer from 256 to 290
14:852  0:010  Reallocating buffer from 256 to 366
14:861  0:008  Reallocating buffer from 256 to 368
14:879  0:017  Reallocating buffer from 256 to 290
14:888  0:009  Reallocating buffer from 256 to 366
14:897  0:008  Reallocating buffer from 256 to 368
15:056  0:158  Scan for Tools...
15:594  0:538  Init Pointer Devices...
15:603  0:008    - Close Existing Pointer Protocols
15:612  0:008  Done
------------
No boot screen
 

Dayo

macrumors 68020
Dec 21, 2018
2,257
1,279
No boot screen
Thanks ... Expected outcome.
Closed out the UGADraw part now. Basically it is available but not supported.

Updated Post 256. Can you kindly run and report?

Trying to get to bottom of invalid param error. Downloaded and waded through the UEFI Specs, an unwieldy 2,500 page file and unfortunately, "Invalid Parameter" is used as a catch all error msg in the function used here that can mean any one of 4 or 5 issues.

Tried to filter things out so that we don't get more than two items. Also think the "Disable MainGOPGuid on ConsoleOutHandle" logging was a false "success" outcome and that the error actually is in this part. Changed things around there to make sure.

@bootjac Also run if you don't mind.

Thanks
 

startergo

macrumors 603
Sep 20, 2018
5,022
2,283
Code:
7:830  0:009  Read Config...
7:844  0:014  Adjust Default Selection...
7:853  0:008  Init Screen...
7:865  0:011  Get Graphics Status:
7:948  0:082    - ConsoleControl ...ok
7:957  0:008    - UGADraw ...ok
7:965  0:008    - GraphicsOutput ...NOT OK!

7:974  0:008  Attempt to Implement GraphicsOutputProtocol:
7:983  0:008  Locate GOP HandleBuffer ... Success
7:992  0:008    - GOP Handle Count = 2
8:000  0:008    - GOP HandleBuffer Index: 0
8:009  0:008     * Appears to be ConsoleOutHandle GOP ...SKIPPED!
8:018  0:008    - GOP HandleBuffer Index: 1
8:027  0:008     * FirmwareHandle GOP found
8:035  0:008     * FirmwareHandle GOP ...ok
8:052  0:016  FirmwareHandle GOP Seek ... Success
8:061  0:008  Disable MainGOPGuid on ConsoleOutHandle
8:080  0:018  Could not Enable AltGOPGuid on ConsoleOutHandle
8:088  0:008  Reset GOP on ConsoleOutHandle ... Invalid Parameter

8:097  0:008  Attempt to Implement UniversalGraphicsAdapterProtocol:
8:105  0:008  Locate UGADraw HandleBuffer
8:113  0:008   ... Success
8:122  0:008    - UGADraw Handle Count = 1
8:131  0:008    - UGADraw HandleBuffer Index: 0
8:139  0:008     * UGA Screen Width: 640
8:148  0:008     * UGA Screen Height: 480
8:156  0:008     * UGA Colour Depth: 32
8:165  0:008     * UGA Refresh Rate: 60
8:174  0:008     * UGADraw Set to HandleBuffer Index: 0
8:182  0:008  Implemented UGADraw @ 640x480 Resolution

8:191  0:008  Setup Screen...
8:200  0:008  Set Volume Icons...
8:451  0:251  Scan for Bootloaders...
8:967  0:515  Reallocating buffer from 256 to 290
8:977  0:009  Reallocating buffer from 256 to 366
8:985  0:008  Reallocating buffer from 256 to 368
9:003  0:017  Reallocating buffer from 256 to 290
9:012  0:008  Reallocating buffer from 256 to 366
9:021  0:008  Reallocating buffer from 256 to 368
9:178  0:157  Scan for Tools...
9:753  0:574  Init Pointer Devices...
9:763  0:010    - Close Existing Pointer Protocols
9:772  0:008  Done
------------
Log looks the same.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.