Bug 219519

Summary: Hibernation Failure on 6.11+ due to btusb
Product: Drivers Reporter: Antheas Kapenekakis (lkml)
Component: BluetoothAssignee: linux-bluetooth (linux-bluetooth)
Status: NEW ---    
Severity: normal CC: pmenzel+bugzilla.kernel.org, regressions
Priority: P3    
Hardware: All   
OS: Linux   
Kernel Version: 6.11+ Subsystem:
Regression: Yes Bisected commit-id: ceac1cb0259de682d78f5c784ef8e0b13022e9d9
Attachments: Stack trace after resume
Revert patch

Description Antheas Kapenekakis 2024-11-22 10:02:44 UTC
Created attachment 307262 [details]
Stack trace after resume

On an ASUS ROG Ally X (and possibly Legion Go) and a kernel of 6.11+, if Bluetooth is enabled, hibernation will fail on resume with RIP __list_del_entry_valid_or_report.cold.

This is under the function hci_unregister_dev

6.10 appears to work however. See the stack trace below. It is from a tainted 6.11 kernel, but the same issue occurs on 6.12.0 and 6.11.y

Bisection between 6.10 and 6.11 made some kernels that could not boot, so I could not finish it. I also tried reverting "Fix not handling hibernation actions" and "Bluetooth: btusb: Don't fail external suspend requests" completely which did not help

The following lines were used to produce the trace:
```
sudo chvt 2
echo N | sudo tee /sys/module/printk/parameters/console_suspend
echo devices | sudo tee /sys/power/pm_test
echo disk | sudo tee /sys/power/state
```
Comment 1 Antheas Kapenekakis 2024-11-22 16:47:46 UTC
I think it is commit ceac1cb0259de682d78f5c784ef8e0b13022e9d9. The way i bisected the kernel was a bit unclean. So I will try to do a clean revert in a few hours.
Comment 2 Antheas Kapenekakis 2024-11-22 23:17:24 UTC
Created attachment 307265 [details]
Revert patch
Comment 3 Antheas Kapenekakis 2024-11-22 23:18:35 UTC
Reverting commits ceac1cb0259de682d78f5c784ef8e0b13022e9d9 and
d09009bc80d9d0d812b988888c40cd86e52eaf1e seems to fix the issue (later is required to revert former).

I will do more testing later. I tried to look through the patch to see what could be causing it but I cannot.