Skip to content

TLP Radio-Device-Watchdog simulated from systemd-networkd (without NetworkManager)

License

Notifications You must be signed in to change notification settings

OJFord/tlp-rdw-systemd

Repository files navigation

Simulate tlp-rdw of TLP's behaviour on systemd-networkd systems without NetworkManager.

Installation

Arch

Install from the AUR (tlp-rdw-systemd), or clone/download & unzip the repo and makepkg -si.

Other linux

#install -Dm644 tlp-rdw.path /etc/systemd/system/tlp-rdw.path
#install -Dm644 tlp-rdw.service /etc/systemd/system/tlp-rdw.service
#install -Dm755 tlp-rdw-simulator /usr/bin/tlp-rdw-simulator
#systemctl enable --now tlp-rdw.path

Configuration

The standard upstream tlp-rdw conf is read for devices to enable/disable on link dis/connect, e.g. DEVICES_TO_ENABLE_ON_WWAN_DISCONNECT.

Dock triggers are not presently implemented.

Enable/disable radios on link state change

The link type name needs a corresponding iproute2 link group in order to take effect, e.g.:

# /etc/iproute2/group
123 lan
456 wifi
789 wwan

Which should then be specified numerically (systemd does not currently support named values) in the interface's .network unit:

# /etc/systemd/network/10-example.network
[Match]
Type=ether

[Link]
Group=123

after which you'll need to reload systemd-networkd:

#systemctl reload systemd-networkd

If you choose to use ethernet or wlan as names, they'll act as aliases for lan and wifi respectively for tlp.conf lookup purposes, since that's what upstream documents. This is just for convenience; you can use any names you wish including being more granular, just as long as it matches the parameter name. i.e.:

# /etc/iproute2/group
1 wireless1
2 wireless2
# /etc/tlp.conf
DEVICES_TO_DISABLE_ON_WIRELESS1_CONNECT="gps bluetooth"
DEVICES_TO_ENABLE_ON_WIRELESS2_DISCONNECT="wimax fm"

The values of the parameters must match rfkill device type names.

About

TLP Radio-Device-Watchdog simulated from systemd-networkd (without NetworkManager)

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Languages