linrunner / TLP

TLP - Optimize Linux Laptop Battery Life
https://linrunner.de/tlp
GNU General Public License v2.0
2.68k stars 128 forks source link

tlp causes eth0 link not to become ready (no-carrier) #684

Closed dkwo closed 1 year ago

dkwo commented 1 year ago

If I install tlp (not even enable the runit service) on void linux (x86_64-musl), the link eth0 does not become ready. This is an ethernet cable connected to the monitor, which is connected to the dock via usb cable. If I remove the tlp package, then I see dmesg: IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready as well as ethtool eth0 ... Link detected: yes, otherwise eth0 has no carrier.

https://github.com/void-linux/void-packages/issues/43148

dkwo commented 1 year ago

in particular, ip link set eth0 up does nothing.

linrunner commented 1 year ago

Your issue cannot be processed without complete outputs as described in the issue template.

Provide them via https://gist.github.com/ please.

dkwo commented 1 year ago

I cannot reproduce reliably, for now I can attach a tlp-stat without the issue. I suspect it is related to tlp's udev rules. I'm positive that tlp was causing the issue a few days ago though.

I created a private gist and mentioned you: can you see it?

linrunner commented 1 year ago

What is actually so damn hard about answering all the questions from the template?

  1. Does the problem occur on battery or AC or both?
  2. Full output of tlp-stat via https://gist.github.com/ for all matching cases of 1. (not as file attachment, no screenshots)

I'm positive that tlp was causing the issue a few days ago though.

I suggest to uninstall - or disable - TLP, reboot and run the ThinkPad like this for a few days to see if it reoccurs.

dkwo commented 1 year ago
  1. it only happens when attached to the thinkpad ultra dock, power through the dock
  2. https://gist.github.com/dkwo/dde36f371689e65863643d26b314f8f8
dkwo commented 1 year ago

I suggest to uninstall - or disable - TLP, reboot and run the ThinkPad like this for a few days to see if it reoccurs.

ok, will remove tlp and report in a week.

dkwo commented 1 year ago

without tlp for about a week: the issue did not arise

dkwo commented 1 year ago

after installing tlp (but without enabling its runit service), the eth0 is down:

$ ip l 
4: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 1000

the corresponding tlp-stat: https://gist.github.com/dkwo/f645855087b0a4956e6589e7903d9f67

linrunner commented 1 year ago

Try to exclude the ethernet adapter from runtime pm

RUNTIME_PM_DENYLIST="00:1f.6"

and reboot.

ps. deactivating the service is useless -> FAQ: How do I stop or disable TLP completely?

dkwo commented 1 year ago

thanks for the tip about service. even with RUNTIME_PM_DENYLIST="00:1f.6", i still get no-carrier. i think the issue is that ethernet goes into the monitor's adapter, then the monitor is connected to dock via usb cable, laptop is docekd.

linrunner commented 1 year ago

Then exclude the USB ethernet adapter:

USB_DENYLIST="0bda:8153"

i think the issue is that ethernet goes into the monitor's adapter, then the monitor is connected to dock via usb cable, laptop is docekd.

Why do you do it this way? It seems that you are using the ThinkPad Ultra Dock 40A2 which has a LAN port that is directly connected to the T460's internal ethernet adapter.

linrunner commented 1 year ago

ps. Furthermore, you usually connect a monitor to this dock via HDMI or DP, since it does not have a USB-C port. A monitor on a USB-A port would be possible in principle, but then you would see a DisplayLink USB adapter in the list. So far, what you write is not plausible for me ...

dkwo commented 1 year ago

thanks, excluding the adapter works. the monitor is connected to that dock both via usb-a and dp cables. i do that because sometimes i instead connect the monitor to another laptop via usb-c, and this way i do not need to unplug ethernet cables.

linrunner commented 1 year ago

I see. Thanks for explaining.