purism@pureos:~$ sudo cp /usr/lib/udev/rules.d/85-librem5-pm.rules /etc/udev/rules.d/
[sudo] Passwort für purism:
purism@pureos:~$ sudo vi /etc/udev/rules.d/85-librem5-pm.rules
Copy the packaged version to your /etc/udev/rules/.d directory and edit it.
Use the cursor keys to move the cursor onto the leading S
of the following SUBSYSTEM
-lines, press i
for insert
mode and prepand the lines with #
to comment them out. Press two times ESC
to leave insert
mode, type :wq
and enter
. This should save your changes and leave the editor vi.
This is the section before editing it:
# Broadmobi BM818
SUBSYSTEM=="usb", ATTRS{idVendor}=="2020", ATTR{idProduct}=="2060", TEST=="power/control", ATTR{power/control}="auto"
SUBSYSTEM=="usb", ATTRS{idVendor}=="2020", ATTR{idProduct}=="2060", TEST=="power/autosuspend_delay_ms", ATTR{power/autosuspend_delay_ms}="2000"
And this is how it should look afterwards:
# Broadmobi BM818
# SUBSYSTEM=="usb", ATTRS{idVendor}=="2020", ATTR{idProduct}=="2060", TEST=="power/control", ATTR{power/control}="auto"
# SUBSYSTEM=="usb", ATTRS{idVendor}=="2020", ATTR{idProduct}=="2060", TEST=="power/autosuspend_delay_ms", ATTR{power/autosuspend_delay_ms}="2000"
You can check the content by typing cat /etc/udev/rules.d/85-librem5-pm.rules
.
Reload the udev-rules:
purism@pureos:~$ sudo udevadm control -R
Switch of the modem, wait, switch it on again.
purism@pureos:~$ echo 0 | sudo tee /sys/class/leds/wwan_en/brightness; sleep 5; echo 1 | sudo tee /sys/class/leds/wwan_en/brightness
0
1
To revert to power management for the modem you’d need to delete the copied file sudo rm /etc/udev/rules.d/85-librem5-pm.rules
and repeat the steps to update udev via udevadm
and restart the modem by cutting its power for a few seconds.