diff options
-rw-r--r-- | 0001-Bluetooth-btusb-Add-a-Kconfig-option-to-enable-USB-a.patch | 90 | ||||
-rw-r--r-- | configs/base-generic/CONFIG_BT_HCIBTUSB_AUTOSUSPEND | 1 | ||||
-rw-r--r-- | kernel-aarch64-debug.config | 1 | ||||
-rw-r--r-- | kernel-aarch64.config | 1 | ||||
-rw-r--r-- | kernel-armv7hl-debug.config | 1 | ||||
-rw-r--r-- | kernel-armv7hl-lpae-debug.config | 1 | ||||
-rw-r--r-- | kernel-armv7hl-lpae.config | 1 | ||||
-rw-r--r-- | kernel-armv7hl.config | 1 | ||||
-rw-r--r-- | kernel-i686-PAE.config | 1 | ||||
-rw-r--r-- | kernel-i686-PAEdebug.config | 1 | ||||
-rw-r--r-- | kernel-i686-debug.config | 1 | ||||
-rw-r--r-- | kernel-i686.config | 1 | ||||
-rw-r--r-- | kernel-ppc64-debug.config | 1 | ||||
-rw-r--r-- | kernel-ppc64.config | 1 | ||||
-rw-r--r-- | kernel-ppc64le-debug.config | 1 | ||||
-rw-r--r-- | kernel-ppc64le.config | 1 | ||||
-rw-r--r-- | kernel-s390x-debug.config | 1 | ||||
-rw-r--r-- | kernel-s390x.config | 1 | ||||
-rw-r--r-- | kernel-x86_64-debug.config | 1 | ||||
-rw-r--r-- | kernel-x86_64.config | 1 | ||||
-rw-r--r-- | kernel.spec | 8 |
21 files changed, 117 insertions, 0 deletions
diff --git a/0001-Bluetooth-btusb-Add-a-Kconfig-option-to-enable-USB-a.patch b/0001-Bluetooth-btusb-Add-a-Kconfig-option-to-enable-USB-a.patch new file mode 100644 index 000000000..1f94c3d70 --- /dev/null +++ b/0001-Bluetooth-btusb-Add-a-Kconfig-option-to-enable-USB-a.patch @@ -0,0 +1,90 @@ +From 20eeb02a0a489e35de0830b2d61f09d43763c982 Mon Sep 17 00:00:00 2001 +From: Hans de Goede <hdegoede@redhat.com> +Date: Mon, 13 Nov 2017 09:23:19 +0100 +Subject: [PATCH] Bluetooth: btusb: Add a Kconfig option to enable USB + autosuspend by default + +On many laptops the btusb device is the only USB device not having USB +autosuspend enabled, this causes not only the HCI but also the USB +controller to stay awake, together using aprox. 0.4W of power. + +Modern ultrabooks idle around 6W (at 50% screen brightness), 3.5W for +Apollo Lake devices. 0.4W is a significant chunk of this (7 / 11%). + +The btusb driver already contains code to allow enabling USB autosuspend, +but currently leaves it up to the user / userspace to enable it. This +means that for most people it will not be enabled, leading to an +unnecessarily high power consumption. + +Since enabling it is not entirely without risk of regressions, this +commit adds a Kconfig option so that Linux distributions can choose to +enable it by default. This commit also adds a module option so that when +distros receive bugs they can easily ask the user to disable it again +for easy debugging. + +Signed-off-by: Hans de Goede <hdegoede@redhat.com> +--- +Changes in v2: +-s/BT_USB_AUTOSUSPEND/BT_HCIBTUSB_AUTOSUSPEND/ +-s/enable_usb_autosuspend/enable_autosuspend/ +--- + drivers/bluetooth/Kconfig | 10 ++++++++++ + drivers/bluetooth/btusb.c | 7 +++++++ + 2 files changed, 17 insertions(+) + +diff --git a/drivers/bluetooth/Kconfig b/drivers/bluetooth/Kconfig +index 6475f8c0d3b2..20940417d937 100644 +--- a/drivers/bluetooth/Kconfig ++++ b/drivers/bluetooth/Kconfig +@@ -30,6 +30,16 @@ config BT_HCIBTUSB + Say Y here to compile support for Bluetooth USB devices into the + kernel or say M to compile it as module (btusb). + ++config BT_HCIBTUSB_AUTOSUSPEND ++ bool "Enable USB autosuspend for Bluetooth USB devices by default" ++ depends on BT_HCIBTUSB ++ help ++ Say Y here to enable USB autosuspend for Bluetooth USB devices by ++ default. ++ ++ This can be overridden by passing btusb.enable_autosuspend=[y|n] ++ on the kernel commandline. ++ + config BT_HCIBTUSB_BCM + bool "Broadcom protocol support" + depends on BT_HCIBTUSB +diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c +index c054d7bce490..3386034a44aa 100644 +--- a/drivers/bluetooth/btusb.c ++++ b/drivers/bluetooth/btusb.c +@@ -40,6 +40,7 @@ + + static bool disable_scofix; + static bool force_scofix; ++static bool enable_autosuspend = IS_ENABLED(CONFIG_BT_HCIBTUSB_AUTOSUSPEND); + + static bool reset = true; + +@@ -3175,6 +3176,9 @@ static int btusb_probe(struct usb_interface *intf, + } + #endif + ++ if (enable_autosuspend) ++ usb_enable_autosuspend(data->udev); ++ + err = hci_register_dev(hdev); + if (err < 0) + goto out_free_dev; +@@ -3387,6 +3391,9 @@ MODULE_PARM_DESC(disable_scofix, "Disable fixup of wrong SCO buffer size"); + module_param(force_scofix, bool, 0644); + MODULE_PARM_DESC(force_scofix, "Force fixup of wrong SCO buffers size"); + ++module_param(enable_autosuspend, bool, 0644); ++MODULE_PARM_DESC(enable_autosuspend, "Enable USB autosuspend by default"); ++ + module_param(reset, bool, 0644); + MODULE_PARM_DESC(reset, "Send HCI reset command on initialization"); + +-- +2.14.3 + diff --git a/configs/base-generic/CONFIG_BT_HCIBTUSB_AUTOSUSPEND b/configs/base-generic/CONFIG_BT_HCIBTUSB_AUTOSUSPEND new file mode 100644 index 000000000..76c0b541b --- /dev/null +++ b/configs/base-generic/CONFIG_BT_HCIBTUSB_AUTOSUSPEND @@ -0,0 +1 @@ +CONFIG_BT_HCIBTUSB_AUTOSUSPEND=y diff --git a/kernel-aarch64-debug.config b/kernel-aarch64-debug.config index a2dd5e84c..060527ff6 100644 --- a/kernel-aarch64-debug.config +++ b/kernel-aarch64-debug.config @@ -651,6 +651,7 @@ CONFIG_BT_HCIBPA10X=m CONFIG_BT_HCIBT3C=m CONFIG_BT_HCIBTSDIO=m CONFIG_BT_HCIBTUART=m +CONFIG_BT_HCIBTUSB_AUTOSUSPEND=y CONFIG_BT_HCIBTUSB_BCM=y CONFIG_BT_HCIBTUSB=m CONFIG_BT_HCIBTUSB_RTL=y diff --git a/kernel-aarch64.config b/kernel-aarch64.config index 8eb659e73..b7987f8d1 100644 --- a/kernel-aarch64.config +++ b/kernel-aarch64.config @@ -651,6 +651,7 @@ CONFIG_BT_HCIBPA10X=m CONFIG_BT_HCIBT3C=m CONFIG_BT_HCIBTSDIO=m CONFIG_BT_HCIBTUART=m +CONFIG_BT_HCIBTUSB_AUTOSUSPEND=y CONFIG_BT_HCIBTUSB_BCM=y CONFIG_BT_HCIBTUSB=m CONFIG_BT_HCIBTUSB_RTL=y diff --git a/kernel-armv7hl-debug.config b/kernel-armv7hl-debug.config index 196f5da06..01fdcdc7e 100644 --- a/kernel-armv7hl-debug.config +++ b/kernel-armv7hl-debug.config @@ -691,6 +691,7 @@ CONFIG_BT_HCIBPA10X=m CONFIG_BT_HCIBT3C=m CONFIG_BT_HCIBTSDIO=m CONFIG_BT_HCIBTUART=m +CONFIG_BT_HCIBTUSB_AUTOSUSPEND=y CONFIG_BT_HCIBTUSB_BCM=y CONFIG_BT_HCIBTUSB=m CONFIG_BT_HCIBTUSB_RTL=y diff --git a/kernel-armv7hl-lpae-debug.config b/kernel-armv7hl-lpae-debug.config index 052e95f96..4ad110bb0 100644 --- a/kernel-armv7hl-lpae-debug.config +++ b/kernel-armv7hl-lpae-debug.config @@ -667,6 +667,7 @@ CONFIG_BT_HCIBPA10X=m CONFIG_BT_HCIBT3C=m CONFIG_BT_HCIBTSDIO=m CONFIG_BT_HCIBTUART=m +CONFIG_BT_HCIBTUSB_AUTOSUSPEND=y CONFIG_BT_HCIBTUSB_BCM=y CONFIG_BT_HCIBTUSB=m CONFIG_BT_HCIBTUSB_RTL=y diff --git a/kernel-armv7hl-lpae.config b/kernel-armv7hl-lpae.config index 0ecf558b5..aa82de9f2 100644 --- a/kernel-armv7hl-lpae.config +++ b/kernel-armv7hl-lpae.config @@ -666,6 +666,7 @@ CONFIG_BT_HCIBPA10X=m CONFIG_BT_HCIBT3C=m CONFIG_BT_HCIBTSDIO=m CONFIG_BT_HCIBTUART=m +CONFIG_BT_HCIBTUSB_AUTOSUSPEND=y CONFIG_BT_HCIBTUSB_BCM=y CONFIG_BT_HCIBTUSB=m CONFIG_BT_HCIBTUSB_RTL=y diff --git a/kernel-armv7hl.config b/kernel-armv7hl.config index d49810d90..bc7930e92 100644 --- a/kernel-armv7hl.config +++ b/kernel-armv7hl.config @@ -690,6 +690,7 @@ CONFIG_BT_HCIBPA10X=m CONFIG_BT_HCIBT3C=m CONFIG_BT_HCIBTSDIO=m CONFIG_BT_HCIBTUART=m +CONFIG_BT_HCIBTUSB_AUTOSUSPEND=y CONFIG_BT_HCIBTUSB_BCM=y CONFIG_BT_HCIBTUSB=m CONFIG_BT_HCIBTUSB_RTL=y diff --git a/kernel-i686-PAE.config b/kernel-i686-PAE.config index 09ef3d8eb..a0dee5ea6 100644 --- a/kernel-i686-PAE.config +++ b/kernel-i686-PAE.config @@ -559,6 +559,7 @@ CONFIG_BT_HCIBPA10X=m CONFIG_BT_HCIBT3C=m CONFIG_BT_HCIBTSDIO=m CONFIG_BT_HCIBTUART=m +CONFIG_BT_HCIBTUSB_AUTOSUSPEND=y CONFIG_BT_HCIBTUSB_BCM=y CONFIG_BT_HCIBTUSB=m CONFIG_BT_HCIBTUSB_RTL=y diff --git a/kernel-i686-PAEdebug.config b/kernel-i686-PAEdebug.config index 9344bae46..5fa1f0112 100644 --- a/kernel-i686-PAEdebug.config +++ b/kernel-i686-PAEdebug.config @@ -560,6 +560,7 @@ CONFIG_BT_HCIBPA10X=m CONFIG_BT_HCIBT3C=m CONFIG_BT_HCIBTSDIO=m CONFIG_BT_HCIBTUART=m +CONFIG_BT_HCIBTUSB_AUTOSUSPEND=y CONFIG_BT_HCIBTUSB_BCM=y CONFIG_BT_HCIBTUSB=m CONFIG_BT_HCIBTUSB_RTL=y diff --git a/kernel-i686-debug.config b/kernel-i686-debug.config index a3220bfef..184707dad 100644 --- a/kernel-i686-debug.config +++ b/kernel-i686-debug.config @@ -560,6 +560,7 @@ CONFIG_BT_HCIBPA10X=m CONFIG_BT_HCIBT3C=m CONFIG_BT_HCIBTSDIO=m CONFIG_BT_HCIBTUART=m +CONFIG_BT_HCIBTUSB_AUTOSUSPEND=y CONFIG_BT_HCIBTUSB_BCM=y CONFIG_BT_HCIBTUSB=m CONFIG_BT_HCIBTUSB_RTL=y diff --git a/kernel-i686.config b/kernel-i686.config index 78ab7ec32..824a097ae 100644 --- a/kernel-i686.config +++ b/kernel-i686.config @@ -559,6 +559,7 @@ CONFIG_BT_HCIBPA10X=m CONFIG_BT_HCIBT3C=m CONFIG_BT_HCIBTSDIO=m CONFIG_BT_HCIBTUART=m +CONFIG_BT_HCIBTUSB_AUTOSUSPEND=y CONFIG_BT_HCIBTUSB_BCM=y CONFIG_BT_HCIBTUSB=m CONFIG_BT_HCIBTUSB_RTL=y diff --git a/kernel-ppc64-debug.config b/kernel-ppc64-debug.config index c4c55c402..69c09ae95 100644 --- a/kernel-ppc64-debug.config +++ b/kernel-ppc64-debug.config @@ -545,6 +545,7 @@ CONFIG_BT_HCIBPA10X=m CONFIG_BT_HCIBT3C=m CONFIG_BT_HCIBTSDIO=m CONFIG_BT_HCIBTUART=m +CONFIG_BT_HCIBTUSB_AUTOSUSPEND=y CONFIG_BT_HCIBTUSB_BCM=y CONFIG_BT_HCIBTUSB=m CONFIG_BT_HCIBTUSB_RTL=y diff --git a/kernel-ppc64.config b/kernel-ppc64.config index b7b40c8d7..485581bf7 100644 --- a/kernel-ppc64.config +++ b/kernel-ppc64.config @@ -544,6 +544,7 @@ CONFIG_BT_HCIBPA10X=m CONFIG_BT_HCIBT3C=m CONFIG_BT_HCIBTSDIO=m CONFIG_BT_HCIBTUART=m +CONFIG_BT_HCIBTUSB_AUTOSUSPEND=y CONFIG_BT_HCIBTUSB_BCM=y CONFIG_BT_HCIBTUSB=m CONFIG_BT_HCIBTUSB_RTL=y diff --git a/kernel-ppc64le-debug.config b/kernel-ppc64le-debug.config index f30de424e..f411abd53 100644 --- a/kernel-ppc64le-debug.config +++ b/kernel-ppc64le-debug.config @@ -501,6 +501,7 @@ CONFIG_BT_HCIBPA10X=m CONFIG_BT_HCIBT3C=m CONFIG_BT_HCIBTSDIO=m CONFIG_BT_HCIBTUART=m +CONFIG_BT_HCIBTUSB_AUTOSUSPEND=y CONFIG_BT_HCIBTUSB_BCM=y CONFIG_BT_HCIBTUSB=m CONFIG_BT_HCIBTUSB_RTL=y diff --git a/kernel-ppc64le.config b/kernel-ppc64le.config index 59a0a4218..05e737625 100644 --- a/kernel-ppc64le.config +++ b/kernel-ppc64le.config @@ -500,6 +500,7 @@ CONFIG_BT_HCIBPA10X=m CONFIG_BT_HCIBT3C=m CONFIG_BT_HCIBTSDIO=m CONFIG_BT_HCIBTUART=m +CONFIG_BT_HCIBTUSB_AUTOSUSPEND=y CONFIG_BT_HCIBTUSB_BCM=y CONFIG_BT_HCIBTUSB=m CONFIG_BT_HCIBTUSB_RTL=y diff --git a/kernel-s390x-debug.config b/kernel-s390x-debug.config index 82b082d0b..84498176d 100644 --- a/kernel-s390x-debug.config +++ b/kernel-s390x-debug.config @@ -502,6 +502,7 @@ CONFIG_BT_HCIBPA10X=m CONFIG_BT_HCIBT3C=m CONFIG_BT_HCIBTSDIO=m CONFIG_BT_HCIBTUART=m +CONFIG_BT_HCIBTUSB_AUTOSUSPEND=y CONFIG_BT_HCIBTUSB_BCM=y CONFIG_BT_HCIBTUSB=m CONFIG_BT_HCIBTUSB_RTL=y diff --git a/kernel-s390x.config b/kernel-s390x.config index ed31f652a..7375c2b8b 100644 --- a/kernel-s390x.config +++ b/kernel-s390x.config @@ -501,6 +501,7 @@ CONFIG_BT_HCIBPA10X=m CONFIG_BT_HCIBT3C=m CONFIG_BT_HCIBTSDIO=m CONFIG_BT_HCIBTUART=m +CONFIG_BT_HCIBTUSB_AUTOSUSPEND=y CONFIG_BT_HCIBTUSB_BCM=y CONFIG_BT_HCIBTUSB=m CONFIG_BT_HCIBTUSB_RTL=y diff --git a/kernel-x86_64-debug.config b/kernel-x86_64-debug.config index be68b2ef4..d6e5a6342 100644 --- a/kernel-x86_64-debug.config +++ b/kernel-x86_64-debug.config @@ -572,6 +572,7 @@ CONFIG_BT_HCIBPA10X=m CONFIG_BT_HCIBT3C=m CONFIG_BT_HCIBTSDIO=m CONFIG_BT_HCIBTUART=m +CONFIG_BT_HCIBTUSB_AUTOSUSPEND=y CONFIG_BT_HCIBTUSB_BCM=y CONFIG_BT_HCIBTUSB=m CONFIG_BT_HCIBTUSB_RTL=y diff --git a/kernel-x86_64.config b/kernel-x86_64.config index 171c43caf..5656ab7fb 100644 --- a/kernel-x86_64.config +++ b/kernel-x86_64.config @@ -571,6 +571,7 @@ CONFIG_BT_HCIBPA10X=m CONFIG_BT_HCIBT3C=m CONFIG_BT_HCIBTSDIO=m CONFIG_BT_HCIBTUART=m +CONFIG_BT_HCIBTUSB_AUTOSUSPEND=y CONFIG_BT_HCIBTUSB_BCM=y CONFIG_BT_HCIBTUSB=m CONFIG_BT_HCIBTUSB_RTL=y diff --git a/kernel.spec b/kernel.spec index bdf1af2f7..65b32e6e5 100644 --- a/kernel.spec +++ b/kernel.spec @@ -654,6 +654,10 @@ Patch626: 1-2-kvm-vmx-Reinstate-support-for-CPUs-without-virtual-NMI.patch # Pointed to by Eric Anholt Patch627: rpi-graphics-fix.patch +# For https://fedoraproject.org/wiki/Changes/ImprovedLaptopBatteryLife +# Queued in bluetooth-next for merging into 4.16 +Patch628: 0001-Bluetooth-btusb-Add-a-Kconfig-option-to-enable-USB-a.patch + # END OF PATCH DEFINITIONS %endif @@ -2203,6 +2207,10 @@ fi # # %changelog +* Thu Nov 16 2017 Hans de Goede <jwrdegoede@fedoraproject.org> +- Enable USB autosuspend for USB bluetooth receivers by default, use + btusb.enable_autosuspend=n on the kernel cmdline to disable + * Wed Nov 15 2017 Laura Abbott <labbott@redhat.com> - Disable IPX and NCPFS |