> -----原始邮件-----
> 发件人: "Ritesh Raj Sarraf" <r...@debian.org>
> 发送时间: 2017-10-02 22:36:05 (星期一)
> 收件人: gulfstream <wg...@china.com>, 877...@bugs.debian.org
> 抄送:
> 主题: Re: Bug#877519: Bluetooth mouse suspend while using cell
>
> Control: tag -1 +moreinfo
>
> Hello,
>
> On Mon, 2017-10-02 at 21:28 +0800, gulfstream wrote:
> > I use my laptop (Thinkpad X1 Carbon 5th) with a bluetooth mouse. The
> > mouse work fine while the laptop runs with AC power supply. But The
> > bluetooth mouse is a trouble while the laptop runs with the embed
> > cell. The mouse will suspend if it is not be used after several
> > seconds. So I want use the mouse, it must reconnect to the laptop and
> > spend several seconds. it is very inconvenient!
> >
> > I find that the reason is bluetooth power saving of laptop mode
> > tools. It can be didabled in /etc/laptop-mode/conf.d/runtime-pm.conf
> > by item "AUTOSUSPEND_RUNTIME_DEVID_BLACKLIST". After disabling, the
> > bluetooth mouse will not suspend while using cell.
> >
>
> The default list of device types was extended to accommodate such
> devices.
>
> AUTOSUSPEND_RUNTIME_DEVTYPE_BLACKLIST="hub usbhid usb-storage"
>
>
> So when you say a bluetooth mouse, should I assume that the mouse
> connect to a bluetooth dongle, which is connected to a USB port ?
>
> Because, as long as it gets enumerated as a USB device, which I suspect
> is what should happen here, it would be covered.
Yes, the bluetooth dongle is connected to a USB port on my laptop, and I have
noticed the "hub usbhid usb-storage" is list in the
AUTOSUSPEND_RUNTIME_DEVTYPE_BLACKLIST. But the bluetooth power saving is not be
disabled unless I add the device id of bluetooth in the
AUTOSUSPEND_RUNTIME_DEVID_BLACKLIST.
>
>
> > I think that the bluetooth should not suspend because of bluetooth
> > mouse. So I advise you modify the runtime-pm.conf to add the
> > bluetooth device to blacklist by default for using bluetooth mouse.
>
> The bluetooth power saving module is disabled by default.
> runtime-pm, which takes care of most devices supporting Runtime PM
> (most USB devices included), should by default blacklist most common
> USB type devices.
>
>
> Can you share your runtime-pm.conf ?
Yes, my runtime-pm.conf is like this, and the device id 8087:0a2b is the
bluetooth device id in my laptop.
#
# Configuration file for Laptop Mode Tools module runtime-pm
#
# For more information, consult the laptop-mode.conf(8) manual page.
#
###############################################################################
# Runtime Power Management Settings
# ---------------------------------
#
#__COMMENT If you enable this setting, laptop mode tools will automatically
enable
#__COMMENT the Runtime Power Management feature for all devices.
#__COMMENT
#__COMMENT NOTE: Some devices claim they support autosuspend, but implement it
in a
#__COMMENT broken way. This can mean keyboards losing keypresses, or optical
mice
#__COMMENT turning their LED completely off. If you have a device that
misbehaves,
#__COMMENT add its DEVICE ID to the blacklist section below and complain to your
#__COMMENT hardware / device driver contact
#
################################################################################
# Enable debug mode for this module
# Set to 1 if you want to debug this module
DEBUG=0
# Enable Runtime autosuspend feature?
# Set to 0 to disable
CONTROL_RUNTIME_AUTOSUSPEND=1
# Set this to use opt-in/whitelist instead of opt-out/blacklist for deciding
# which devices should be autosuspended.
# AUTOSUSPEND_USE_WHITELIST=0 means AUTOSUSPEND_*_BLACKLIST will be used.
# AUTOSUSPEND_USE_WHITELIST=1 means AUTOSUSPEND_*_WHITELIST will be used.
AUTOSUSPEND_USE_WHITELIST=0
# The list of Device IDs that should not use autosuspend. Use system commands or
# look into sysfs to find out the IDs of your devices.
# Example: AUTOSUSPEND_DEVID_BLACKLIST="046d:c025 0123:abcd"
AUTOSUSPEND_RUNTIME_DEVID_BLACKLIST="8087:0a2b"
# The list of device driver types that should not use autosuspend. The driver
# type is given by "DRIVER=..." in a device's uevent file.
# Example: AUTOSUSPEND_DEVID_BLACKLIST="usbhid usb-storage"
AUTOSUSPEND_RUNTIME_DEVTYPE_BLACKLIST="hub usbhid usb-storage"
# The list of Device IDs that should use autosuspend. Use system commands or
# look into sysfs to find out the IDs of your devices.
# Example: AUTOSUSPEND_DEVID_WHITELIST="046d:c025 0123:abcd"
AUTOSUSPEND_RUNTIME_DEVID_WHITELIST=""
# The list of device driver types that should use autosuspend. The driver
# type is given by "DRIVER=..." in a device's uevent file.
# Example: AUTOSUSPEND_DEVTYPE_WHITELIST="usbhid usb-storage"
AUTOSUSPEND_RUNTIME_DEVTYPE_WHITELIST=""
# Trigger auto-suspension of the deivce under conditional circumstances
# Warning: DO NOT CHANGE THESE DEFAUTLS UNLESS YOU KNOW
BATT_SUSPEND_RUNTIME=1
LM_AC_SUSPEND_RUNTIME=1
NOLM_AC_SUSPEND_RUNTIME=0
# Auto-Suspend timeout in seconds
# Number of seconds after which the USB devices should suspend
AUTOSUSPEND_TIMEOUT=2
>
> --
> Ritesh Raj Sarraf | http://people.debian.org/~rrs
> Debian - The Universal Operating System