Jump to content

DSDT: trick retail drivers by changing "device-id" (e.g USB)


  • Please log in to reply
365 replies to this topic

#41
rx782p

rx782p

    InsanelyMac Protégé

  • Members
  • Pip
  • 10 posts

Try this for EHCI 1 and EHCI 2:

Device (EHC1){    Name (_ADR, 0x001D0007)    ...    Method (_DSM, 4, NotSerialized)    {        Store (Package (0x02)        {            "device-id",             Buffer (0x04)            {                0x3a, 0x3a, 0x00, 0x00            }        }, Local0)        DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))        Return (Local0)    }}Device (EHC2){    Name (_ADR, 0x001A0007)    ...    Method (_DSM, 4, NotSerialized)    {        Store (Package (0x02)        {            "device-id",             Buffer (0x04)            {                0x3c, 0x3a, 0x00, 0x00            }        }, Local0)        DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))        Return (Local0)    }}


I already tried the method.
ECHI did not work.

Anyway, thank for suggestion.
it's promising for A board having the device which resembled Macintosh.

#42
Bart86

Bart86

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 179 posts
We have found that having a disk in the DVD drive allows auto-sleep to work. This is on EP45-UD3P with 10.5.7 retail and no DSDT patching. Not sure what that implies or where to start looking for a proper fix but it's a start.

#43
zhell

zhell

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 125 posts
  • Gender:Male

I already tried the method.
ECHI did not work.

Anyway, thank for suggestion.
it's promising for A board having the device which resembled Macintosh.

Well, it's only supposed to work for ICH9/-R. Do you have such a south bridge?


We have found that having a disk in the DVD drive allows auto-sleep to work. This is on EP45-UD3P with 10.5.7 retail and no DSDT patching. Not sure what that implies or where to start looking for a proper fix but it's a start.

Thanks a lot, Bart86. Indeed, with my DP35DP, auto sleep never worked with 10.5.7, until just now when I put a DVD into the drive :-)
Edit: Found out replacing the DVD drive solves the problem
I don't know why this makes a difference, but it's definitely good to know. My board still needs the DSDT fix though, that's for sure because without the fix, it does not even sleep when forced.

#44
ontoid

ontoid

    InsanelyMac Protégé

  • Members
  • PipPip
  • 60 posts
  • Gender:Male
  • Location:poland
Great!!!
It works for me.
Cheating USB and ACPI as well.
Also GFX card and Audio is loaded via dsdt.aml
What can i say... dsdt patching have incredible possibilities, on my mobo i need only appledecrypt and 3 legacy kext's
(block storage and audio)

Thank U
Attached File  dsdt.jpg   215.58KB   387 downloads

#45
zhell

zhell

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 125 posts
  • Gender:Male

Great!!!
It works for me.
Cheating USB and ACPI as well.
Also GFX card and Audio is loaded via dsdt.aml
What can i say... dsdt patching have incredible possibilities, on my mobo i need only appledecrypt and 3 legacy kext's
(block storage and audio)


Thanks for the feedback, I agree, DSDT is a lot of fun... once you get your job done with it. The process can be painful, though, but it's worth it.

Enjoy! :wacko:

#46
BlackCH

BlackCH

    InsanelyMac Deity

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 1,611 posts
  • Gender:Male
  • Location:BCN
I confirm it works to fake ICH9 SATA (with ICH10 id):
Attached File  Screenshot_2.jpg   114.77KB   357 downloads
Attached File  Screenshot_1.jpg   267.78KB   223 downloads
So no more LegacyAppleAHCIPort.kext (I assume IDE mode wont work without LegacyAppleIntelPXIIATA.kext, still need to test)

Pitty changing USB ids (UHCI/EHCI) didnt fix sleep

EDIT:
In IDE mode this mod cause a KP at boot related with the stock AppleAHCIPort.kext

#47
atka

atka

    InsanelyMac Protégé

  • Members
  • PipPip
  • 86 posts
Thanks for the info it didn't fix sleep for me though but it is fun to mess with the DSDT. I managed to get the ICH9 to report as ICH10 but does anybody know how to tell the OS that the drives are internal and not external?

#48
SMF

SMF

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 188 posts
I'm interested in the ICH10 fix (I have a Gigabyte P35-DQ6 with ICH9R) but would appreciate someone posting the exact section from their DSDT to help me understand ... as for USB and EHCI mine seems to be working - here's what I have from my DSDT for USB. This comes from using fassl's script and is not modified by me.

[codebox] Device (USB0)
{
Name (_ADR, 0x001D0000)
Method (_S3D, 0, NotSerialized)
{
If (LEqual (OSFL, 0x02))
{
Return (0x02)
}

Return (0x03)
}

Name (_PRW, Package (0x02)
{
0x03,
0x03
})
}

Device (USB1)
{
Name (_ADR, 0x001D0001)
Method (_S3D, 0, NotSerialized)
{
If (LEqual (OSFL, 0x02))
{
Return (0x02)
}

Return (0x03)
}

Name (_PRW, Package (0x02)
{
0x04,
0x03
})
}

Device (USB2)
{
Name (_ADR, 0x001D0002)
Method (_S3D, 0, NotSerialized)
{
If (LEqual (OSFL, 0x02))
{
Return (0x02)
}

Return (0x03)
}

Name (_PRW, Package (0x02)
{
0x0C,
0x03
})
}

Device (USB3)
{
Name (_ADR, 0x001D0003)
Method (_S3D, 0, NotSerialized)
{
If (LEqual (OSFL, 0x02))
{
Return (0x02)
}

Return (0x03)
}

Name (_PRW, Package (0x02)
{
0x0E,
0x03
})
}

Device (US31)
{
Name (_ADR, 0x001A0000)
Method (_S3D, 0, NotSerialized)
{
If (LEqual (OSFL, 0x02))
{
Return (0x02)
}

Return (0x03)
}

Name (_PRW, Package (0x02)
{
0x0E,
0x03
})
}

Device (USB4)
{
Name (_ADR, 0x001A0001)
Method (_S3D, 0, NotSerialized)
{
If (LEqual (OSFL, 0x02))
{
Return (0x02)
}

Return (0x03)
}

Name (_PRW, Package (0x02)
{
0x05,
0x03
})
}

Device (USB5)
{
Name (_ADR, 0x001A0002)
Method (_S3D, 0, NotSerialized)
{
If (LEqual (OSFL, 0x02))
{
Return (0x02)
}

Return (0x03)
}

Name (_PRW, Package (0x02)
{
0x20,
0x03
})
}

Device (USBE)
{
Name (_ADR, 0x001D0007)
Method (_S3D, 0, NotSerialized)
{
If (LEqual (OSFL, 0x02))
{
Return (0x02)
}

Return (0x03)
}

Name (_PRW, Package (0x02)
{
0x0D,
0x03
})
}

Device (USE2)
{
Name (_ADR, 0x001A0007)
Method (_S3D, 0, NotSerialized)
{
If (LEqual (OSFL, 0x02))
{
Return (0x02)
}

Return (0x03)
}

Name (_PRW, Package (0x02)
{
0x0D,
0x03
})
}
[/codebox]

Here's what my System Profiler shows -

Attached Files



#49
atka

atka

    InsanelyMac Protégé

  • Members
  • PipPip
  • 86 posts
Well for ICH10 I post this at the end of my Device (Sata) section
[codebox] Method (_DSM, 4, NotSerialized)
{
Store (Package (0x02)
{
"device-id",
Buffer (0x04)
{
0x22, 0x3A, 0x00, 0x00
}
}, Local0)
DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
Return (Local0)
}
[/codebox]

I am not sure what yours would be called but my physical address was 1f0002 if you look in IOreg you'll find your address it might be the same.

#50
mitch_de

mitch_de

    InsanelyMacaholic

  • Local Moderators
  • 2,879 posts
  • Gender:Male
  • Location:Stuttgart / Germany
Here is my part of USB dsdt for an GA-EP35 DS3 (ICH9 nonraid)
It has 29xx(hex) ICH pci dev ids.
Also be carefull with that US31 device which is in the middle between that USB devices. Its NOT! an USB or EHCI device, let it stay as it is.

I would NOT change orig. device names (USB0 to UHCI1 for examle), because if you do that you have also more work to change all occurences of that in the dsl.

So (for less work) let them as they are and only add that device id stuff (that new method) to each of them. (For my knowledge ;) )

Attached Files



#51
rx782p

rx782p

    InsanelyMac Protégé

  • Members
  • Pip
  • 10 posts
Information on my Motherboard is as follows:
Intel DQ45CB (Intel Q45 + ICH10DO)
localhost:~ rx782p$ LSPCI
00:00.0 Host bridge: Intel Corporation Eaglelake DRAM Controller (rev 03)
00:01.0 PCI bridge: Intel Corporation Eaglelake PCI Express Root Port (rev 03)
00:03.0 Communication controller: Intel Corporation Eaglelake HECI Controller (rev 03)
00:03.2 IDE interface: Intel Corporation Eaglelake PT IDER Controller (rev 03)
00:03.3 Serial controller: Intel Corporation Eaglelake Serial KT Controller (rev 03)
00:19.0 Ethernet controller: Intel Corporation 82567LM-3 Gigabit Network Connection (rev 02)
00:1a.0 USB Controller: Intel Corporation ICH10 USB UHCI Controller #4 (rev 02)
00:1a.1 USB Controller: Intel Corporation ICH10 USB UHCI Controller #5 (rev 02)
00:1a.2 USB Controller: Intel Corporation ICH10 USB UHCI Controller #6 (rev 02)
00:1a.7 USB Controller: Intel Corporation ICH10 USB2 EHCI Controller #2 (rev 02)
00:1b.0 Audio device: Intel Corporation ICH10 HD Audio Controller (rev 02)
00:1d.0 USB Controller: Intel Corporation ICH10 USB UHCI Controller #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation ICH10 USB UHCI Controller #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation ICH10 USB UHCI Controller #3 (rev 02)
00:1d.7 USB Controller: Intel Corporation ICH10 USB2 EHCI Controller #1 (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev a2)
00:1f.0 ISA bridge: Intel Corporation ICH10 LPC Interface Controller (rev 02)
00:1f.2 SATA controller: Intel Corporation ICH10 6 port SATA AHCI Controller (rev 02)
00:1f.3 SMBus: Intel Corporation ICH10 SMBus Controller (rev 02)
00:1f.5 IDE interface: Intel Corporation ICH10 2 port SATA IDE Controller (rev 02)
01:00.0 VGA compatible controller: nVidia Corporation G94 [GeForce 9600 GT] (rev a1)
02:01.0 FireWire (IEEE 1394): Agere Systems FW323 (rev 70)
I don't know Machintosh's subsystem-ID (Intel 82801JI)
Therefore I also try DG45ID's subsystem-id add DSDT.
DG45ID have normal ICH10 Device and have subsystem-vendor-id of Intel.
What chose DG45ID is one of the reasons that subsystem-vendor-id was not changed by DSDT.
DQ45CB  82801JD/DO (ICH10 Family) UHCI Controller #1 [8086'3a64] Subsystem Device [8086:1003]
DG45ID  82801JI (ICH10 Family) UHCI Controller #1  [8086'3a34] Subsystem Device [8086:5002]
The sybsystem-id change.
No Patched DSDT
Attached File  Picture_6.png   140.31KB   124 downloads
Patched DSDT(Device ID & Subsystem-Vendor-ID)
Attached File  Picture_7.png   156.21KB   125 downloads

but I got this error msg after patched DSDT.
localhost kernel[0]: USBF: 0.605 EHCI controller unable to take control from BIOS
localhost kernel[0]: USBF: 0.605 AppleUSBEHCI[0xad81800]: unable to obtain ownership: 0xe00002be
localhost kernel[0]: USBF: 0.605 AppleUSBEHCI[0xad81800]::UIMInitialize - Error occurred (0xe00002be)
localhost kernel[0]: USBF: 0.607 AppleUSBEHCI: unable to initialize UIM
localhost kernel[0]: USBF: 0.620 AppleUSBEHCI[0xae48000]: unable to obtain ownership: 0xe00002be
localhost kernel[0]: USBF: 0.623 AppleUSBEHCI[0xae48000]::UIMInitialize - Error occurred (0xe00002be)
localhost kernel[0]: USBF: 0.629 AppleUSBEHCI: unable to initialize UIM


In the present, Kext of Slice is necessary for EHCI's problem solving of ownership.
I still have the sleep problem, then I'll try various methods(_WAK method on DSDT etc...) to working Slice's kext.
in Energy Saver -Restart Automatically after a Power Failure is checked...
A review of the setting of bios...
This board feels delicate about Power control and Motherboard Supporting AMT and TPM-Based Security.
Thanks all.

Edit update: The subsystem-Vendor-IDdoes not matter, I removed moded subsystem-vondor-id form DSDT.
They work only in device ID Mod well.


#52
SMF

SMF

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 188 posts

Here is my part of USB dsdt for an GA-EP35 DS3 (ICH9 nonraid)
It has 29xx(hex) ICH pci dev ids.
Also be carefull with that US31 device which is in the middle between that USB devices. Its NOT! an USB or EHCI device, let it stay as it is.

I would NOT change orig. device names (USB0 to UHCI1 for examle), because if you do that you have also more work to change all occurences of that in the dsl.

So (for less work) let them as they are and only add that device id stuff (that new method) to each of them. (For my knowledge :afro: )


mitch_de,

I'm not looking to change my USB - just posted it for others since I seem to be working fine with my unmodified DSDT. I would however like to understand the SATA mod. I don't have a SATA section in my DSDT - just DRV devices.

Thanks,
SMF

#53
Master Chief

Master Chief

    Just Chief

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,176 posts
  • Gender:Male
I wonder if you checked your BIOS settings for something like: BIOS EHCI Hand-off (it should be enabled), or else try this (if you are a chameleon boot user) AKA :
Add <key>USBBusFix<key><string>Yes<string> to the com.apple.Boot.plist

p.s. Which version of BIOS are you using? Please note that the latest version (083) was released on 13-5-2009 – with fixes for sleep and USB.

#54
Master Chief

Master Chief

    Just Chief

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,176 posts
  • Gender:Male

The device-id is different for each of the six (3a34-3a39).

Like I didn't knew this – I am using a patched kext (.cpp/.h) for almost a year know. I mean what about using those buffer values as arguments for that new Method?

I'm also a step up in the game (using two hacks for testing) to our shutdown problem, which Bart86 mentioned a few posts up, but it is far from reliable – I still need to kill Parallels Desktop 4.0.3 processes and unload its kext first.

#55
mitch_de

mitch_de

    InsanelyMacaholic

  • Local Moderators
  • 2,879 posts
  • Gender:Male
  • Location:Stuttgart / Germany
Little bit oftopic:
The new Chameleon RC1 has some USB/EHCI boot flags (readme), perhaps that can help some users with USB problems also.

#56
SMF

SMF

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 188 posts
I'm interested in a couple of items and would appreciate some advice - for SATA using device id to make ICH9R appear as ICH10 I would appreciate someone posting their DSDT as the snippet in an earlier post isn't complete and my DSDT extracted with the patcher does not have a SATA section.

Second I have a couple of errors - one related to USB - that I would like to see if I could fix via DSDT. Here they are -

[codebox]May 30 06:58:33 localhost kernel[0]: ACPI_SMC_PlatformPlugin::getCPU_PSSData - _PSS evaluation failed
May 30 06:58:34 localhost kernel[0]: ACPI_SMC_PlatformPlugin::pushCPU_CSTData - _CST evaluation failed
May 30 06:58:34 localhost kernel[0]: ACPI_SMC_PlatformPlugin::registerLPCDriver - WARNING - LPC device initialization failed: C-state power management not initialized
May 30 06:58:34 localhost kernel[0]: ACPI_SMC_PlatformPlugin::pushCPU_CSTData - _CST evaluation failed


May 30 06:58:33 localhost kernel[0]: USBF: 0.281 AppleUSBOHCI[0xac77000]::CheckSleepCapability - controller will be unloaded across sleep
May 30 06:58:33 localhost kernel[0]: USBF: 0.295 AppleUSBOHCI[0xabdd800]::CheckSleepCapability - controller will be unloaded across sleep
[/codebox]

Help appreciated.

Thanks,
SMF

#57
zhell

zhell

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 125 posts
  • Gender:Male

Like I didn't knew this – I am using a patched kext (.cpp/.h) for almost a year know. I mean what about using those buffer values as arguments for that new Method?

I'm sorry, I did not understand what you meant. Now I think I get it: You would like to add a method similar to DTGP, but one which would take as arguments just the value for the device-id? I think that would be great and make the DSDT.dsl much more readable.

I'm also a step up in the game (using two hacks for testing) to our shutdown problem, which Bart86 mentioned a few posts up, but it is far from reliable – I still need to kill Parallels Desktop 4.0.3 processes and unload its kext first.

Are you referring to auto-sleep, i.e. sleep after idle period? Parallels Desktop is a pain. First, I do not see why they need to load their KEXTs at boot time, it makes no sense to me. Do you need to kill the entire Parallels suite (stopping any running VM) or just some background processes?
Regarding the KEXTs, I wonder if we could modify their plist such that they would be automatically unloaded across sleep. Maybe if we removed all power management capabilities? I found an entry on the darwin drivers list about doing this in the source code.

#58
rx782p

rx782p

    InsanelyMac Protégé

  • Members
  • Pip
  • 10 posts

I wonder if you checked your BIOS settings for something like: BIOS EHCI Hand-off (it should be enabled), or else try this (if you are a chameleon boot user) AKA :

Add <key>USBBusFix<key><string>Yes<string> to the com.apple.Boot.plist

p.s. Which version of BIOS are you using? Please note that the latest version (083) was released on 13-5-2009 with fixes for sleep and USB.


Thanks Master Chief.
I used USBBusFIX=Yes without modified DSDT.
Problem of EHCI was fix by the option.
but UHCI was appear as PCI.
When it combines modified DSDT and EHCIacquire=Yes, both EHCI and UHCI work normally ;)
My choice is two ways.
1. Modified DSDT and EHCIacquire=Yes
2. Silice's IOUSBFamiry.kext

I udate to BIOS 083(fixes for sleep and USB) from 079.
Sleep problem didn't fixed by new BIOS.
Here is my BIOS setting.

USB-Configuration
USB Ports : [Enable]
USB Legacy : [Enable]

After Power Failure : [Last State]
Wake on LAN from S5 : [Power On]
ACPI Suspend State : [S3 State]
EIST : [Enable]
Wake System from S5 : [Enable]

USB Boot : [Enable]
Boot USB Devices First : [Enable]
USB Mass Strage Emulation Type : [Auto]


I will investigate other factors.

#59
Master Chief

Master Chief

    Just Chief

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,176 posts
  • Gender:Male

Thanks Master Chief.
I used USBBusFIX=Yes without modified DSDT.
Problem of EHCI was fix by the option.
but UHCI was appear as PCI.
When it combines modified DSDT and EHCIacquire=Yes, both ECHI and UCHI work normally :)
My choice is two ways.
1. Modified DSDT and EHCIacquire=Yes
2. Silice's IOUSBFamiry.kext.....

My motto is: "No more modified kext files" or the more explicit expression "To hell with modified kext files" and thus my personal choice would be option 1 – DSDT and EFI Strings (aka device properties) patching methods give you a much cleaner OS X installation... and this without the fear for upgrade issues.

I'm glad that you've got it sorted.

#60
stellarola

stellarola

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 682 posts
  • Gender:Male
  • Location:Lextown, KY
I'm not on my home computer right now, but I'll try some Airport device id stuff later when I get the chance. :)

Also, some people have been able to edit the DSDT/SSDT in order to allow speedstepping to work natively using AppleIntelCPUPM. I've got it working on my system, and hopefully there will be a guide on it soon enough. I think more tests have to be done to make sure it's completely functional and stable.

Take care,

-Stell





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