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

#81
sea_man

sea_man

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 129 posts
  • Gender:Male
  • Location:Bogota D.C - Colombia
ok tested and it sleep fine , but never wake up.. until i press the power button.

#82
Rampage Dev

Rampage Dev

    InsanelyMac Deity

  • Local Moderators
  • 1,996 posts
  • Gender:Male

ok tested and it sleep fine , but never wake up.. until i press the power button.


Could be a issue with you having to use SleepEnabler.kext

#83
eep357

eep357

    Triple Platinum

  • Supervisors
  • 2,527 posts
  • Gender:Male
  • Location:Dark Side of The Wall
  • Interests:things and stuff
Yeah, should be able to wake with keyboard......But I want better than just auto sleep, I want auto wake too! So, issue I had was that wake cannot be scheduled in "seconds from sleep" as far as I know. My solution isn't the most elegant but seems to be working, I'm still working out a few kinks, but here's the basics: Set a scheduled wake event to occur around 12:00:20 every day, so 20 seconds after 12:00. This would cause an already sleeping computer to wake at this time if your intention was to have it sleeping. I don't sleep except for this junk. Created automator launch app that runs shell script
systemsetup -setusingnetworktime off | systemsetup -settime 12:00:00 | pmset sleepnow
This turns off internet updated time and sets the clock to 12:00:00 right before putting the computer to sleep, then the scheduled wake event will wake it back up a few seconds later. So then my next step is to run another script that runs on wake which will set back internet updated time using
#!/bin/bash
ntpdate -u time.apple.com
to do this I'm using (and still fiddling with) an utility called SleepWatcher (launch daemon) than can run scripts on sleep or wake. The tricky part is the above command requires sudo, and I don't wan't to have to enter my password to have the time corrected when it wakes up. It's possible to do this without having to enter password and there are a few ways, but one must be very careful not to open a security hole in the process. For this reason I wouldn't want to give specific directions and I'm honestly still fiddling with the best/secure method of doing this. The automated sleep/wake part works a treat! But if I had to interact in anyway to restore my system time after each wake, it would take any gained convenience out.

suppose
systemsetup -setusingnetworktime on
might work instead of ntpdate and save that whole headache, will have to give that a go

#84
eep357

eep357

    Triple Platinum

  • Supervisors
  • 2,527 posts
  • Gender:Male
  • Location:Dark Side of The Wall
  • Interests:things and stuff
BTW, got it all working great!, as outlined above and using

systemsetup -setusingnetworktime on

on wake up. Only caveat is wake time will be rounded to nearest minute by system, so set wake time to 00:01 (can just do this in system preferences) and system time change to 00:00:50 giving it a 10 second sleep. If it takes a while to sleep and shut everything down and it misses it's wake event it won't wake, so finding the right delay is key. Mine takes a while (actually set mine for like 30 secs) because got over 10 hard drives that gotta do their thing before it fully sleeps. Once it wakes up, time is set to normal and I never even see the time change except maybe for a second right when the screen wakes up. Not as fast as EFI/UEFI, but I don't reboot that often, and at least I don't have to babysit it when I do.

#85
k3nny

k3nny

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 538 posts
  • Gender:Male
In case your vendor doesn't provide any hybrid vbios, it is possible to create your own.
I used my XFX legacy vbios and added the EFI part from a similar MSI card.

The XFX legacy vbios got following structure:

1) Legacy part from 0x00000 to 0x0FFFF
0x00000-0x00001: Signature = 0x55 0xAA
0x00002: Length = 0x80 -> 0x80 * 0x200 (block length) = 0x10000

2) Unused space from 0x10000 to 0x1FFFF

The MSI hybrid vbios - on the other hand - looks like this:

1) Legacy part from 0x00000 to 0x0FFFF
0x00000-0x00001: Signature = 0x55 0xAA
0x00002: Length = 0x80 -> 0x80 * 0x200 = 0x10000

2) EFI part from 0x10000 to 0x1FE00
0x10000-10001: Signature = 0x55 0xAA
0x10002: Length = 0x7F -> 0x7F * 0x200 = 0x0FE00

We can now replace the unused space in the legacy vbios with the EFI driver.

Additionally a flag needs to be changed, symbolizing the legacy part is not alone. To find its offset, search for the string "PCIR" and add 17 bytes. I my case it was 0x0023D.
Change it from 0x80 to 0x00.

Last but not least the 8-bit checksum in the last byte of the legacy part needs to be recalculated, which can be done - for example - with the "fixrom" script.
You can find the script and the background for all this information here: http://forum.netkas....59.html#msg3859

I suggest to verify all the changes and the file size by hand to be sure everything is alright.

If you do not know what you are doing, it is better to wait for your vendor to release a hybrid vbios.

Edited by k3nny, 09 May 2013 - 11:33 PM.


#86
tofagerl

tofagerl

    InsanelyMac Protégé

  • Members
  • Pip
  • 31 posts
Ok, I am now pretty damn sure that the problem is a bad implementation of non-UEFI bioses on the 7000-series. I've contacted MSI to try to get a UEFI bios for my card to make sure.

#87
grillaccio

grillaccio

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 182 posts
  • Gender:Male
Posted ImageVendor ID 1002
Device ID 6819
Subvendor ID 1787
SubDevice ID 201C






Sempre scheda grafica (ma relativa all'audio)


Vendor ID 1002


Device ID AAB0


Subvendor ID 1787


SubDevice ID AAB0






hi in dsdt ?

}
Device (GFX0)
{
Name (_ADR, Zero)
Method (_DSM, 4, NotSerialized)
{
Store (Package (0x10)
{
"AAPL,slot-name",
Buffer (0x07)
{
"Slot-1"
},
"device-id",
Buffer (0x04)
{
0x19, 0x68, 0x00, 0x00
},
"@0,name",
Buffer (0x08)
{
"ATY,Aji"
},
"@1,name",
Buffer (0x08)
{
"ATY,Aji"
},
"@2,name",
Buffer (0x08)
{
"ATY,Aji"
},
"@3,name",
Buffer (0x08)
{
"ATY,Aji"
},
"model",
Buffer (0x13)
{
"AMD Radeon HD 7850"
},
"hda-gfx",
Buffer (0x0A)
{
"onboard-1"
}
}, Local0)
DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
Return (Local0)
}
}
is correct? thanks

Edited by grillaccio, 06 March 2013 - 06:22 PM.


#88
sea_man

sea_man

    InsanelyMac Geek

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

Saphire launch a 7950 Mac Edition !!

LINK:

http://translate.goo...058864/&act=url

#89
DAXGr

DAXGr

    InsanelyMac Protégé

  • Members
  • PipPip
  • 60 posts
  • Gender:Male
  • Location:Thessaloniki - Greece
  • Interests:C#, Game development and hobbyist automation.
When I go to 0x23D on my Sapphire HD7970 the byte is already 0x00 but I see no EFI VBIOS(10000-1FFFF is filled with 0xFFs). I have attached it here if anyone can take a look and see why is that?Attached File  Tahiti.rar   39.64KB   5 downloads

Nice news !!

Saphire launch a 7950 Mac Edition !!

LINK:

http://translate.goo...058864/&act=url


Now we need a 7970 Mac :)

#90
k3nny

k3nny

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 538 posts
  • Gender:Male
@DAXGr:
Here is the VBIOS I copied the EFI part from for my video card: Attached File  msi_7870_hybrid.zip   102.9KB   32 downloads
If you compare the structure of both, the offset for the flag is probably 0x241 and is set to 0x80.

#91
DAXGr

DAXGr

    InsanelyMac Protégé

  • Members
  • PipPip
  • 60 posts
  • Gender:Male
  • Location:Thessaloniki - Greece
  • Interests:C#, Game development and hobbyist automation.

@DAXGr:
Here is the ROM I copied the EFI part from for my video card: Attached File  msi_7870_hybrid.zip   102.9KB   32 downloads
If you compare the structure of both ROMs, the offset for the flag in your ROM is probably 0x241 and is set to 0x80.

OK! Will try with UEFI Clover and 10.8.3 and see what I get, thankfully I have dual bios on the card

EDIT: Wait I see 7870, I have a 7970 would it be a problem?

#92
k3nny

k3nny

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 538 posts
  • Gender:Male
From which VBIOS do you plan to copy the EFI part? That might be interesting for others as well.

EDIT: Most probably it will be. You need to find a 7970 vbios for a card with similar hardware.

#93
DAXGr

DAXGr

    InsanelyMac Protégé

  • Members
  • PipPip
  • 60 posts
  • Gender:Male
  • Location:Thessaloniki - Greece
  • Interests:C#, Game development and hobbyist automation.

From which VBIOS do you plan to copy the EFI part? That might be interesting for others as well.

EDIT: Most probably it will be. You need to find a 7970 vbios for a card with similar hardware.

I downloaded this prior to try and patch it http://www.techpower...072.120718.html

#94
k3nny

k3nny

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 538 posts
  • Gender:Male
That one definitely got an EFI driver :P Any success yet?

#95
Samawa

Samawa

    InsanelyMac Protégé

  • Members
  • Pip
  • 17 posts
  • Gender:Male
grillaccio: can you please share this launch script that you have setup? i got a bit confused at your description, but would like to give it ago if you dont mind sharing!

k3nny: where did you get the efi driver to inject it into the bios? i have an xdx 7970 ghz edition and would like to try patching my bios

#96
k3nny

k3nny

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 538 posts
  • Gender:Male
@Samawa:
I used an MSI vbios from a card with similar hardware and clocks. The "efi driver" is the "efi part" - just to avoid any misunderstandings.

#97
Samawa

Samawa

    InsanelyMac Protégé

  • Members
  • Pip
  • 17 posts
  • Gender:Male
k3nny: anyway I can convince you to mod mine, for .. you know .. science? Because I really wouldn't know where to start, If it works we can share it on line here and save a lot of people some grief.


http://www.mediafire...4hvwwf4l6zubqdz

#98
k3nny

k3nny

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 538 posts
  • Gender:Male
For science it is then: Attached File  xfx_hd7970_ghz.zip   473.5KB   19 downloads
The efi part is from an MSI R7970-2PMD3GD5/OC.

Flashing at your own risk in DOS with "atiflash -f -p 0 new.rom".
After a reboot you can see if atiflash recognizes the new vbios with "atiflash.exe -ai 0"

#99
Samawa

Samawa

    InsanelyMac Protégé

  • Members
  • Pip
  • 17 posts
  • Gender:Male
Will do this now! thanks k3nny will report back, for science!

#100
fatez

fatez

    InsanelyMac Protégé

  • Members
  • PipPip
  • 64 posts
  • Gender:Male
  • Location:Italy - Bolzano

For science it is then: Attached File  xfx_hd7970_ghz.zip   473.5KB   19 downloads
The efi part is from an MSI R7970-2PMD3GD5/OC.

Flashing at your own risk in DOS with "atiflash -f -p 0 new.rom".
After a reboot you can see if atiflash recognizes the new vbios with "atiflash.exe -ai 0"


K3nny does this patch resolve the sleep trick?





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


0 user(s) are reading this topic

0 members, 0 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