재웠는데 깨어나나요? EHCI, XHCI관련 자동깨어남 방지팁.
- Mactopia
- 1994
- 0
Mactopia님의 기기정보
x86osx.com의 울트라뽕님이 공유해주신 글입니다.
https://x86osx.com/bbs/view.php?select_arrange=headnum&desc=asc&id=osxtips&no=3777
****** 이 후킹패치를 할때 가장 중요한것은 Vendor-id와 Subsystem-id, Subsystem-vendor-id입니다.
*******
****** 위부분을 적용하지 않으면 후킹의 의미가 없어지기때문에 깨어남이 계속될수 있습니다. ******
이
방법은 맥의 Subsystem관련 id가 다르기때문에 생기는 문제에 적용 가능합니다.
맥에서 완전히 지원하는듯 잘 작동은 되지만 이런 작은
차이때문에 약간의 오작동을 하는경우 간단하게 맥과 같게 후킹해줌으로써 완전하게 작동하도록 하는 간단한 팁입니다.
MacPro5,1 4,1
Method (_DSM,
4, NotSerialized) // _DSM: Device-Specific Method
{
Store (Package
(0x0D)
{
"vendor-id", <------ vendor-id, subsystem-id,
subsystem-vendor-id가 조금씩 다를수 있기때문에 맥과
맞추었습니다.
Buffer
(0x04)
{
0x86, 0x80, 0x00, 0x00
},
"subsystem-id",
Buffer
(0x04)
{
0x70, 0x72, 0x00, 0x00
},
"subsystem-vendor-id",
Buffer
(0x04)
{
0x86, 0x80, 0x00, 0x00
},
"AAPL,current-available", <------ 이 파란색 부분이 맥프로와
아이맥, 맥북에어, 맥북프로, 맥미니등에서 약간
다릅니다.
0x05DC,
"AAPL,current-extra",
0x04B0,
"AAPL,current-in-sleep",
0x09C4,
Buffer
(One)
{
0x00
}
},
Local0)
DTGP (Arg0, Arg1, Arg2, Arg3, RefOf
(Local0))
Return
(Local0)
}
}
MacPro3,1
Method (_DSM, 4,
NotSerialized) // _DSM: Device-Specific Method
{
Store (Package
(0x0D)
{
"vendor-id",
Buffer
(0x04)
{
0x86, 0x80, 0x00, 0x00
},
"subsystem-id",
Buffer
(0x04)
{
0x70, 0x72, 0x00, 0x00
},
"subsystem-vendor-id",
Buffer
(0x04)
{
0x86, 0x80, 0x00, 0x00
},
"AAPL,current-available",
0x05DC,
"AAPL,current-extra",
0x03E8,
"AAPL,current-in-sleep",
0x0BB8,
Buffer
(One)
{
0x00
}
},
Local0)
DTGP (Arg0, Arg1, Arg2, Arg3, RefOf
(Local0))
Return
(Local0)
}
}
iMac12,1 12,2 13,1 13,2
Method (_DSM, 4, NotSerialized) // _DSM: Device-Specific
Method
{
Store (Package
(0x11)
{
"vendor-id",
Buffer
(0x04)
{
0x86, 0x80,
0x00, 0x00
},
"subsystem-id",
Buffer
(0x04)
{
0x70, 0x72,
0x00, 0x00
},
"subsystem-vendor-id",
Buffer
(0x04)
{
0x86, 0x80,
0x00, 0x00
},
"AAPL,current-available",
0x0834,
"AAPL,current-extra",
0x0A8C,
"AAPL,current-extra-in-sleep",
0x0A8C,
"AAPL,max-port-current-in-sleep",
0x0834,
"AAPL,device-internal",
0x02,
Buffer
(One)
{
0x00
}
},
Local0)
DTGP (Arg0, Arg1, Arg2, Arg3, RefOf
(Local0))
Return (Local0)
}
MacBookAir6,2 (XHCI만 존재하네요. 코드는 아래와
같습니다.)
Method (_DSM, 4, NotSerialized) // _DSM:
Device-Specific Method
{
Store (Package
(0x0F)
{
"vendor-id",
Buffer
(0x04)
{
0x86, 0x80,
0x00, 0x00
},
"subsystem-id",
Buffer
(0x04)
{
0x70, 0x72,
0x00, 0x00
},
"subsystem-vendor-id",
Buffer
(0x04)
{
0x86, 0x80,
0x00, 0x00
},
"AAPL,current-available",
0x0834,
"AAPL,current-extra",
0x0898,
"AAPL,current-extra-in-sleep",
0x0640,
"AAPL,max-port-current-in-sleep",
0x834,
Buffer
(One)
{
0x00
}
},
Local0)
DTGP (Arg0, Arg1, Arg2, Arg3, RefOf
(Local0))
Return (Local0)
}
MacBookPro10,1 10,2 (XHCI, EHCI 코드가 같습니다.)
9,1 9,2 8,1 8,2
Method (_DSM, 4, NotSerialized) //
_DSM: Device-Specific Method
{
Store (Package
(0x11)
{
"vendor-id",
Buffer
(0x04)
{
0x86, 0x80,
0x00, 0x00
},
"subsystem-id",
Buffer
(0x04)
{
0x70, 0x72,
0x00, 0x00
},
"subsystem-vendor-id",
Buffer
(0x04)
{
0x86, 0x80,
0x00, 0x00
},
"AAPL,current-available",
0x0834,
"AAPL,current-extra",
0x0898,
"AAPL,current-extra-in-sleep",
0x0640,
"AAPL,device-internal",
0x02,
"AAPL,max-port-current-in-sleep",
0x834,
Buffer
(One)
{
0x00
}
},
Local0)
DTGP (Arg0, Arg1, Arg2, Arg3, RefOf
(Local0))
Return (Local0)
}
MacMini6,2 (XHCI, EHCI 코드가
같습니다.)
Method (_DSM, 4, NotSerialized) // _DSM:
Device-Specific Method
{
Store (Package
(0x11)
{
"vendor-id",
Buffer
(0x04)
{
0x86, 0x80,
0x00, 0x00
},
"subsystem-id",
Buffer
(0x04)
{
0x70, 0x72,
0x00, 0x00
},
"subsystem-vendor-id",
Buffer
(0x04)
{
0x86, 0x80,
0x00, 0x00
},
"AAPL,current-available",
0x0834,
"AAPL,current-extra",
0x0C80,
"AAPL,current-extra-in-sleep",
0x0640,
"AAPL,device-internal",
0x02,
"AAPL,max-port-current-in-sleep",
0x834,
Buffer
(One)
{
0x00
}
},
Local0)
DTGP (Arg0, Arg1, Arg2, Arg3, RefOf
(Local0))
Return (Local0)
}