You are not logged in.

#1 2023-08-24 08:28:39

maziar
Member
Registered: 2022-08-28
Posts: 58

[SOLVED] Remove module with circular dependency without ...

Hi

uname -a : 6.4.11-arch2-1 #1 SMP PREEMPT_DYNAMIC Sat, 19 Aug 2023 15:38:34 +0000 x86_64 GNU/Linux

modprobe --show-depends bnep:
insmod /lib/modules/6.4.11-arch2-1/kernel/lib/crc16.ko.zst
insmod /lib/modules/6.4.11-arch2-1/kernel/net/rfkill/rfkill.ko.zst
insmod /lib/modules/6.4.11-arch2-1/kernel/crypto/ecdh_generic.ko.zst
insmod /lib/modules/6.4.11-arch2-1/kernel/net/bluetooth/bluetooth.ko.zst
insmod /lib/modules/6.4.11-arch2-1/kernel/net/bluetooth/bnep/bnep.ko.zst

modprobe --show-depends bluetooth:
insmod /lib/modules/6.4.11-arch2-1/kernel/lib/crc16.ko.zst
insmod /lib/modules/6.4.11-arch2-1/kernel/net/rfkill/rfkill.ko.zst
insmod /lib/modules/6.4.11-arch2-1/kernel/crypto/ecdh_generic.ko.zst
insmod /lib/modules/6.4.11-arch2-1/kernel/net/bluetooth/bluetooth.ko.zst

rmmod bnep
rmmod: ERROR: Module bnep is in use

rmmod bluetooth
rmmod: ERROR: Module bluetooth is in use by: btrtl btmtk btintel btbcm bnep btusb

lsmod | grep bnep
bnep                   36864  2
bluetooth            1093632  15 btrtl,btmtk,btintel,btbcm,bnep,btusb


1. Is circular dependency?
2. How can you remove or reload the Bluetooth module without using blacklist & restart?

Last edited by maziar (2023-08-24 13:27:22)

Offline

#2 2023-08-24 08:47:57

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,104

Re: [SOLVED] Remove module with circular dependency without ...

1. no (bnep depends on bluetooth, bluetooth does NOT depend on bnep)
2. stop using bluetooth userspace stuff

Since this is obviously an https://en.wikipedia.org/wiki/XY_problem - what problem are you actually trying to solve?

Offline

#3 2023-08-24 08:56:09

maziar
Member
Registered: 2022-08-28
Posts: 58

Re: [SOLVED] Remove module with circular dependency without ...

seth wrote:

1. no (bnep depends on bluetooth, bluetooth does NOT depend on bnep)
2. stop using bluetooth userspace stuff

Since this is obviously an https://en.wikipedia.org/wiki/XY_problem - what problem are you actually trying to solve?


Hi
I tried to solve my Asrock trx40 mainboard problem with Bluetooth and also learned more!
As my last solution, remove & load again to solve the problem when happens

1. If Bluetooth is not dependent bnep what does it mean:

rmmod bluetooth
rmmod: ERROR: Module bluetooth is in use by btrtl btmtk btintel btbcm bnep btusb

Then the up message doesn't show Bluetooth module depended on bnep ??


2. How do I find & stop dependency in "userspace stuff" for it? It seems no daemon & service run for it.
3. My Bluetooth does not work at the start & seems to reload when kde is run...

Last edited by maziar (2023-08-24 09:13:43)

Offline

#4 2023-08-24 12:45:08

Freso
Member
From: Southern Scandinavia
Registered: 2011-09-09
Posts: 48
Website

Re: [SOLVED] Remove module with circular dependency without ...

maziar wrote:

1. If Bluetooth is not dependent bnep what does it mean:

rmmod bluetooth
rmmod: ERROR: Module bluetooth is in use by btrtl btmtk btintel btbcm bnep btusb

It means that the modules btrtl, btmtk, btintel, btbcm, bnep, and btusb are using the bluetooth module, ie. that they depend on the bluetooth module not that bluetooth depends on them.

maziar wrote:

Then the up message doesn't show Bluetooth module depended on bnep ??

I’m not sure what "the up message" is, but I don’t see anything in what you’ve pasted that suggests that bluetooth depends or uses bnep, but a lot of things that state that bnep is relying on bluetooth. The bnep module is, in turn, used by something else (not a kernel module) which is why the kernel won’t allow you to unload it.

As seth said, if you want to unload bnep you first have to stop any processes that are relying on it, which would be any bluetooth processes. If you’re on KDE, maybe Bluedevil (https://wiki.archlinux.org/title/Bluetooth#Graphical) loads up with KDE and pulls in all the bluetooth stuff.

maziar wrote:

2. How do I find & stop dependency in "userspace stuff" for it? It seems no daemon & service run for it.
3. My Bluetooth does not work at the start & seems to reload when kde is run...

Have you tried any applicable steps from https://wiki.archlinux.org/title/Blueto … leshooting ?

You also haven’t stated why you’re trying to rmmod bnep or bluetooth. Do you want to get rid of bluetooth entirely? Are you trying to debug something (what?)? What is it you’re actually trying to do? https://xyproblem.info/


PKGBUILDs: in AUR

Offline

#5 2023-08-24 12:51:29

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,104

Re: [SOLVED] Remove module with circular dependency without ...

AN unexpected BT consumer could be pulseaudio/pipewire, that being said

3. My Bluetooth does not work at the start & seems to reload when kde is run...

What's the metric for "does not work", https://bbs.archlinux.org/viewtopic.php?id=57855 and how does it "reload when KDE is run"?
Also, if BT does "not work at the start" and you deem a later reload as pot. fix, why would you not just blacklist BT and later load it explicitly?

Please post your complete system journal for the boot:

sudo journalctl -b | curl -F 'file=@-' 0x0.st

Offline

#6 2023-08-24 13:20:01

maziar
Member
Registered: 2022-08-28
Posts: 58

Re: [SOLVED] Remove module with circular dependency without ...

1. My problem with removing the module was fixed by killing any process with the name blu* to rmmod Bluetooth!

2. My mistake in understanding the rmmod message

3. Remove & add Bluetooth [rmmod and after a few seconds, add it again]  to fix my current problem.
Many others have problems with the ax200 (wireless & Bluetooth) module.
This USB module is sometimes suspended and does not wake quickly; another problem is that Wi-Fi firmware conflicts with Bluetooth and...

Last edited by maziar (2023-08-24 13:25:13)

Offline

Board footer

Powered by FluxBB