Bug 204765 - debugfs: File 'le_min_key_size' in directory 'hci0' already present!
Summary: debugfs: File 'le_min_key_size' in directory 'hci0' already present!
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Bluetooth (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: linux-bluetooth@vger.kernel.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-09-04 12:23 UTC by El jinete sin cabeza
Modified: 2021-01-02 13:43 UTC (History)
9 users (show)

See Also:
Kernel Version: 5.3.0-050300rc7-generic
Subsystem:
Regression: No
Bisected commit-id:


Attachments
dmesg.5.3.0-050300rc7-generic (71.18 KB, text/plain)
2019-09-04 12:23 UTC, El jinete sin cabeza
Details
lspci -vvnn (22.65 KB, text/plain)
2019-09-04 12:24 UTC, El jinete sin cabeza
Details
Output of lsusb (wifi/bluetooth chip is connected via usb on T490) (59.66 KB, text/plain)
2019-11-02 09:54 UTC, Max Ammann
Details

Description El jinete sin cabeza 2019-09-04 12:23:23 UTC
Created attachment 284813 [details]
dmesg.5.3.0-050300rc7-generic

dmesg:
[  130.220429] debugfs: File 'le_min_key_size' in directory 'hci0' already present!
[  130.220433] debugfs: File 'le_max_key_size' in directory 'hci0' already present!
[  130.220434] debugfs: File 'force_bredr_smp' in directory 'hci0' already present!
Comment 1 El jinete sin cabeza 2019-09-04 12:24:30 UTC
Created attachment 284815 [details]
lspci -vvnn
Comment 2 Max Ammann 2019-11-02 09:54:43 UTC
Created attachment 285745 [details]
Output of lsusb (wifi/bluetooth chip is connected via usb on T490)

I'm experiencing the same problem. I'm also unable to reconnect to bluetooth devices after the pairing and the initial connect succeeded.
Comment 3 Alfonso Chacón 2020-01-22 05:31:07 UTC
I have the same issue

Device was discovered and connected fine the first time, then it was disconnected immediately.

Every time I try to connect it again, it disconnects.

s@OrangeDemon:~$ sudo hciconfig hci0 -a
hci0:	Type: Primary  Bus: USB
	BD Address: DC:FB:48:28:FA:95  ACL MTU: 1021:4  SCO MTU: 96:6
	UP RUNNING PSCAN ISCAN 
	RX bytes:76148 acl:16 sco:0 events:2184 errors:0
	TX bytes:13222 acl:14 sco:0 commands:589 errors:0
	Features: 0xbf 0xfe 0x0f 0xfe 0xdb 0xff 0x7b 0x87
	Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 
	Link policy: RSWITCH SNIFF 
	Link mode: SLAVE ACCEPT 
	Name: 'OrangeDemon'
	Class: 0x100104
	Service Classes: Object Transfer
	Device Class: Computer, Desktop workstation
	HCI Version: 5.0 (0x9)  Revision: 0x100
	LMP Version: 5.0 (0x9)  Subversion: 0x100
	Manufacturer: Intel Corp. (2)

dmesg:
[    4.172065] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    4.172066] Bluetooth: BNEP filters: protocol multicast
[    4.172068] Bluetooth: BNEP socket layer initialized
..
[   13.392448] Bluetooth: RFCOMM TTY layer initialized
[   13.392452] Bluetooth: RFCOMM socket layer initialized
[   13.392456] Bluetooth: RFCOMM ver 1.11
[  246.531147] debugfs: File 'le_min_key_size' in directory 'hci0' already present!
[  246.531153] debugfs: File 'le_max_key_size' in directory 'hci0' already present!
[  275.658457] debugfs: File 'le_min_key_size' in directory 'hci0' already present!
[  275.658463] debugfs: File 'le_max_key_size' in directory 'hci0' already present!
Comment 4 Matias Karhumaa 2020-01-22 05:58:43 UTC
Logged debugfs error and not being able to connect should not have any relation.

I would suggest opening separate ticket for connection problem. Also please use btmon to capture the problem.
Comment 5 Alfonso Chacón 2020-01-24 05:40:55 UTC
(In reply to Matias Karhumaa from comment #4)
> Logged debugfs error and not being able to connect should not have any
> relation.
> 
> I would suggest opening separate ticket for connection problem. Also please
> use btmon to capture the problem.

You are totally right Matias, this was not related, I was able to connect my headset without any problem.....
Comment 6 Artem S. Tashkinov 2020-04-11 02:06:02 UTC
This bug occurs after a software suspend/resume cycle. It's valid and it needs to be fixed. Some logic in the driver doesn't handle suspend properly.
Comment 7 Artem S. Tashkinov 2020-04-11 02:06:29 UTC
The bug is reproducible in kernel 5.5.15.
Comment 8 Matias Karhumaa 2020-04-11 04:45:55 UTC
Hi Artem,

This has been fixed in 5.6 kernel: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/net/bluetooth/smp.c?id=18f81241b74fb49d576c83fbbab9a0b6e3bb20d4

Best regards,
Matias
Comment 9 Willis Monroe 2020-05-26 16:41:07 UTC
Still seeing this error with kernel 5.6.14 and the most recent firmware:

dmesg:
[  271.857043] debugfs: File 'force_bredr_smp' in directory 'hci0' already present!

Seems like the patch fixed two of the debugfs calls but not the third one.
Comment 10 Maarten Fonville 2020-09-12 10:04:39 UTC
I am suddenly seeing the same error after suspend/hibernation on my laptop with my Microsoft Surface bluetooth mouse, using latest Ubuntu kernel 5.4.0-47-generic #51-Ubuntu SMP Fri Sep 4 19:50:52 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux:


[82250.719088] Bluetooth: hci0: Bootloader revision 0.0 build 26 week 38 2015
[82250.720091] Bluetooth: hci0: Device revision is 16
[82250.720092] Bluetooth: hci0: Secure boot is enabled
[82250.720093] Bluetooth: hci0: OTP lock is enabled
[82250.720094] Bluetooth: hci0: API lock is enabled
[82250.720094] Bluetooth: hci0: Debug lock is disabled
[82250.720095] Bluetooth: hci0: Minimum firmware build 1 week 10 2014
[82250.720099] Bluetooth: hci0: Found device firmware: intel/ibt-12-16.sfi
[82250.722178] done.
[82250.757394] PM: suspend exit
[82250.980766] Generic FE-GE Realtek PHY r8169-200:00: attached PHY driver [Generic FE-GE Realtek PHY] (mii_bus:phy_addr=r8169-200:00, irq=IGNORE)
[82251.091652] r8169 0000:02:00.0 enp2s0: Link is Down
[82252.225425] Bluetooth: hci0: Waiting for firmware download to complete
[82252.226105] Bluetooth: hci0: Firmware loaded in 1472555 usecs
[82252.226211] Bluetooth: hci0: Waiting for device to boot
[82252.238154] Bluetooth: hci0: Device booted in 11754 usecs
[82252.238165] Bluetooth: hci0: Found Intel DDC parameters: intel/ibt-12-16.ddc
[82252.241173] Bluetooth: hci0: Applying Intel DDC parameters completed
[82326.333382] Lockdown: systemd-logind: hibernation is restricted; see man kernel_lockdown.7
[82358.148284] debugfs: File 'le_min_key_size' in directory 'hci0' already present!
[82358.148303] debugfs: File 'le_max_key_size' in directory 'hci0' already present!
Comment 11 mirh 2020-09-30 23:59:43 UTC
Of course you are seeing that error if you use 5.4 and the fix landed in 5.6 with no backports?

If any the true shame is that nobody has yet addressed the same problem with "force_bredr_smp"
Comment 12 mirh 2020-12-02 10:54:02 UTC
https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git/commit/?id=82493316507a720b6faa2ec23971c0ca89c6dcb0 ("Bluetooth: Move force_bredr_smp debugfs into hci_debugfs_create_bredr")

Guess we'll have to wait 5.11 if any kind of backporting is unthinkable.
Comment 13 Sergey Ivanov 2021-01-02 13:43:27 UTC
Hi all. I don't see why only 5.11 fixes this. As for me I see such an issue after BT was off and there was the sleep of laptop. 

debugfs: File 'force_bredr_smp' in directory 'hci0' already present!

uname -a
Linux ice-ubuntu 5.8.0-34-generic #37-Ubuntu SMP Thu Dec 10 18:01:14 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

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