Comment 18 for bug 268877

Revision history for this message
Chow Loong Jin (hyperair) wrote : Re: [Bug 268877] Re: bluetooth service does not restart after a suspend to ram

On Sat, 2008-11-15 at 23:12 +0000, Martin G Miller wrote:
> If I change this command in your patch:
>
> if [ "$HID2HCI_ENABLED" = "1" ] && [ -x /usr/sbin/hid2hci ]; then
> /usr/sbin/hid2hci --tohci
>
> to read:
>
> if [ "$HID2HCI_ENABLED" = "1" ] && [ -x /usr/sbin/hid2hci ]; then
> /usr/sbin/hid2hci --tohid
>
> I have my bluetooth keyboard back after resume from standy.
>
> Apparently, even though it is testing for HCI_ENABLED = 1 as the "if"
> part of the command, it is executing even when HID2HCI_ENABLED=0 is set
> in /etc/default/bluetooth
>
This is pretty surprising. I've tried the following:
1. Set HID2HCI_ENABLED=0 in /etc/default/bluetooth, and then manually
run
PM_FUNCTIONS=/usr/lib/pm-utils/pm-functions /usr/lib/pm-utils/sleep.d/48hid2hci

This results in no error message.

2. Set HID2HCI_ENABLED=1 in /etc/default/bluetooth, and the manually run
PM_FUNCTIONS=/usr/lib/pm-utils/pm-functions /usr/lib/pm-utils/sleep.d/48hid2hci

This results in the error message "No devices in HID mode found".

This indicates that the hook is working properly. Perhaps
your /etc/default/bluetooth file is malformed?
--
Chow Loong Jin