Jump to content

dsdt patching - USB bluetooth


  • Please log in to reply
2 replies to this topic

#1
failo

failo

    InsanelyMac Protégé

  • Members
  • PipPip
  • 56 posts
  • Gender:Male
Hi All!
OS: 10.6.6 in 64 bit
My Specs: Asus P5Q (modded bios from Juzzi) HD4870, E6600, all devices os SATA

Problem: I recently bought a Bluetooth dongle (Cambridge Silicon Radio - for other people on hacks and real macs my dongle seems to work OOB) and it works only I can't log myself in (bluetooth deamon is running). After i logged myself with wired keyboard I have to pair my wireless KB again. After I did it everything works nicely and without any delays... only I can't log in and I have to pair it every time I start my hack!

BT dongle recognized as:
Manufacturer:	Cambridge Silicon Radio ----> (0x0a12)
  Name:	iMac
  Firmware Version:	5276
  Bluetooth Power:	On
  Discoverable:	No
  Vendor ID:	0
  Product ID:	0x1 
  HCI Version:	4 (0x4)
  HCI Revision:	5276 (0x149c)
  LMP Version:	4 (0x4)
  LMP Subversion:	5276 (0x149c)

After Kextstat i get this:
116	0 0xffffff7f812f0000 0x2000	 0x2000	 org.virtualbox.kext.VBoxNetAdp (3.1.6) <113 5 4 1>
  118	1 0xffffff7f807a1000 0x2000	 0x2000	 com.apple.driver.AppleHIDKeyboard (141) <27 4 3>
  119	1 0xffffff7f80cdf000 0xe000	 0xe000	 com.apple.driver.IOBluetoothHIDDriver (2.3.8f7) <53 27 4 3>
  120	0 0xffffff7f80856000 0x2000	 0x2000	 com.apple.driver.AppleBluetoothHIDKeyboard (141) <119 118 27 4 3>


I did my research on the internet for over two days and can't find a solution I hope somebody will help me.

11.01.11 00:11:55 kernel FireWire (OHCI) Lucent ID 5811 PCI now active, GUID 001e8c0001549457; max speed s400.
11.01.11 00:11:55 kernel Kernel is LP64
11.01.11 00:11:55 kernel USBMSC Identifier (non-unique): 000000000001 0x40d 0x6205 0x3
11.01.11 00:12:16 kernel BTCOEXIST off
11.01.11 00:12:16 kernel wl0: Broadcom BCM4318 802.11 Wireless Controller
11.01.11 00:12:27 kernel DSMOS has arrived
11.01.11 00:12:27 kernel RBIOKitController: started (LP64, driver version 1.8.0, kernel version 10.6.0 (0/128)).
11.01.11 00:12:27 kernel ** Device in slot: SLOT-1 **
11.01.11 00:12:31 com.apple.kextd[20] Can't load /System/Library/Extensions/IOSerialFamily.kext/Contents/PlugIns/InternalModemSupport.kext - no code for running kernel's architecture.
11.01.11 00:12:31 com.apple.kextd[20] Failed to load /System/Library/Extensions/IOSerialFamily.kext/Contents/PlugIns/InternalModemSupport.kext - (libkern/kext) requested architecture/executable not found.
11.01.11 00:12:31 com.apple.kextd[20] Load com.apple.driver.InternalModemSupport failed; removing personalities.
11.01.11 00:12:32 kernel ACPI_SMC_PlatformPlugin::start - waitForService(resourceMatching(AppleIntelCPUPowerManagement) timed ou
11.01.11 00:12:33 WindowServer[197] Unable to open IOHIDSystem (0xe00002bd)

11.01.11 00:12:33 WindowServer[197] kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
11.01.11 00:12:33 com.apple.WindowServer[197] Tue Jan 11 00:12:33 xxxs-iMac.local WindowServer[197] <Error>: kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
11.01.11 00:12:35 SecurityAgent[426] Showing Login Window
11.01.11 00:12:35 kernel virtual bool IOHIDEventSystemUserClient::initWithTask(task*, void*, UInt32): Client task not privileged to open IOHIDSystem for mapping memory
11.01.11 00:12:57 loginwindow[42] Login Window - Returned from Security Agent
11.01.11 00:15:18 kernel CODE SIGNING: cs_invalid_page(0x100000000): p=553[MDCrashReportToo] clearing CS_VALID

This is how I tried to solve it:
DSDT patch for my USB ports: renamed EUSB and USBE to EHC1 and EHC2
Device (EHC1)
			{
				Name (_ADR, 0x001D0007)
							   Name (_PRW, Package (0x02)
								 {
							 0x0D, 
							 0x04
								 })
				Method (_DSM, 4, NotSerialized)
				{
					Store (Package (0x0C)
						{
							"AAPL,current-available", 
							0x05DC, 
							"AAPL,current-extra", 
							0x044C, 
							"AAPL,current-in-sleep", 
							0x09C4, 
							"device-id", 
							Buffer (0x04)
							{
								0x3A, 0x3A, 0x00, 0x00
							}, 

							"AAPL,clock-id", 
							Buffer (One)
							{
								0x01
							}, 

							"device_type", 
							Buffer (0x05)
							{
								"EHCI"
							}
						}, Local0)
					DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
					Return (Local0)
				}

				Method (_PRW, 0, NotSerialized)
				{
					Return (GPRW (0x0D, 0x04))
				}
			}

			Device (EHC2)
			{
				Name (_ADR, 0x001A0007)
				Method (_DSM, 4, NotSerialized)
				{
					Store (Package (0x0C)
						{
							"AAPL,current-available", 
							0x05DC, 
							"AAPL,current-extra", 
							0x044C, 
							"AAPL,current-in-sleep", 
							0x09C4, 
							"device-id", 
							Buffer (0x04)
							{
								0x3C, 0x3A, 0x00, 0x00
							}, 

							"AAPL,clock-id", 
							Buffer (One)
							{
								0x01
							}, 

							"device_type", 
							Buffer (0x05)
							{
								"EHCI"
							}
						}, Local0)
					DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
					Return (Local0)
				}

				Method (_PRW, 0, NotSerialized)
				{
					Return (GPRW (0x0D, 0x04))
				}
			}

Renamed USB0 to UHC1 and so on
Device (UHC1)
			{
 				Name (_ADR, 0x001D0000)
							   Name (_PRW, Package (0x02)
				{
					0x0D, 
					0x04
				})
				OperationRegion (BAR0, PCI_Config, 0xC4, One)
				Field (BAR0, ByteAcc, NoLock, Preserve)
				{
					USBW,   2, 
							Offset (0x01)
				}

				Method (_S3D, 0, NotSerialized)
				{
					If (LOr (LEqual (OSFL (), One), LEqual (OSFL (), 0x02)))
					{
						Return (0x02)
					}
					Else
					{
						Return (0x03)
					}
				}

				Method (_PSW, 1, NotSerialized)
				{
					If (Arg0)
					{
						Store (0x03, USBW)
					}
					Else
					{
						Store (Zero, USBW)
					}
				}

				Method (_PRW, 0, NotSerialized)
				{
					Return (GPRW (0x03, 0x04))
				}
			}

			Device (UHC2)
			{
				Name (_ADR, 0x001D0001)
				OperationRegion (BAR0, PCI_Config, 0xC4, One)
				Field (BAR0, ByteAcc, NoLock, Preserve)
				{
					USBW,   2, 
							Offset (0x01)
				}

				Method (_S3D, 0, NotSerialized)
				{
					If (LOr (LEqual (OSFL (), One), LEqual (OSFL (), 0x02)))
					{
						Return (0x02)
					}
					Else
					{
						Return (0x03)
					}
				}

				Method (_PSW, 1, NotSerialized)
				{
					If (Arg0)
					{
						Store (0x03, USBW)
					}
					Else
					{
						Store (Zero, USBW)
					}
				}

				Method (_PRW, 0, NotSerialized)
				{
					Return (GPRW (0x04, 0x04))
				}
			}

I had no problems with USB ports before!!! They showd up in system profiler as they should with AppleAHCIUSB kext.... All my storage and sticks were working but now for some reason I can't sync my Ipod... could be related...

As you see at boot i get BTCOEXISTANCE off , which apparently is normal (something to do with EDR) and the bluetooth deamon starts before login window. All great even lights on my BT dongle go on and off but it can't find my keyboard!

I read somewhere that I should patch my SMBIOS and LPC device...

hope somebody had similar problem!

#2
failo

failo

    InsanelyMac Protégé

  • Members
  • PipPip
  • 56 posts
  • Gender:Male
Hi Again!

I did some dsdt patching (SBUS, LPC, USB) and now the only error I get is at reboot/shutdown:

hidd died. Reestablishing connection.

When rebooting, someties the dongle will stop my hack from it with smth like this:

E:[AppleUSBBluetooth….](interrupt) recieved kIOReturnAborted with 1 pending Interrupts

It seems that after reboot/restart is pressed the usb ports switch off before the communication with Keyboard is closed and so the data is not written to blued.plist…

#3
artimess

artimess

    InsanelyMac Protégé

  • Members
  • PipPip
  • 97 posts

Hi All!
OS: 10.6.6 in 64 bit
My Specs: Asus P5Q (modded bios from Juzzi) HD4870, E6600, all devices os SATA

Problem: I recently bought a Bluetooth dongle (Cambridge Silicon Radio - for other people on hacks and real macs my dongle seems to work OOB) and it works only I can't log myself in (bluetooth deamon is running). After i logged myself with wired keyboard I have to pair my wireless KB again. After I did it everything works nicely and without any delays... only I can't log in and I have to pair it every time I start my hack!

BT dongle recognized as:

Manufacturer:	Cambridge Silicon Radio ----> (0x0a12)
   Name:	iMac
   Firmware Version:	5276
   Bluetooth Power:	On
   Discoverable:	No
   Vendor ID:	0
   Product ID:	0x1 
   HCI Version:	4 (0x4)
   HCI Revision:	5276 (0x149c)
   LMP Version:	4 (0x4)
   LMP Subversion:	5276 (0x149c)

After Kextstat i get this:
116	0 0xffffff7f812f0000 0x2000	 0x2000	 org.virtualbox.kext.VBoxNetAdp (3.1.6) <113 5 4 1>
   118	1 0xffffff7f807a1000 0x2000	 0x2000	 com.apple.driver.AppleHIDKeyboard (141) <27 4 3>
   119	1 0xffffff7f80cdf000 0xe000	 0xe000	 com.apple.driver.IOBluetoothHIDDriver (2.3.8f7) <53 27 4 3>
   120	0 0xffffff7f80856000 0x2000	 0x2000	 com.apple.driver.AppleBluetoothHIDKeyboard (141) <119 118 27 4 3>


I did my research on the internet for over two days and can't find a solution I hope somebody will help me.

11.01.11 00:11:55 kernel FireWire (OHCI) Lucent ID 5811 PCI now active, GUID 001e8c0001549457; max speed s400.
11.01.11 00:11:55 kernel Kernel is LP64
11.01.11 00:11:55 kernel USBMSC Identifier (non-unique): 000000000001 0x40d 0x6205 0x3
11.01.11 00:12:16 kernel BTCOEXIST off
11.01.11 00:12:16 kernel wl0: Broadcom BCM4318 802.11 Wireless Controller
11.01.11 00:12:27 kernel DSMOS has arrived
11.01.11 00:12:27 kernel RBIOKitController: started (LP64, driver version 1.8.0, kernel version 10.6.0 (0/128)).
11.01.11 00:12:27 kernel ** Device in slot: SLOT-1 **
11.01.11 00:12:31 com.apple.kextd[20] Can't load /System/Library/Extensions/IOSerialFamily.kext/Contents/PlugIns/InternalModemSupport.kext - no code for running kernel's architecture.
11.01.11 00:12:31 com.apple.kextd[20] Failed to load /System/Library/Extensions/IOSerialFamily.kext/Contents/PlugIns/InternalModemSupport.kext - (libkern/kext) requested architecture/executable not found.
11.01.11 00:12:31 com.apple.kextd[20] Load com.apple.driver.InternalModemSupport failed; removing personalities.
11.01.11 00:12:32 kernel ACPI_SMC_PlatformPlugin::start - waitForService(resourceMatching(AppleIntelCPUPowerManagement) timed ou
11.01.11 00:12:33 WindowServer[197] Unable to open IOHIDSystem (0xe00002bd)

11.01.11 00:12:33 WindowServer[197] kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
11.01.11 00:12:33 com.apple.WindowServer[197] Tue Jan 11 00:12:33 xxxs-iMac.local WindowServer[197] <Error>: kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
11.01.11 00:12:35 SecurityAgent[426] Showing Login Window
11.01.11 00:12:35 kernel virtual bool IOHIDEventSystemUserClient::initWithTask(task*, void*, UInt32): Client task not privileged to open IOHIDSystem for mapping memory
11.01.11 00:12:57 loginwindow[42] Login Window - Returned from Security Agent
11.01.11 00:15:18 kernel CODE SIGNING: cs_invalid_page(0x100000000): p=553[MDCrashReportToo] clearing CS_VALID

This is how I tried to solve it:
DSDT patch for my USB ports: renamed EUSB and USBE to EHC1 and EHC2
Device (EHC1)
			 {
				 Name (_ADR, 0x001D0007)
								Name (_PRW, Package (0x02)
								  {
							  0x0D, 
							  0x04
								  })
				 Method (_DSM, 4, NotSerialized)
				 {
					 Store (Package (0x0C)
						 {
							 "AAPL,current-available", 
							 0x05DC, 
							 "AAPL,current-extra", 
							 0x044C, 
							 "AAPL,current-in-sleep", 
							 0x09C4, 
							 "device-id", 
							 Buffer (0x04)
							 {
								 0x3A, 0x3A, 0x00, 0x00
							 }, 
 
							 "AAPL,clock-id", 
							 Buffer (One)
							 {
								 0x01
							 }, 
 
							 "device_type", 
							 Buffer (0x05)
							 {
								 "EHCI"
							 }
						 }, Local0)
					 DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
					 Return (Local0)
				 }
 
				 Method (_PRW, 0, NotSerialized)
				 {
					 Return (GPRW (0x0D, 0x04))
				 }
			 }
 
			 Device (EHC2)
			 {
				 Name (_ADR, 0x001A0007)
				 Method (_DSM, 4, NotSerialized)
				 {
					 Store (Package (0x0C)
						 {
							 "AAPL,current-available", 
							 0x05DC, 
							 "AAPL,current-extra", 
							 0x044C, 
							 "AAPL,current-in-sleep", 
							 0x09C4, 
							 "device-id", 
							 Buffer (0x04)
							 {
								 0x3C, 0x3A, 0x00, 0x00
							 }, 
 
							 "AAPL,clock-id", 
							 Buffer (One)
							 {
								 0x01
							 }, 
 
							 "device_type", 
							 Buffer (0x05)
							 {
								 "EHCI"
							 }
						 }, Local0)
					 DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
					 Return (Local0)
				 }
 
				 Method (_PRW, 0, NotSerialized)
				 {
					 Return (GPRW (0x0D, 0x04))
				 }
			 }

Renamed USB0 to UHC1 and so on
Device (UHC1)
			 {
				  Name (_ADR, 0x001D0000)
								Name (_PRW, Package (0x02)
				 {
					 0x0D, 
					 0x04
				 })
				 OperationRegion (BAR0, PCI_Config, 0xC4, One)
				 Field (BAR0, ByteAcc, NoLock, Preserve)
				 {
					 USBW,   2, 
							 Offset (0x01)
				 }
 
				 Method (_S3D, 0, NotSerialized)
				 {
					 If (LOr (LEqual (OSFL (), One), LEqual (OSFL (), 0x02)))
					 {
						 Return (0x02)
					 }
					 Else
					 {
						 Return (0x03)
					 }
				 }
 
				 Method (_PSW, 1, NotSerialized)
				 {
					 If (Arg0)
					 {
						 Store (0x03, USBW)
					 }
					 Else
					 {
						 Store (Zero, USBW)
					 }
				 }
 
				 Method (_PRW, 0, NotSerialized)
				 {
					 Return (GPRW (0x03, 0x04))
				 }
			 }
 
			 Device (UHC2)
			 {
				 Name (_ADR, 0x001D0001)
				 OperationRegion (BAR0, PCI_Config, 0xC4, One)
				 Field (BAR0, ByteAcc, NoLock, Preserve)
				 {
					 USBW,   2, 
							 Offset (0x01)
				 }
 
				 Method (_S3D, 0, NotSerialized)
				 {
					 If (LOr (LEqual (OSFL (), One), LEqual (OSFL (), 0x02)))
					 {
						 Return (0x02)
					 }
					 Else
					 {
						 Return (0x03)
					 }
				 }
 
				 Method (_PSW, 1, NotSerialized)
				 {
					 If (Arg0)
					 {
						 Store (0x03, USBW)
					 }
					 Else
					 {
						 Store (Zero, USBW)
					 }
				 }
 
				 Method (_PRW, 0, NotSerialized)
				 {
					 Return (GPRW (0x04, 0x04))
				 }
			 }

I had no problems with USB ports before!!! They showd up in system profiler as they should with AppleAHCIUSB kext.... All my storage and sticks were working but now for some reason I can't sync my Ipod... could be related...

As you see at boot i get BTCOEXISTANCE off , which apparently is normal (something to do with EDR) and the bluetooth deamon starts before login window. All great even lights on my BT dongle go on and off but it can't find my keyboard!

I read somewhere that I should patch my SMBIOS and LPC device...

hope somebody had similar problem!


Hi Failo,
Could I please ask you to send me a copy of your DSDT. I have similare problems and I can use your solution as a model to correct mine.
Do appreciate it.
Artimess





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