Calculate Forum

Laptop-mode-tools breaks networkmanager?


When installing CLS on my laptop, I’ve noticed that as soon as I install laptop-mode-tools, it breaks the configuration of networkmanager. The network interface is an USB ethernet dongle. Before I install laptop-mode-tools, NetworkManager start the interface without issue (fixed IP), but when I install laptop-mode-tools, the interface doesn’t come up properly. A ping from another system shows me that sometimes the interface comes up briefly (I receive a resulting ping), but then it goes down again.

Forgot to add, after logging in, I can nmcli c up eth0 and it’s working (with using laptop-mode-tools).

Any ideas?


Angelo Machils


thereare some options, first of them:
laptop-mode-tools enables usb autosuspend, so if any device stays inactive (like down interface without actions) for a some time, kernel switches power management of this device and it becomes unavailable.

I can see two ways to resolve this:

  1. disable usb autosuspend in laptop-mode-tools at all
    1.1) disable usb autosuspend for specific device (vid:pid)
  2. add pre-up action to NetworkManager’s config somewere in init level which will re-activate this device.

Not sure what’s better in NM, but I suppose 1.1 way is preferer than others.

manual runned nmcli c up eth0 can activate device before trying to access to it.

Hmmm, weird, I didn’t get a notification of a reply…

Anyway, yes, I understand the USB timeout, but this happens at boot. I would expect the USB timeout to happen if the device stays inactive ‘for some time’, as you said as well. But here is happens in the short period of the bootup. It seems that laptop-mode-tools at start, just disables all USB and then re-enables it. NM perhaps can’t handle this for the USB nic?!



© 2007-2020 Calculate Ltd.
Mastodon Mastodon