Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] gigabit hotplug is not working
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
sdauth
l33t
l33t


Joined: 19 Sep 2018
Posts: 679
Location: Ásgarðr

PostPosted: Tue Aug 09, 2022 9:40 am    Post subject: [SOLVED] gigabit hotplug is not working Reply with quote

Hello,
On my laptop, I'm on wlan 90% of the time but sometimes I use wired for some tasks.
I recently noticed that sometimes, when plugging the gigabit cable, the link is staying down. After a reboot (with the cable still plugged in), it works again, so it seems to be related to hotplug only.
To make sure of that, I compiled my net driver (e1000e) as a module and removed it with the cable plugged in then inserted it again :

Log :
Code:
Aug  9 11:11:36 laptop kernel: e1000e 0000:00:19.0 eth0: NIC Link is Down
Aug  9 11:11:36 laptop sudo[5676]: pam_unix(sudo:session): session closed for user root
Aug  9 11:11:38 laptop /etc/init.d/net.eth0[5685]: net.eth0: not allowed to be hotplugged
Aug  9 11:11:38 laptop dhcpcd[2061]: eth0: removing interface
Aug  9 11:11:51 laptop sudo[5699]:     sdauth : TTY=pts/3 ; PWD=/home/sdauth/; USER=root ; COMMAND=/sbin/modprobe -v e1000e
Aug  9 11:11:51 laptop sudo[5699]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1000)
Aug  9 11:11:51 laptop kernel: e1000e: Intel(R) PRO/1000 Network Driver
Aug  9 11:11:51 laptop kernel: e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
Aug  9 11:11:51 laptop kernel: e1000e 0000:00:19.0: Interrupt Throttling Rate (ints/sec) set to dynamic conservative mode
Aug  9 11:11:51 laptop kernel: e1000e 0000:00:19.0 eth0: (PCI Express:2.5GT/s:Width x1) 00:1d:17:15:g1:85
Aug  9 11:11:51 laptop kernel: e1000e 0000:00:19.0 eth0: Intel(R) PRO/1000 Network Connection
Aug  9 11:11:51 laptop kernel: e1000e 0000:00:19.0 eth0: MAC: 7, PHY: 8, PBA No: 1008FF-0FF
Aug  9 11:11:51 laptop sudo[5699]: pam_unix(sudo:session): session closed for user root
Aug  9 11:11:51 laptop /etc/init.d/net.eth0[5708]: net.eth0: not allowed to be hotplugged
Aug  9 11:11:52 laptop dhcpcd[2061]: eth0: waiting for carrier
Aug  9 11:11:54 laptop dhcpcd[2061]: eth0: carrier acquired


And then dhcpcd correctly gets the address and network works fine. (It implies to remove and insert the module though so not very handy)

I don't understand why it calls /etc/init.d/net.eth0 (net.eth0: not allowed to be hotplugged), as I only have dhcpcd and wpa_supplicant enabled.

My /etc/conf.d/net :

Code:
dns_domain_lo="lan"
# Only needed if you have more than one DHCP module installed
modules="dhcpcd"


and nothing else. I still have the net.eth0 -> net.lo symlink in /etc/init.d, maybe this is causing the issue even though it is not enabled with openrc ?

My /etc/dhcpcd.conf :

default with this minor modification :

Code:
#Lowest metric has priority
interface wlan0
metric 400

interface eth0
metric 100


Do I need a package or config to make hotplug work ?

Thanks!


Last edited by sdauth on Tue Aug 09, 2022 9:54 am; edited 1 time in total
Back to top
View user's profile Send private message
sdauth
l33t
l33t


Joined: 19 Sep 2018
Posts: 679
Location: Ásgarðr

PostPosted: Tue Aug 09, 2022 9:53 am    Post subject: Reply with quote

Well, I think it is the fastest resolution ever :

/etc/conf.d/net :

Code:
#dns_domain_lo="lan"
# Only needed if you have more than one DHCP module installed
#modules="dhcpcd"


So now /etc/conf.d/net is ignored totally and dhcpcd handles hotplug nicely, without needing other software..
According to the wiki, if one uses net scripts instead of dhcpcd, then ifplugd is needed for hotplug but that's not my case.

Hopefully it will help others.
Back to top
View user's profile Send private message
sdauth
l33t
l33t


Joined: 19 Sep 2018
Posts: 679
Location: Ásgarðr

PostPosted: Wed Aug 17, 2022 11:50 am    Post subject: Reply with quote

Well, it started again. When I plug my ethernet cable, eth0 stays down, unless I rmmod and insmod e1000e driver (dhcpcd then configure the interface and dhcp without issue)
By the way, if I add "nodev" at the top /etc/dhcpcd.conf, then it seems to works correctly again.
On the same laptop, I also have a stable Debian install (which is using an older dhcpcd version) and with it, I don't need the "nodev" option, it works.
Maybe an eudev/udev issue ? (I do use eudev & net.ifnames=0 biosdevname=0 on kernel command line to avoid the stupid names for interfaces)
Let's hope "nodev" fixes it once and for all.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum