Skip to content

Commit

Permalink
Put the FB back to the Info.plist, fix order of X6000
Browse files Browse the repository at this point in the history
Fixes #289
  • Loading branch information
VisualEhrmanntraut committed Aug 13, 2024
1 parent 0a0eaa9 commit ebfcc39
Show file tree
Hide file tree
Showing 3 changed files with 181 additions and 187 deletions.
171 changes: 0 additions & 171 deletions NootedRed/Firmware/com.apple.kext.AMDRadeonX6000Framebuffer.xml

This file was deleted.

173 changes: 173 additions & 0 deletions NootedRed/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,179 @@
<string>$(MODULE_VERSION)</string>
<key>IOKitPersonalities</key>
<dict>
<key>AMDGPUWrangler</key>
<dict>
<key>CFBundleIdentifier</key>
<string>com.apple.kext.AMDRadeonX6000Framebuffer</string>
<key>IOClass</key>
<string>AMDRadeonX6000_AmdGpuWrangler</string>
<key>IOMatchCategory</key>
<string>IOFramebuffer</string>
<key>IOPCIMatch</key>
<string>0x15DD1002 0x15D81002 0x15E71002 0x164C1002 0x16381002 0x16361002</string>
<key>IOPCITunnelCompatible</key>
<true/>
<key>IOProbeScore</key>
<integer>60000</integer>
<key>IOProviderClass</key>
<string>IOPCIDevice</string>
</dict>
<key>AMDRadeonPicassoController</key>
<dict>
<key>CFBundleIdentifier</key>
<string>com.apple.kext.AMDRadeonX6000Framebuffer</string>
<key>IOClass</key>
<string>AMDRadeonX6000_AmdRadeonControllerNavi10</string>
<key>IOMatchCategory</key>
<string>ATIFramebuffer</string>
<key>IOPCIMatch</key>
<string>0x15D81002</string>
<key>IOPCITunnelCompatible</key>
<true/>
<key>IOPCIUseDeviceMapper</key>
<true/>
<key>IOProbeScore</key>
<integer>6000</integer>
<key>IOPropertyMatch</key>
<dict>
<key>LoadController</key>
<true/>
</dict>
<key>IOProviderClass</key>
<string>IOPCIDevice</string>
<key>aty_config</key>
<dict>
<key>CFG_CORRECT_BLPT</key>
<true/>
<key>CFG_TRANS_WSRV</key>
<true/>
<key>CFG_UFL_CHK</key>
<false/>
<key>CFG_UFL_STP</key>
<false/>
<key>CFG_USE_DPT</key>
<true/>
</dict>
<key>aty_properties</key>
<dict>
<key>PP_GPUPowerDownEnabled</key>
<integer>0</integer>
<key>PP_GfxOffControl</key>
<integer>1</integer>
<key>PP_ToolsLogSpaceSize</key>
<integer>524288</integer>
<key>PP_WorkLoadPolicyMask</key>
<integer>0</integer>
</dict>
</dict>
<key>AMDRadeonRavenController</key>
<dict>
<key>CFBundleIdentifier</key>
<string>com.apple.kext.AMDRadeonX6000Framebuffer</string>
<key>IOClass</key>
<string>AMDRadeonX6000_AmdRadeonControllerNavi10</string>
<key>IOMatchCategory</key>
<string>ATIFramebuffer</string>
<key>IOPCIMatch</key>
<string>0x15DD1002</string>
<key>IOPCITunnelCompatible</key>
<true/>
<key>IOPCIUseDeviceMapper</key>
<true/>
<key>IOProbeScore</key>
<integer>6000</integer>
<key>IOPropertyMatch</key>
<dict>
<key>LoadController</key>
<true/>
</dict>
<key>IOProviderClass</key>
<string>IOPCIDevice</string>
<key>aty_config</key>
<dict>
<key>CFG_CORRECT_BLPT</key>
<true/>
<key>CFG_TRANS_WSRV</key>
<true/>
<key>CFG_UFL_CHK</key>
<false/>
<key>CFG_UFL_STP</key>
<false/>
<key>CFG_USE_DPT</key>
<true/>
</dict>
<key>aty_properties</key>
<dict>
<key>DalForceSingleDispPipeSplit</key>
<integer>1</integer>
<key>PP_DisableVoltageIsland</key>
<integer>1</integer>
<key>PP_DriverEnableNBDPM</key>
<integer>1</integer>
<key>PP_GPUPowerDownEnabled</key>
<integer>0</integer>
<key>PP_GfxOffControl</key>
<integer>1</integer>
<key>PP_SclkDeepSleepDisable</key>
<integer>0</integer>
<key>PP_ThermalAutoThrottlingEnable</key>
<integer>1</integer>
<key>PP_ToolsLogSpaceSize</key>
<integer>524288</integer>
<key>PP_WorkLoadPolicyMask</key>
<integer>0</integer>
</dict>
</dict>
<key>AMDRadeonRenoirController</key>
<dict>
<key>CFBundleIdentifier</key>
<string>com.apple.kext.AMDRadeonX6000Framebuffer</string>
<key>IOClass</key>
<string>AMDRadeonX6000_AmdRadeonControllerNavi10</string>
<key>IOMatchCategory</key>
<string>ATIFramebuffer</string>
<key>IOPCIMatch</key>
<string>0x15E71002 0x164C1002 0x16381002 0x16361002</string>
<key>IOPCITunnelCompatible</key>
<true/>
<key>IOPCIUseDeviceMapper</key>
<true/>
<key>IOProbeScore</key>
<integer>6000</integer>
<key>IOPropertyMatch</key>
<dict>
<key>LoadController</key>
<true/>
</dict>
<key>IOProviderClass</key>
<string>IOPCIDevice</string>
<key>aty_config</key>
<dict>
<key>CFG_CORRECT_BLPT</key>
<true/>
<key>CFG_TRANS_WSRV</key>
<true/>
<key>CFG_UFL_CHK</key>
<false/>
<key>CFG_UFL_STP</key>
<false/>
<key>CFG_USE_DPT</key>
<true/>
</dict>
<key>aty_properties</key>
<dict>
<key>DalForceSingleDispPipeSplit</key>
<integer>1</integer>
<key>PP_GPUPowerDownEnabled</key>
<integer>0</integer>
<key>PP_GfxOffControl</key>
<integer>1</integer>
<key>PP_ToolsLogSpaceSize</key>
<integer>524288</integer>
<key>PP_WorkLoadPolicyMask</key>
<integer>0</integer>
</dict>
</dict>
<key>org.ChefKiss.NootedRed</key>
<dict>
<key>CFBundleIdentifier</key>
Expand Down
Loading

3 comments on commit ebfcc39

@jalavoui
Copy link

@jalavoui jalavoui commented on ebfcc39 Aug 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you confirm this panic ? it happens when trying to wake from sleep (artifacts.zip tested version from this commit) - note that this only happens after a long time of entering sleep mode. on short time sleep mode no issues.

0xffffffff000af7a0 : 0xffffff7fad164522 com.apple.kext.AMDRadeonX6000Framebuffer : **__ZN32AMDRadeonX6000_AmdRegisterAccess15validateHwStateEjjj** + 0x66
0xffffffff000af7e0 : 0xffffff7fad3155f7 com.apple.kext.AMDRadeonX6000Framebuffer : __ZN30AMDRadeonX6000_AmdAgdcServices24setSPINotificationsStateEP27AGDCAllowSPINotifications_t + 0x179a53
0xffffffff000af810 : 0xffffff7fad321db1 com.apple.kext.AMDRadeonX6000Framebuffer : __ZN30AMDRadeonX6000_AmdAgdcServices24setSPINotificationsStateEP27AGDCAllowSPINotifications_t + 0x18620d
0xffffffff000af870 : 0xffffff7fad31e5d1 com.apple.kext.AMDRadeonX6000Framebuffer : __ZN30AMDRadeonX6000_AmdAgdcServices24setSPINotificationsStateEP27AGDCAllowSPINotifications_t + 0x182a2d
0xffffffff000af8a0 : 0xffffff7fad3190f4 com.apple.kext.AMDRadeonX6000Framebuffer : __ZN30AMDRadeonX6000_AmdAgdcServices24setSPINotificationsStateEP27AGDCAllowSPINotifications_t + 0x17d550
0xffffffff000af8e0 : 0xffffff7fad316e51 com.apple.kext.AMDRadeonX6000Framebuffer : __ZN30AMDRadeonX6000_AmdAgdcServices24setSPINotificationsStateEP27AGDCAllowSPINotifications_t + 0x17b2ad
0xffffffff000af950 : 0xffffff7fad316f73 com.apple.kext.AMDRadeonX6000Framebuffer : __ZN30AMDRadeonX6000_AmdAgdcServices24setSPINotificationsStateEP27AGDCAllowSPINotifications_t + 0x17b3cf
0xffffffff000af9a0 : 0xffffff7fad31fe5a com.apple.kext.AMDRadeonX6000Framebuffer : __ZN30AMDRadeonX6000_AmdAgdcServices24setSPINotificationsStateEP27AGDCAllowSPINotifications_t + 0x1842b6
0xffffffff000afa40 : 0xffffff7fad31482b com.apple.kext.AMDRadeonX6000Framebuffer : __ZN30AMDRadeonX6000_AmdAgdcServices24setSPINotificationsStateEP27AGDCAllowSPINotifications_t + 0x178c87
0xffffffff000afb00 : 0xffffff7fad314bdd com.apple.kext.AMDRadeonX6000Framebuffer : __ZN30AMDRadeonX6000_AmdAgdcServices24setSPINotificationsStateEP27AGDCAllowSPINotifications_t + 0x179039
0xffffffff000afb10 : 0xffffff7fad180434 com.apple.kext.AMDRadeonX6000Framebuffer : __ZN32AMDRadeonX6000_AmdInterruptEvent8doEnableEv + 0x60
0xffffffff000afb40 : 0xffffff7fad1803c0 com.apple.kext.AMDRadeonX6000Framebuffer : __ZN32AMDRadeonX6000_AmdInterruptEvent6enableEPv + 0x10e
0xffffffff000afb80 : 0xffffff7fad1525ff com.apple.kext.AMDRadeonX6000Framebuffer : __ZN35AMDRadeonX6000_AmdRadeonFramebuffer17setInterruptStateEPvj + 0x45
0xffffffff000afbb0 : 0xffffff7fa5619bf8 com.apple.kext.AMDRadeonX5000 : __ZN37AMDRadeonX5000_AMDGraphicsAccelerator17setInterruptStateEPvj + 0x62
0xffffffff000afbe0 : 0xffffff7fa567cbc5 com.apple.kext.AMDRadeonX5000 : __ZN39AMDRadeonX5000_AMDGFX9PM4ComputeChannel24enableTimestampInterruptEv + 0x71
0xffffffff000afc10 : 0xffffff7fa56883f8 com.apple.kext.AMDRadeonX5000 : __ZN26AMDRadeonX5000_AMDHardware16enableInterruptsEv + 0x48
0xffffffff000afc30 : 0xffffff7fa561c507 com.apple.kext.AMDRadeonX5000 : __ZN37AMDRadeonX5000_AMDGraphicsAccelerator20callPlatformFunctionEPK8OSSymbolbPvS3_S3_S3_ + 0x403
0xffffffff000afc70 : 0xffffff7fad1965d9 com.apple.kext.AMDRadeonX6000Framebuffer : __ZNK34AMDRadeonX6000_AmdRadeonController18messageAcceleratorE25_eAMDAccelIOFBRequestTypePvS1_S1_ + 0x4f
0xffffffff000afc90 : 0xffffff7fad1948ce com.apple.kext.AMDRadeonX6000Framebuffer : __ZN34AMDRadeonX6000_AmdRadeonController6notifyE19_AmdControllerEventPv + 0x4fe
0xffffffff000afce0 : 0xffffff7fad178557 com.apple.kext.AMDRadeonX6000Framebuffer : **__ZN35AMDRadeonX6000_AmdRadeonFramebuffer6doWakeEv** + 0xc5
0xffffffff000afd00 : 0xffffff7fad178429 com.apple.kext.AMDRadeonX6000Framebuffer : __ZN35AMDRadeonX6000_AmdRadeonFramebuffer19setSystemPowerStateENS_15AmdFbPowerStateE + 0x1f
0xffffffff000afd20 : 0xffffff7fad17822b com.apple.kext.AMDRadeonX6000Framebuffer : __ZN35AMDRadeonX6000_AmdRadeonFramebuffer18doPowerStateChangeENS_15AmdFbPowerStateE + 0x43

@VisualEhrmanntraut
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has nothing to do with the new logic, I've seen a similar one even before this new technique. Sleep is defacto broken for 99% of machines and if it works it's usually by luck. #284 is related to this issue, and I am working on a new method for firmware injection.

@jalavoui
Copy link

@jalavoui jalavoui commented on ebfcc39 Aug 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

allright i did a long sleep test (check sleep time)

2024-08-**13 17:09**:51.228122+0100 localhost kernel[0]: (AMDRadeonX5000HWLibs) AMD TTL COS: smu_event_notify began 2024-08-13 17:09:51.228126+0100 localhost kernel[0]: (AMDRadeonX5000HWLibs) AMD TTL COS: smu_event_notify ended 2024-08-13 **17:44**:08.774337+0100 localhost kernel[0]: (AMDRadeonX6000Framebuffer) [7:0:0][GPUCAP] refresh() --- Family: 142, Device: 0x15d8, revNo: 1, pciRevNo: c9, emuRevNo: 66. 2024-08-13 17:44:08.774342+0100 localhost kernel[0]: (AMDRadeonX6000Framebuffer) [7:0:0][GPUCAP] refresh() --- Mem Size: FB: 2048 MB, Aper: 256 MB, Reg Aper: 512 KB. 2024-08-13 17:44:08.774345+0100 localhost kernel[0]: (AMDRadeonX6000Framebuffer) [7:0:0][GPUCAP] refresh() --- Mem Config: Width: 128, Type: DDR4. 2024-08-13 17:44:08.774347+0100 localhost kernel[0]: (AMDRadeonX6000Framebuffer) [7:0:0][GPUCAP] refresh() --- FB Base: 0xf400000000, Top: 0xf47fffffff, Offset: 0x1af000000. 2024-08-13 17:44:08.774351+0100 localhost kernel[0]: (AMDRadeonX6000Framebuffer) [7:0:0][GPUCAP] refresh() --- Branding - family: "Radeon"; device: "Vega 8"; model: "AMD Radeon Vega 8". 2024-08-13 17:44:08.774361+0100 localhost kernel[0]: (AMDRadeonX5000) [7:0:0] [Accel] --- Before TTL:powerUp() - BootLoader Version=0xffffffff, POST Code=0xffffffff, Ready=0xffffffff 2024-08-13 17:44:08.774365+0100 localhost kernel[0]: (AMDRadeonX5000) [7:0:0] [Accel] >>> Calling TTL::powerUp() 2024-08-13 17:44:08.794367+0100 localhost kernel[0]: (AMDRadeonX5000HWLibs) AMD TTL COS: [7:0:0]: Write PCI Config offset 0x60 size 2 data 0x2930 2024-08-13 17:44:08.794470+0100 localhost kernel[0]: (AMDRadeonX5000HWLibs) AMD TTL COS: [7:0:1]: Write PCI Config offset 0x60 size 2 data 0x20 2024-08-13 17:44:08.794490+0100 localhost kernel[0]: (AMDRadeonX5000HWLibs) AMD TTL COS: [7:0:0]: Write PCI Config offset 0x60 size 2 data 0x100 2024-08-13 17:44:08.794588+0100 localhost kernel[0]: (AMDRadeonX5000HWLibs) AMD TTL COS: [7:0:1]: Write PCI Config offset 0x60 size 2 data 0x100 2024-08-13 17:44:08.794604+0100 localhost kernel[0]: (AMDRadeonX5000HWLibs) AMD TTL COS: smu_event_notify began 2024-08-13 17:44:08.797827+0100 localhost kernel[0]: (AMDRadeonX5000HWLibs) AMD TTL COS: smu_event_notify ended 2024-08-13 17:44:08.798560+0100 localhost kernel[0]: (AMDRadeonX5000HWLibs) AMD TTL AMDLOG: [7:0:0] PSP: event_id=0x100211 event_info:type=2 hw_id=0 event_specific_tag=0x0 pData=0x0 data_size=0 psp_hardware_initialization finished loading PSP FWs 2024-08-13 17:44:08.830156+0100 localhost kernel[0]: (AMDRadeonX5000HWLibs) AMD TTL AMDLOG: [7:0:0] PSP: event_id=0x180209 event_info:type=2 hw_id=0 event_specific_tag=0x0 pData=0x0 data_size=0 psp_hdcp_resume finished 2024-08-13 17:44:08.889800+0100 localhost kernel[0]: (AMDRadeonX5000HWLibs) AMD TTL AMDLOG: [7:0:0] PSP: event_id=0x100601 event_info:type=2 hw_id=0 event_specific_tag=0x0 pData=0x0 data_size=0 psp_power_up_event finished non PSP FW loading 2024-08-13 17:44:08.916402+0100 localhost kernel[0]: (AMDRadeonX5000) [7:0:0] [Accel] <<< TTL::powerUp() Completed successfully. 2024-08-13 17:44:08.916409+0100 localhost kernel[0]: (AMDRadeonX5000) [7:0:0] [Accel] >>> Calling ::powerUpCAIL() 2024-08-13 17:44:08.918197+0100 localhost kernel[0]: (AMDRadeonX5000) [7:0:0] [Accel] <<< ::powerUpCAIL() Completed successfully. 2024-08-13 17:44:08.918579+0100 localhost kernel[0]: (AMDRadeonX6000Framebuffer) [7:0:0] [PPLIB] initializePowerTuneParameters() !!! HW TDP Limit is 0, use a default value. 2024-08-13 17:44:08.925110+0100 localhost kernel[0]: (AMDRadeonX5000) [7:0:0]: Controller is enabled, finish initialization 2024-08-13 17:44:08.984669+0100 localhost kernel[0]: (AMDRadeonX5000) [7:0:0]: AMD ERROR! VRR FAILED TIMESTAMPS : Last frame: 1479697033916, Transaction complete 1479713699666, Next Frame: 0 2024-08-13 17:44:08.984903+0100 localhost kernel[0]: (AMDRadeonX5000) [7:0:0]: AMD ERROR! VRR FAILED TIMESTAMPS : Last frame: 1479697305876, Transaction complete 1479713971626, Next Frame: 0 2024-08-13 17:44:08.985024+0100 localhost kernel[0]: (AMDRadeonX5000) [7:0:0]: AMD ERROR! VRR FAILED TIMESTAMPS : Last frame: 1479697527361, Transaction complete 1479714193111, Next Frame: 0 2024-08-13 17:44:12.886751+0100 localhost kernel[0]: (AMDRadeonX6000Framebuffer) [7:0:0] [CUR:0] saveCursorPosition() !!! Cursor Image has not been set. 2024-08-13 17:44:12.891689+0100 localhost kernel[0]: (AMDRadeonX6000Framebuffer) [7:0:0] [CUR:0] saveCursorPosition() !!! Cursor Image has not been set. 2024-08-13 17:44:13.657843+0100 localhost kernel[0]: (AMDRadeonX5000) [7:0:0]: AMD ERROR! VRR FAILED TIMESTAMPS : Last frame: 1483829669200, Transaction complete 1483845638692, Next Frame: 0

this is the expected behaviour of returning from a long sleep cycle (35 minutes) - all good.
now maybe just luck but the only thing i changed on github nred.cpp source is:

this->iGPU->enablePCIPowerManagement(kPCIPMCSPowerStateD0);//PCI Power Management is disabled. this->iGPU->setMemoryEnable(true); this->iGPU->setBusMasterEnable(true);

and the usual panic avoid for opengl in X5000.cpp (check code in insanly)

Please sign in to comment.