Bug 60697 - Bluetooth re-enabled after resume from hibernation (Lenovo ThinkPad, X201 3626)
Summary: Bluetooth re-enabled after resume from hibernation (Lenovo ThinkPad, X201 3626)
Status: REOPENED
Alias: None
Product: Drivers
Classification: Unclassified
Component: Platform_x86 (show other bugs)
Hardware: x86-64 Linux
: P1 normal
Assignee: Matthew Garrett
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-05 18:10 UTC by Jeffery To
Modified: 2017-03-02 17:47 UTC (History)
10 users (show)

See Also:
Kernel Version: v3.11-rc3
Subsystem:
Regression: Yes
Bisected commit-id:


Attachments
Environment info (40.68 KB, text/plain)
2013-08-05 18:10 UTC, Jeffery To
Details
Output of acpidump (296.84 KB, application/x-ns-proxy-autoconfig)
2013-08-05 18:11 UTC, Jeffery To
Details
Output of dmidecode --dump (15.16 KB, text/plain)
2013-08-07 11:23 UTC, Jeffery To
Details
output of dmidecode --dump (22.17 KB, text/plain)
2013-08-20 22:15 UTC, Wouter Depypere
Details
environment (41.18 KB, text/plain)
2013-08-20 22:18 UTC, Wouter Depypere
Details
the output of acpidump (227.92 KB, text/plain)
2013-08-22 08:45 UTC, Wouter Depypere
Details
Disable win8 mode for ThinkPad X201 and Latitue E6230 (1.72 KB, patch)
2013-12-04 06:17 UTC, Aaron Lu
Details | Diff
new output dmidecode --dump (22.17 KB, text/plain)
2013-12-05 10:14 UTC, Wouter Depypere
Details
Output of dmidecode, with patch (15.73 KB, text/plain)
2013-12-06 05:15 UTC, Jeffery To
Details
thinkpad_acpi test patch (711 bytes, patch)
2013-12-11 00:42 UTC, Matthew Garrett
Details | Diff

Description Jeffery To 2013-08-05 18:10:19 UTC
Created attachment 107102 [details]
Environment info

I'm currently on the 3.8.0 kernel with Ubuntu 13.04 (Raring) x64 on a Thinkpad x201. I have hibernation enabled by following the instructions in the official Ubuntu documentation[1].

If Bluetooth is disabled before hibernation, on resume it will be re-enabled.

I have the latest BIOS installed (1.40-1.15)[2], and can reproduce this issue with the latest mainline kernel available to me (v3.11-rc3-saucy)[3]. I didn't experience this issue with the 3.5.0 kernel (with Ubuntu 12.10 Quantal), so it appears to be a regression.

I've done a bisection with this result:

> a57f7f9175b8ccbc9df83ac13860488913115de4 is the first bad commit
> commit a57f7f9175b8ccbc9df83ac13860488913115de4
> Author: Bob Moore <robert.moore@intel.com>
> Date:   Fri Aug 17 10:55:02 2012 +0800
> 
> ACPICA: Add Windows8/Server2012 string for _OSI method.
> 
> This change adds a new _OSI string, "Windows 2012" for both Windows 8
> and Windows Server 2012.
> 
> From Microsoft document "How to Identify the Windows Version in ACPI
> by Using _OSI", July 13, 2012.
> 
> Signed-off-by: Bob Moore <robert.moore@intel.com>
> Signed-off-by: Feng Tang <feng.tang@intel.com>
> Signed-off-by: Len Brown <len.brown@intel.com>
> 
> :040000 040000 55311ce2f9fed66501b06f93f67fa99b54d46e86
> 998889c21c3b68f8072ad131b643c592a4cbe423 M    drivers

I originally logged this issue to the Ubuntu bug tracker[4], but it appears to be an upstream issue and so I was instructed to report here.

Attached is more information on my environment and the output of acpidump. Please let me know if there is anything I can do to help resolve this issue.

Thanks,
Jeff

[1] https://help.ubuntu.com/13.04/ubuntu-help/power-hibernate.html
[2] http://support.lenovo.com/en_US/downloads/detail.page?DocID=DS013909
[3] http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.11-rc3-saucy/
[4] https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1179823
Comment 1 Jeffery To 2013-08-05 18:11:11 UTC
Created attachment 107103 [details]
Output of acpidump
Comment 2 Rafael J. Wysocki 2013-08-06 23:00:08 UTC
Does it help if you append acpi_osi="!Windows 2012" to the kernel's command line?
Comment 3 Jeffery To 2013-08-07 08:39:21 UTC
When I add acpi_osi="!Windows 2012" to v3.11-rc4 (which still has this issue), the issue is not present, i.e. Bluetooth stays disabled after resuming.
Comment 4 Rafael J. Wysocki 2013-08-07 11:03:02 UTC
Please attach the output of dmidecode from the affected machine.
Comment 5 Jeffery To 2013-08-07 11:23:57 UTC
Created attachment 107133 [details]
Output of dmidecode --dump

Please let me know if you need a binary dump as well.
Comment 6 Aaron Lu 2013-08-12 03:24:14 UTC
I've checked the ASL code firmware has provided, it's not clear to me why win8 mode would affect this functionality. But perhaps thinkpad-acpi maintainer Henrique knows the reason.
Comment 7 Rafael J. Wysocki 2013-08-12 13:07:34 UTC
ASL is not the only thing generally affected by OSI.  It simply changes the BIOS' behavior and there's no telling which way.
Comment 8 Len Brown 2013-08-16 20:43:35 UTC
Can you reproduce this issue when the thinkpad-acpi driver is not present?
Comment 9 Jeffery To 2013-08-18 16:33:39 UTC
I'm able to reproduce this issue without the thinkpad_acpi module loaded (tested with v3.11-rc5).
Comment 10 Wouter Depypere 2013-08-20 22:15:50 UTC
Created attachment 107261 [details]
output of dmidecode --dump
Comment 11 Wouter Depypere 2013-08-20 22:18:49 UTC
Created attachment 107262 [details]
environment
Comment 12 Wouter Depypere 2013-08-20 22:20:04 UTC
I also have trouble with this commit, it disables my hardware switch for enable/disable wifi. See [1] for full explanation.

When I add acpi_osi="!Windows 2012" it fixes my issue.

dmidecode output uploaded as requested [2] and environment [3]

[1] http://marc.info/?l=linux-acpi&m=137703324003948&w=2
[2] https://bugzilla.kernel.org/attachment.cgi?id=107261
[3] https://bugzilla.kernel.org/attachment.cgi?id=107262
Comment 13 Aaron Lu 2013-08-22 00:51:47 UTC
(In reply to Jeffery To from comment #9)
> I'm able to reproduce this issue without the thinkpad_acpi module loaded
> (tested with v3.11-rc5).

I'm not sure about this, but I remembered bluetooth enable/disable functionality is provided by thinkpad_acpi module. So without that module, can you still disable bluetooth? Or is it that it boots with bluetooth off and when resumed, bluetooth is tured on?

(In reply to Wouter Depypere from comment #12)
> I also have trouble with this commit, it disables my hardware switch for
> enable/disable wifi. See [1] for full explanation.

Please also attach acpidump, thanks.
Comment 14 Jeffery To 2013-08-22 07:57:38 UTC
(In reply to Aaron Lu from comment #13)
> I'm not sure about this, but I remembered bluetooth enable/disable
> functionality is provided by thinkpad_acpi module. So without that module,
> can you still disable bluetooth? Or is it that it boots with bluetooth off
> and when resumed, bluetooth is tured on?

With thinkpad_acpi blacklisted, Bluetooth is enabled on boot. I can't turn it off unless I run "modprobe thinkpad_acpi" beforehand. After turning Bluetooth off, I ran "rmmod thinkpad_acpi" before hibernating. I verified that thinkpad_acpi isn't loaded (with lsmod) before hibernating and after resuming. Bluetooth is enabled on resume.

I tried this same test with the acpi_osi="!Windows 2012" kernel parameter (and thinkpad_acpi blacklisted). Bluetooth is disabled on boot. I verified that thinkpad_acpi isn't loaded (with lsmod) before hibernating and after resuming. Bluetooth is disabled on resume.

(I remember Bluetooth use to be disabled on boot if I left it disabled on shutdown/reboot; this was usually the case since I rarely use Bluetooth. IIRC this changed after upgrading to Raring / the v3.8 kernel; now it is always enabled, and I installed TLP to "fix" this. I didn't file a report for this since I wasn't sure if it was a bug.)
Comment 15 Aaron Lu 2013-08-22 08:15:20 UTC
(In reply to Rafael J. Wysocki from comment #7)
> ASL is not the only thing generally affected by OSI.  It simply changes the
> BIOS' behavior and there's no telling which way.

Then there is nothing we can do I'm afraid... Shall I prepare a patch to do the OSI blacklist for the two systems?
Comment 16 Aaron Lu 2013-08-22 08:16:23 UTC
Hi Jeffery,

Do you have Win8 installed? I wonder what the behavior of Win8 is regarding Bluetooth.
Comment 17 Jeffery To 2013-08-22 08:24:42 UTC
(In reply to Aaron Lu from comment #16)
> Hi Jeffery,
> 
> Do you have Win8 installed? I wonder what the behavior of Win8 is regarding
> Bluetooth.

Sorry, I don't have Windows 8. If there's important information to be found, I can find a way to install it.
Comment 18 Aaron Lu 2013-08-22 08:43:09 UTC
(In reply to Jeffery To from comment #17)
> (In reply to Aaron Lu from comment #16)
> > Hi Jeffery,
> > 
> > Do you have Win8 installed? I wonder what the behavior of Win8 is regarding
> > Bluetooth.
> 
> Sorry, I don't have Windows 8. If there's important information to be found,
> I can find a way to install it.

Not that important to cost you the license fee, just good to know :-) So forget it, even if we know it works or not, it still doesn't give me any hint why.
Comment 19 Wouter Depypere 2013-08-22 08:45:01 UTC
Created attachment 107280 [details]
the output of acpidump

As requested the output of my acpidump.
Comment 20 Len Brown 2013-12-03 01:31:41 UTC
Aaron: we have dmidecode above, can you add this to the win8 OSI blacklist?
Comment 21 Aaron Lu 2013-12-03 02:33:01 UTC
Hi Jeffery and Wouter,

Is there any side effects when you use acpi_osi="!Windows 2012"? If not, I'll add your system into the win8 blacklist table.
Comment 22 Jeffery To 2013-12-03 08:51:06 UTC
(In reply to Aaron Lu from comment #21)
> Hi Jeffery and Wouter,
> 
> Is there any side effects when you use acpi_osi="!Windows 2012"? If not,
> I'll add your system into the win8 blacklist table.

I added this to my grub config about a month ago and haven't noticed anything particular.
Comment 23 Wouter Depypere 2013-12-03 08:59:07 UTC
(In reply to Jeffery To from comment #22)
> (In reply to Aaron Lu from comment #21)
> > Hi Jeffery and Wouter,
> > 
> > Is there any side effects when you use acpi_osi="!Windows 2012"? If not,
> > I'll add your system into the win8 blacklist table.
> 
> I added this to my grub config about a month ago and haven't noticed
> anything particular.

It is the same for me. Added it to grub a few months ago and I haven't experienced anything particular.
Comment 24 Aaron Lu 2013-12-04 06:17:11 UTC
Created attachment 117341 [details]
Disable win8 mode for ThinkPad X201 and Latitue E6230

Please give it a test, no need to specify acpi_osi="!Windows 2012" cmdline option.

Please attach dmidecode again without using the --dump option, that option is for debugging not for human eye :-)
Comment 25 Wouter Depypere 2013-12-05 10:14:04 UTC
(In reply to Aaron Lu from comment #24)
> Created attachment 117341 [details]
> Disable win8 mode for ThinkPad X201 and Latitue E6230
> 
> Please give it a test, no need to specify acpi_osi="!Windows 2012" cmdline
> option.
> 
> Please attach dmidecode again without using the --dump option, that option
> is for debugging not for human eye :-)

I have tested it with 3.13 and the proposed patch and I can confirm it works for me. I will attach the dmidecode shortly.
Comment 26 Wouter Depypere 2013-12-05 10:14:58 UTC
Created attachment 117581 [details]
new output dmidecode --dump
Comment 27 Jeffery To 2013-12-06 05:14:21 UTC
(In reply to Wouter Depypere from comment #25)
> (In reply to Aaron Lu from comment #24)
> > Created attachment 117341 [details]
> > Disable win8 mode for ThinkPad X201 and Latitue E6230
> > 
> > Please give it a test, no need to specify acpi_osi="!Windows 2012" cmdline
> > option.
> > 
> > Please attach dmidecode again without using the --dump option, that option
> > is for debugging not for human eye :-)
> 
> I have tested it with 3.13 and the proposed patch and I can confirm it works
> for me. I will attach the dmidecode shortly.

3.13 with the patch also works for me - thanks!
Comment 28 Jeffery To 2013-12-06 05:15:30 UTC
Created attachment 117721 [details]
Output of dmidecode, with patch
Comment 29 Aaron Lu 2013-12-06 05:25:41 UTC
Thanks for the confirm, patch sent out:
https://patchwork.kernel.org/patch/3293091/
Comment 30 Matthew Garrett 2013-12-11 00:42:11 UTC
Created attachment 118041 [details]
thinkpad_acpi test patch

Jeffery,

Can you test this patch without Aaron's patch applied?
Comment 31 Jeffery To 2013-12-13 11:14:44 UTC
Mathew,

I tried your patch with 3.13-rc3 (without Aaron's patch or the acpi_osi parameter). Bluetooth was re-enabled after resuming from hibernate.
Comment 32 Michael Ledin 2017-03-02 17:47:00 UTC
I'm from 2017 and the bug is still here :(
acpi_osi="!Windows 2012" workaround works.

Note You need to log in before you can comment on or make changes to this bug.