Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bluetooth: Disabling ertm via sysfsutils

336 views
Skip to first unread message

Christian Britz

unread,
Jul 28, 2021, 8:40:05 AM7/28/21
to
To be able to connect a xbox wireless controller via bluetooth, I have
to disable a bt feature called ertm via sysfs.
I installed sysfsutils and added the following line to /etc/sysfs.conf:
module/bluetooth/parameters/disable_ertm = 1

It seems that enabling of this parameter at boot time fails:
$ sudo systemctl status sysfsconf.service
[...]
Jul 28 07:53:03 amiga5000 systemd[1]: Starting LSB: Set sysfs variables
from /etc/sysfs.conf...
Jul 28 07:53:03 amiga5000 sysfsutils[578]: Setting sysfs variables......
Jul 28 07:53:03 amiga5000 sysfsutils[612]: unknown attribute
module/bluetooth/parameters/disable_ertm ...
Jul 28 07:53:03 amiga5000 sysfsutils[619]:  failed!
[...]

If I manually restart sysfsconf.service it works! Any Idea?

Best Regards,
Christian

Reco

unread,
Jul 28, 2021, 8:50:04 AM7/28/21
to
Hi.

On Wed, Jul 28, 2021 at 02:30:20PM +0200, Christian Britz wrote:
> If I manually restart sysfsconf.service it works!

systemd manages to start sysfsconf before starting systemd-modules-load,
so that sysfs entry does not exist at the time of boot.

This is expected from systemd SYSV unit generator, it likes to write
just about every dependency to unit, but somehow manages to miss that
one you actually need.

> Any Idea?

Two ideas.

1) First, if all you need is modify a kernel module option - you do not
need to tinker with /sys. Just create a file like this:

cat /etc/modprobe.d/bluetooth-ertm.conf << EOF
options bluetooth disable_ertm=1
EOF
update-initramfs -k all -u


2) Second, if you absolutely need that /sys-modifying kludge - you'll
need to invoke a usual systemd trick to modify sysfsutils dependencies:

mkdir /etc/systemd/system/sysfsutils.service.d/
cat /etc/systemd/system/sysfsutils.service.d/override.conf << EOF
[Unit]
After=systemd-modules-load.service
EOF
systemctl daemon-reload

Reco

Christian Britz

unread,
Jul 28, 2021, 9:30:05 AM7/28/21
to
Reco wrote:
> 1) First, if all you need is modify a kernel module option - you do not
> need to tinker with /sys. Just create a file like this:
>
> cat /etc/modprobe.d/bluetooth-ertm.conf << EOF
> options bluetooth disable_ertm=1
> EOF
> update-initramfs -k all -u
>
Great, straight forward and works, thanks! :-)
0 new messages