Jump to content

HD 7xxx-Can we eliminate the Sleep Trick?

7970 7xxx sleep trick

  • Please log in to reply
186 replies to this topic

#1
eep357

eep357

    Triple Platinum

  • Retired
  • 2,527 posts
  • Gender:Male
  • Location:Dark Side of The Wall
  • Interests:things and stuff
OK, so the goal here is/was two-fold. 1) Not fill the 10.8.3 thread with our 7xxx discussions. 2) Consolidate any testing results, thoughts, ideas, informations, theories, rumors, whatevers...In hopes we can boot without using the "Sleep Trick" (I hate that name BTW, I'm open to anything better :wink2: ).

Oh, any other 7xxx cool stuff, updates, tweaks, etc. is all good and is "on topic". However this is not a support thread.

If and when Apple actually releases Macs that have these GPU's, it may become much easier to figure out what we need to do different, or maybe a bootloader fix to handle differences in vbios vs. EFI. For right now with 10.8.3 in beta, we are but a small few, so I would expect more progress to be possible after an official release. Also this is not a "how to" thread. If your posting here, you should already have full HW acceleration working, CI, QE, transparent Chess ripples, yada, yada. Basically 100% "Bad Ass" except for having to sleep and wake you Hack at boot to get the desktop to show!. To start off, I'm just copying a post I was about to put in the 10.8.3 thread, but realized it was not the appropriate place. Quoted in full, including the part where I apologize for doing so :)



Still no straight boot with 7870. I'm not giving up hope yet.

Me neither, but I don't expect Apple to fix it, we will! Right now there is just a small handful of us using 7xxx cards in OSX, with our shared knowledge mostly consisting of either "it works!" or "help, how do I make it work?" :) There are quite a few settings that can be changed in the controller's plist. The ones actually showing for certain FB's are those that are different from default. So you'll see a few options listed for each framebuffer, then what appears to be a "default" set. I honestly don't know what half of them do (OK more than half). Easiest would be if any 7xxx card would boot straight to desktop, then we could see what framebuffer it uses and what settings maybe different for it. If it's not that easy and tinkering with various parameters is needed, the more people out there to try things, the faster it will go. So for example here are the "default" options in the controller.
<key>aty_config</key>
<dict>
<key>CFG_CAA</key>
<integer>0</integer>
<key>CFG_FB_LIMIT</key>
<integer>0</integer>
<key>CFG_GEN_FLAGS</key>
<integer>0</integer>
<key>CFG_INT_SSPC</key>
<integer>25</integer>
<key>CFG_NO_HDCP</key>
<false/>
<key>CFG_NO_PP</key>
<false/>
<key>CFG_USE_FBC</key>
<false/>
<key>CFG_USE_STUTTER</key>
<false/>
<key>DALReadDelayStutterOff</key>
<integer>4</integer>
<key>DALUseUrgencyWaterMarkOffset</key>
<integer>0</integer>
</dict>
<key>aty_properties</key>
<dict>
<key>PP_ActivitySamplingInterval</key>
<integer>1000</integer>
<key>PP_DALPowerLevel</key>
<integer>1</integer>
<key>PP_DisableCAC</key>
<integer>0</integer>
<key>PP_DisablePowerContainment</key>
<integer>0</integer>
<key>PP_DisableULV</key>
<integer>0</integer>
<key>PP_DriverCalculateCACLeakage</key>
<integer>1</integer>
<key>PP_HighSamplingInterval</key>
<integer>200000</integer>
<key>PP_MCLKStutterModeThreshold</key>
<integer>40000</integer>
<key>PP_PowerGatingDisable</key>
<integer>0</integer>
<key>PP_R600ActivityHysteresis</key>
<integer>5</integer>
<key>PP_R600LoweringHighPercentage</key>
<integer>25</integer>
<key>PP_R600LoweringMediumPercentage</key>
<integer>10</integer>
<key>PP_R600RaisingLowPercentage</key>
<integer>10</integer>
<key>PP_R600RaisingMediumPercentage</key>
<integer>25</integer>
<key>PP_R600VotingRightsClients</key>
<integer>12583475</integer>
<key>PP_UserMaxClockForMultiDisplays</key>
<integer>1</integer>
and the FB specific options:
<key>ATY,Chutoro</key>
<dict>
<key>aty_config</key>
<dict>
<key>CFG_USE_STUTTER</key>
<true/>
</dict>
<key>aty_properties</key>
<dict>
<key>PP_DriverCalculateCACLeakage</key>
<integer>1</integer>
</dict>
</dict>
<key>ATY,Hamachi</key>
<dict>
<key>aty_config</key>
<dict>
<key>CFG_USE_SM</key>
<true/>
</dict>
one of those FB specific options <key>CFG_USE_SM</key> does not appear in the larger default list. Now maybe I completely wrong here, which is very possible, but in my mind that tells me that the possible options that could be added to the controller's info.plist is actually much larger. looking at the controller in a hex editor and searching for one of the above options like "PP_DriverCalculateCACLeakage" we can find it, along with many more "option looking" entries all around it. Here is just a excerpt:
PP_PCIeLaneOverridePP_DALPowerLevelPP_DisableEngineTransitionPP_DisableMemoryTransitionPP_DisableVoltageTransitionPP_CGCGDisablePP_MMClockGatingEnabledPP_MemorySSEnabledPP_EngineSSEnabledPP_DynamicPCIEGen2EnabledPP_MGCGDisablePP_MGCGCGTSSMDisablePP_LSCGDisablePP_PowerGatingDisablePP_StayInBootStatePP_DisableLightSleepPP_DisableDPMPP_UserMaxClockForMultiDisplaysPP_DisableSMUUVDHandshakePP_DisablePCIePerformanceRequestPP_ThermalAutoThrottlingEnablePP_UVDDPMPP_VCEDPMPP_SAMUDPMPP_ACPDPMPP_MCLKRttModeThresholdPP_DisablePowerContainmentPP_DisableCACPP_DisableSQRampingPP_FastWaterMarkTresholdPP_NearTDPDecPP_AboveSafeIncPP_BelowSafeIncPP_TDPSafeLimitPercentPP_MaxPSPercent_HPP_MaxPSPercent_MPP_DriverCalculateCACLeakagePP_CACConfigurationRequiredPP_EnableCACLongTermAveragePP_LTAWindowSizePP_LTSTruncatePP_UsePowerBoostLimitPP_RegisterWriteRingSizePP_SQRampingThresholdPP_DisablePPMPP_Apple_Bootcamp_EnablePP_FanControlCycleDelayPP_PhmSoftPowerPlayTablePP_ASPML0sInactivity
Some of them look very interesting. Again, kinda thinking out loud and I am no GPU driver guru. I apologize for going way off topic with a huge post. Please don't respond to it here. I'll start a ATI/AMD 7xxx development thread and copy it and a few others from here to it as a starting point, any further discussion can can be done there.

#2
sea_man

sea_man

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 129 posts
  • Gender:Male
  • Location:Bogota D.C - Colombia
Nice!!

Fixing the sleep trick we will have the best gpu in our hackintosh working 100% ! !

In the netkas forum someone talk about to eliminate the sleep trick or the cold boot bug trying to loading the graphicdriver twice. i suppose making some modification in the chameleon or something else...
But the guy who post this in the netkas forum don't find the source.. :(

http://forum.netkas....pic,5460.0.html

#3
eep357

eep357

    Triple Platinum

  • Retired
  • 2,527 posts
  • Gender:Male
  • Location:Dark Side of The Wall
  • Interests:things and stuff
Def one for the rumor pile :) But that's OK, sometimes rumors come true, and gathering it all here is the idea :thumbsup_anim:

Here's something I've seen, not on every boot, but occasionally my Console will have a huge GPU debug listing startup, before doing the "sleep trick". Like this with some of the repeated debugs removed:
1/17/13 1:34:31.000 PM kernel[0]: GPU Hang State = 0x0000000e
1/17/13 1:34:31.000 PM kernel[0]: AMDTahitiGraphicsAccelerator: ** Device in slot: SLOT-1 **
1/17/13 1:34:31.000 PM kernel[0]: ** GPU Debug Info Start **
1/17/13 1:34:31.000 PM kernel[0]: 0x00006798
1/17/13 1:34:36.000 PM kernel[0]: 0x00000000
1/17/13 1:34:36.000 PM kernel[0]: 0x00000000
1/17/13 1:34:37.000 PM kernel[0]: 0x00000000
********************WHOLE BUNCH OF THIS!!!!!!!!!***************
1/17/13 1:34:37.000 PM kernel[0]: 0x00000000
1/17/13 1:34:37.000 PM kernel[0]: 0x00000000
1/17/13 1:34:37.000 PM kernel[0]: ** GPU Debug Info End **
1/17/13 1:34:37.000 PM kernel[0]: GPU hang: Not Implemented
1/17/13 1:34:37.000 PM kernel[0]: Trying restart GPU ...
1/17/13 1:34:48.770 PM com.apple.usbmuxd[103]: _handle_timer heartbeat detected detach for device 0x1-192.168.1.68:0!
1/17/13 1:35:15.000 PM kernel[0]: Wake reason: ? (Network)
1/17/13 1:35:15.000 PM kernel[0]: Previous Sleep Cause: 5
1/17/13 1:35:15.000 PM kernel[0]: The USB device WirelessControllerDevice (Port 2 of Hub at 0x1a000000) may have caused a wake by issuing a remote wakeup (2)
When this happens, a permission repair afterward will usually give this:
Group differs on “private/var/db/GPURestartReporter”; should be 0; group is 80.
Permissions differ on “private/var/db/GPURestartReporter”; should be drwxr-xr-x ; they are drwxrwxr-x .
Repaired “private/var/db/GPURestartReporter”
Not sure if "GPURestartReporter" is just responsible for logging, of if it plays a larger role, but it would seem the GPU is (at least on occasion) crashing and is not being re-enabled until after doing the "sleep trick". Or possibly it happens every time, but is not always logged?

#4
eep357

eep357

    Triple Platinum

  • Retired
  • 2,527 posts
  • Gender:Male
  • Location:Dark Side of The Wall
  • Interests:things and stuff
OK, and a little more maybe useless info just prior to GPU restart:
1/18/13 4:11:13.274 PM coreaudiod[167]: HALDefaultDevice::GetDefaultDevice: server returned 0 for the default device, so picking one locally
1/18/13 4:11:13.274 PM coreaudiod[167]: HALDefaultDevice::GetDefaultDevice: server returned 0 for the default device, so picking one locally
1/18/13 4:11:13.274 PM coreaudiod[167]: HALDefaultDevice::GetDefaultDevice: server returned 0 for the default device, so picking one locally
1/18/13 4:11:13.275 PM coreaudiod[167]: HALDefaultDevice::GetDefaultDevice: server returned 0 for the default device, so picking one locally
1/18/13 4:11:13.276 PM UserEventAgent[160]: HALDefaultDevice::GetDefaultDevice: server returned 0 for the default device, so picking one locally
1/18/13 4:11:13.276 PM UserEventAgent[160]: HALDefaultDevice::GetDefaultDevice: server returned 0 for the default device, so picking one locally
1/18/13 4:11:22.000 PM kernel[0]: GPU Hang State = 0x0000000e
1/18/13 4:11:22.000 PM kernel[0]: AMDTahitiGraphicsAccelerator: ** Device in slot: SLOT-1 **
1/18/13 4:11:22.000 PM kernel[0]: ** GPU Debug Info Start **
1/18/13 4:11:22.000 PM kernel[0]: 0x00006798
1/18/13 4:11:22.000 PM kernel[0]: 0x00000096
1/18/13 4:11:22.000 PM kernel[0]: 0x00000001
1/18/13 4:11:22.000 PM kernel[0]: 0x00000018
Seem to always have the coreaudio junk there, but more interesting is "1/18/13 4:11:22.000 PM kernel[0]: AMDTahitiGraphicsAccelerator: ** Device in slot: SLOT-1 **" as this is the second time it shows up, once earlier in boot log as expected, but this second showing I don't remember seeing on other GPU's. Almost like PCIe slot detecting GPU for a second time....I dunno. There is some PCIe options hidden in ATI7000Controller

#5
k3nny

k3nny

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 540 posts
  • Gender:Male
It works! (jk :thumbsup_anim: )

Finally an own thread for an important issue :wink2: .
I thought about opening one already but dropped the idea because I didn't have much to contribute.

I followed the 7xxx development for some time and if I remember correctly there are some 79xx people who can successfully boot into Mac without using any workarounds.
It would be interesting to see their boot process and system logs. It might provide some hints.

@eep357:
Where can I find the FB specific options? I really would like a take a look at the different FBs.
Are you sure you didn't have any restarts during this time? Seems quite long to me.
If not, it seems you GPU really had a hang and was initialized again.

PS:
In case someone needs a framebuffer for the XFX 7870 DD, take a look here

Edited by k3nny, 19 January 2013 - 07:23 PM.


#6
eep357

eep357

    Triple Platinum

  • Retired
  • 2,527 posts
  • Gender:Male
  • Location:Dark Side of The Wall
  • Interests:things and stuff
no restarts other than the GPU restart which actually happens pretty quick, but the time length in log is longer because I don't run to computer and hit button to sleep and wake it right away. Options are in ATI7000controller.kext info.plist. I've added a few that aren't there but are in the actual controller's encoded binary which can be found by opening it with Hex Fiend. For example added "PP_Apple_Bootcamp_Enable" and gave it a "1" value for true. Have changed some of the existing ones that are either true/false (1/0) but not any of the ones that use other number values. Can see all the changes are registering in IOreg, but haven't seen any performance changes. The GpuCrashDump I mentioned earlier is actually an empty folder where the crash log would go if generated and would be generated by OpenCL framework and a launch agent plist, but have not had the report actually get created yet. Just empty folder for it.

#7
k3nny

k3nny

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 540 posts
  • Gender:Male
Sigh, can't boot into Mac anymore right now. Probably some weird Aptio Clover combination bug.

I changed some CFG settings in ATI7000Controller and it failed to boot since then.
Here a list I found for the 7xxx series:

CFG_USE_SRRB
CFG_MCIL_DEFER
CFG_MCIL_DELAY
CFG_DP_SSPC
CFG_DP_SSMS
CFG_DP_SSFQ
CFG_INT_SSPC
CFG_INT_SSMS
CFG_INT_SSFQ
CFG_DIG_SSPC
CFG_DIG_SSMS
CFG_DIG_SSFQ
CFG_FB_NAME
CFG_COLOR_FORMAT
CFG_PICON
CFG_DTILE
CFG_TDITH
CFG_LDITH
CFG_PG
CFG_VCLKEMI
CFG_DACC
CFG_DGPIO
CFG_RIGNR
CFG_GPIO_HIGH
CFG_GPIO_LOW
CFG_FORCE_ICLK
CFG_GRPH_CONTROL
CFG_SURFACE_INFO
CFG_NO_AUDIO
CFG_TACFLAGS
CFG_LACFLAGS
CFG_NO_PP
CFG_PPL
CFG_MINPPL
CFG_MAXPPL


#8
eep357

eep357

    Triple Platinum

  • Retired
  • 2,527 posts
  • Gender:Male
  • Location:Dark Side of The Wall
  • Interests:things and stuff
where did you get that list? See some that are familiar and not others that are in the info.plist which I included in 1st post. Make any changes to the plist and not the controller or you'll change the offset's and it won't load. Oh, and always make a back up :)

#9
k3nny

k3nny

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 540 posts
  • Gender:Male
They are in the AMD7000Controller binary.
I changed the general settings in the Info.plist, under the ones for Chutoro and Hamachi.
I reverted to the backup but I can't boot.. :D

EDIT:

AMDRadeonAccelerator - Info.plist:
		<key>AMDPitcairnGraphicsAccelerator</key>
		<dict>
			<key>GpuDebugPolicy</key>
			<integer>0</integer>
, respectively AMDTahitiGraphicsAccelerator for 79xx, may help us get some more info.

Setting is to 1 results in:

1/20/13 11:13:53.000 AM kernel[0]: ** m_gpuDebugPolicy value = 0x00000001
1/20/13 11:13:53.000 AM kernel[0]: AMDPitcairnGraphicsAccelerator: ** Device in slot: SLOT-1 **

EDIT2:

Tried some new BoardIDs that came with the beta. No success either.

Just curious.. have you got any lags while resizing a Google Chrome window of the current beta with any page open? I do.

Edited by k3nny, 20 January 2013 - 06:12 PM.


#10
zumuzza

zumuzza

    InsanelyMac Protégé

  • Members
  • Pip
  • 21 posts
  • Gender:Male
Hello I have a amd 7750, and I have a white screen, how can I fix this?

#11
sea_man

sea_man

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 129 posts
  • Gender:Male
  • Location:Bogota D.C - Colombia

Hello I have a amd 7750, and I have a white screen, how can I fix this?


Did you read the first post ?

Anyway.. the note in the first post also ( theoretical ) apply to any AMD 7*** series GPU.

#12
Thunderbolt

Thunderbolt

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 244 posts

Hello I have a amd 7750, and I have a white screen, how can I fix this?


I think everyone is talking about putting the system to sleep and wake it up, i.e. press the power button and make it sleep and then press it again.

Do try different ports.

I have the same 7750 but I am still running 10.8.0 and on an AMD system so I guess i cannot do much. Even I get the white screen.

#13
Thunderbolt

Thunderbolt

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 244 posts
I am just doing fun based experiments. I got my rom file from w7 using gpuz and used it under ML with GE=Yes and UseAtiRom=Yes , it detected the FB as Chutoro and ports 5 and that was it , it did not go any further and no error msg no keys working nothing so had to reboot, the bootloader is Enoch BTW. Hey this is just for fun I am doing , just awaiting ML 10.8.3 final release. I am not using the ATI7000controller.kext which I got from osx86.net as that causes a white screen and using an AMD CPU I cannot enable the sleep function with the power button.

Right now I am using the full res i.e. 1600x900.

Let me try again with GE=Yes.

#14
k3nny

k3nny

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 540 posts
  • Gender:Male
@eep357:
Have you had any success optimizing settings for your card?
I tried to change some but the best I could get was a downgrade in performance.

#15
zumuzza

zumuzza

    InsanelyMac Protégé

  • Members
  • Pip
  • 21 posts
  • Gender:Male
Guys I installed 10.8.3 I solved the white screen, but do not understand why I still read 3MB GPU

#16
k3nny

k3nny

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 540 posts
  • Gender:Male
What exactly did you do to solve it? Which card have you got?
You are probably in safe mode and OSX didn't load the complete driver set for your card.

#17
Thunderbolt

Thunderbolt

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 244 posts

Guys I installed 10.8.3 I solved the white screen, but do not understand why I still read 3MB GPU


That 3MB memory is because your needed kexts for the card is not loading. If you check the system profile / it should show you if any kext is being loaded.

#18
zumuzza

zumuzza

    InsanelyMac Protégé

  • Members
  • Pip
  • 21 posts
  • Gender:Male
He says that there are no kext loaded.

#19
Thunderbolt

Thunderbolt

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 244 posts

He says that there are no kext loaded.


That is the reason it shows as a 3 MB card . you will not have QE/CI . are you using GraphicsEnabler=No in the boot flag ? also try AtiConfig= Chutoro in the boot flag

#20
zumuzza

zumuzza

    InsanelyMac Protégé

  • Members
  • Pip
  • 21 posts
  • Gender:Male
AtiConfig= Chutoro in org.chameleon.Boot?





Also tagged with one or more of these keywords: 7970, 7xxx, sleep trick


2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users

© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy