Jump to content

Bluetooth reconnect after wake from sleep


joe82

Recommended Posts

Hi All,

 

I have a D620 with a DELL TrueMobile 360 Bluetooth card. Overall it has worked well, but

I loose the connection to my Bluetooth mouse after a wake from sleep. I have noted others seem to

have the same problem from the notes in their signatures. I decided to look into this problem.

 

After reading various forums on other websites, I decided to try some changes to the DSDT,

specifically the USB* and EHCI devices. I compared the same devices in the DSDT from a

Macbook1,1. The two machines are largely the same.

 

I added the following to the USB0-3 devices.

 

Method (_S3D, 0, NotSerialized)

{

Return(0x03)

}

 

Method (_S4D, 0, NotSerialized)

{

Return(0x03)

}

 

and the following to the EHCI device.

 

Method (_DSM, 4, NotSerialized)

{

Store (Package (0x04)

{

"AAPL,clock-id",

Buffer (One)

{

One

},

 

"device_type",

Buffer (0x05)

{

"EHCI"

}

 

}, Local0)

DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))

Return (Local0)

}

 

Method (_S3D, 0, NotSerialized)

{

Return(0x03)

}

 

Method (_S4D, 0, NotSerialized)

{

Return(0x03)

}

 

With these changes, I am able to get the USB-based Bluetooth adaptor to reconnect with the mouse after a wake from sleep.

I am also able to change the hibernatemode parameter in pmset back to the default value of 3.

Here are my pmset values.

 

 

Active Profiles:

AC Power -1*

Battery Power -1

Currently in use:

hibernatefile /var/vm/sleepimage

hibernatemode 3

disksleep 10

sleep 10

displaysleep 3

lidwake 1

ttyskeepawake 1

womp 0

acwake 0

halfdim 1

autorestart 0

 

To be complete, here are the BIOS parameters I have updated that are related to the USB.

 

Onboard Devices

External USB ports: Enabled

Integrated USB Hub: High Speed

Power Management

USB Wake Support: Enabled

POST Behavior

USB Emulation: Enabled

 

 

I am also running 10.6.8 with EDP 1.9. I have not had time to try EDP 1.9.1 or 1.9.2

When the EDP is configured, I choose all the Apple versions of the drivers.

 

Although these changes seem to solve my original problem, I believe the DSDT

is removing the power from the Bluetooth adaptor when going to sleep. This

makes it hard to get a wake-on-bluetooth-mouse-event to work.

 

I decided to start with a wired USB-mouse. Using lspci, I was able to verify the

power management registers were getting set when this mouse was used. I was

able to get the machine to wake on a usb-mouse button hit.

Looking at the "Advanced..." tab from the "Open Bluetooth Preferences..." tab,

wake-on-bluetooth-mouse-event seems to be supported, but the

"Allow Bluetooth devices to wake this computer" is grayed-out. It seems I do not

have a supported Bluetooth adaptor. I have been able to "trick" the OS into thinking

I have a supported adaptor, but with the power being turned-off, it does not work. I

have seen other people comment on this problem, and they have even found the

line that disables the power, but their DSDTs are different. I will put this on my list of

things to look into. If I ever find the way to keep the power connected, I will most

likely try to get the wake-on-bluetooth-mouse-event to work.

 

 

I am going to attach my modified dsdt.dsl and the compiled dsdt.aml files. Note this

DSDT also includes a fix to get the VGA port to work correctly on a docking station.

dsdt_d620_gma.tar.gz

Link to comment
Share on other sites

  • Replies 26
  • Created
  • Last Reply

Top Posters In This Topic

  • Administrators

WOW.. thats amazing work dude .. its stuff like that we need onboard our team.

 

Joe, if you dont mind, could you add the same changes to the D4x0 DSDT so i could give it a test ?

Link to comment
Share on other sites

WOW.. thats amazing work dude .. its stuff like that we need onboard our team.

 

Joe, if you dont mind, could you add the same changes to the D4x0 DSDT so i could give it a test ?

 

 

Here it is.

 

First some notes:

 

For the D4X0, I used the DSDT from EDP 1.9 as a starting point.

 

I do not know what chipset is used in the D4X0 machines,

but I do know the D620 uses the ICH7 chipset. So the updates

to the D4X0 DSDT are based on the D620.

 

1) The DSDT USB0-3 devices are UHCI devices.

Using lspci and looking at the data sheet, I found these devices

DO NOT have a power management capability in the PCI configuration

space. I believe you can still have a machine that supports power

management, but these devices are on or off. This is why I did not

include the _DSM() methods in these devices. They were present in

the D4X0 DSDT, so I commented them out. I figured it would be best

to start with what worked for me. I also added the other pieces.

 

2) The DSDT EHCI device is an EHCI device.

Using lspci and looking at the data sheet, I found this device

DOES have a power management capability in the PCI configuration

space. I did include the _DSM() methods in the EHCI device. The version

that is in the D4X0 ECHI device was largely a super set of

my version. Since I am not clear what side effects the additional

items will cause, I commented out that version, and added my version.

This may not matter. I also added the other pieces.

 

3) I changed the AAPL,Haslib to AAPL,HasLid in the _DSM method

in the VID device.

 

Lastly I suggest updating the BIOS parameters to match the values I used.

 

Let me know how it goes.

 

Joe

dsdt_d4x0.tar.gz

Link to comment
Share on other sites

  • Administrators

ok tried it on a d430... pro's you can activate wake from usb in bios and it sleeps now also will wake from usb mouse.... but for some reason it drives the trackpad crazy it jumps all over the place had to diable it in bios. i have not tried vga, bluetooth. or dock. so your definitely on the right track in getting the little gremlins worked out. have yet to try your original d620 dsdt edits on my d620 intel.... waiting for a new hdd. will report back on that one when i get it back up.

 

update after a couple reboots trackpad is working again but it will not wake from usb mouse anymore but it can still sleep wile having usb wake enabled in bios wich it would not do previously it had to be off in bios for sleep to work properly before,

Link to comment
Share on other sites

ok tried it on a d430... pro's you can activate wake from usb in bios and it sleeps now also will wake from usb mouse.... but for some reason it drives the trackpad crazy it jumps all over the place had to diable it in bios. i have not tried vga, bluetooth. or dock. so your definitely on the right track in getting the little gremlins worked out. have yet to try your original d620 dsdt edits on my d620 intel.... waiting for a new hdd. will report back on that one when i get it back up.

 

update after a couple reboots trackpad is working again but it will not wake from usb mouse anymore but it can still sleep wile having usb wake enabled in bios wich it would not do previously it had to be off in bios for sleep to work properly before,

 

I usually do not use the track-pad, or the "eraser" in the keyboard much.

I prefer a mouse, either wireless, or wired. I have seen signs of what you

describe happening in the track-pad. I have not had time to look into this.

 

The only thing that comes to mind is usually there are some parameters

associated with a mouse, acceleration, for example. Perhaps they are

not being restored.

 

Joe

Link to comment
Share on other sites

  • Administrators

ok i tried it on my d620 gma 1200x800, is this intended for a higher resolution panel? it booted fine then after a while graphics and text got choppy, after a reboot i got the stripes like when testing mirror mode only fix was to replace dsdt. this was on a fresh lion install. it's like it did not read the screens edid properly.

Link to comment
Share on other sites

Yes, my screen size is 1440x900.

I updated the parameters for 1200x800, with dual link set to 0.

Give it a try.

 

Also I went back to retry the mouse and trackpad behavior after

wake from sleep. I have seen the issues you described when

I was running 10.6.7 and EDP 1.7. Since I updated to 10.6.8,

EDP 1.9, and the version of Chameleon that goes with it, that

problem has disappeared.

 

I believe the trackpad supports more gestures than single

finger movement, but that is all I know how to use. Also

I have seen optional trackpad updates in the installer

sub-menu in the EDP install package. I have never tried

any of these.

 

Let me know if this DSDT solves your problems.

Link to comment
Share on other sites


×
×
  • Create New...