Precisa reconectar o cabo ethernet para fazer o trabalho depois de encaixar o laptop na estação dock

1

No meu laptop Dell Latitude Ubuntu 17.04 eu uso a estação de ancoragem. Esta estação tem conexão dedicada.

  1. Quando eu coloco Meu laptop na estação, ele mostra indefinidamente o ícone de estado "conectando". Assim como tenta se conectar, redefine e tenta se conectar novamente.
  2. Quando eu desconectar o cabo, aguardo um pouco e conecto novamente, a conexão é instantânea.

Provavelmente acontece com mais frequência quando sair do modo de suspensão. Mas tentei alterar as opções de energia do BIOS sem sucesso.

Estava funcionando bem no Ubuntu 16.10, mas não tenho certeza se o problema surgiu depois de 17.04, já que outros fatores também mudaram.

Há um switch 10 / 100Mbit bastante antigo entre o laptop e o roteador, talvez a negociação da conexão demore demais? Mas a impressora de rede se conecta sem problemas.

Atualização: Tentei recarregar o driver ethernet com modprobe -r -v tg3 , modprobe -v rg3 e reiniciar o serviço de rede também.

a execução de dmesg mostra muitas mensagens de link para cima / para baixo:

[92580.119745] tg3 0000:09:00.0 eth0: Link is up at 100 Mbps, full duplex
[92580.119768] tg3 0000:09:00.0 eth0: Flow control is on for TX and on for RX
[92580.774047] tg3 0000:09:00.0 eth0: Link is down
[92582.426348] tg3 0000:09:00.0 eth0: Link is up at 100 Mbps, full duplex
[92582.426351] tg3 0000:09:00.0 eth0: Flow control is on for TX and on for RX
[92583.368441] tg3 0000:09:00.0 eth0: Link is down
[92585.047635] tg3 0000:09:00.0 eth0: Link is up at 100 Mbps, full duplex
[92585.047662] tg3 0000:09:00.0 eth0: Flow control is on for TX and on for RX
[92585.562763] tg3 0000:09:00.0 eth0: Link is down
[92587.207396] tg3 0000:09:00.0 eth0: Link is up at 100 Mbps, full duplex
[92587.207418] tg3 0000:09:00.0 eth0: Flow control is on for TX and on for RX
[92588.085716] tg3 0000:09:00.0 eth0: Link is down
[92589.744788] tg3 0000:09:00.0 eth0: Link is up at 100 Mbps, full duplex
[92589.744816] tg3 0000:09:00.0 eth0: Flow control is on for TX and on for RX
[92590.706366] tg3 0000:09:00.0 eth0: Link is down
[92592.296863] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[92592.365857] tg3 0000:09:00.0 eth0: Link is up at 100 Mbps, full duplex
[92592.365860] tg3 0000:09:00.0 eth0: Flow control is on for TX and on for RX
[92592.365876] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[92593.326975] tg3 0000:09:00.0 eth0: Link is down
[92594.987186] tg3 0000:09:00.0 eth0: Link is up at 100 Mbps, full duplex
[92594.987212] tg3 0000:09:00.0 eth0: Flow control is on for TX and on for RX
[92595.947772] tg3 0000:09:00.0 eth0: Link is down
[92597.608392] tg3 0000:09:00.0 eth0: Link is up at 100 Mbps, full duplex
[92597.608416] tg3 0000:09:00.0 eth0: Flow control is on for TX and on for RX
[92598.568514] tg3 0000:09:00.0 eth0: Link is down
[92600.229535] tg3 0000:09:00.0 eth0: Link is up at 100 Mbps, full duplex
[92600.229548] tg3 0000:09:00.0 eth0: Flow control is on for TX and on for RX

Wireshark registra quando a conexão está parada:

No.     Time           Source                Destination           Protocol Length Info
      7 2.660584149    0.0.0.0               255.255.255.255       DHCP     342    DHCP Request  - Transaction ID 0xde0c185d

Frame 7: 342 bytes on wire (2736 bits), 342 bytes captured (2736 bits) on interface 0
Ethernet II, Src: Dell_39:4b:6e (d0:67:e5:39:4b:6e), Dst: Broadcast (ff:ff:ff:ff:ff:ff)
Internet Protocol Version 4, Src: 0.0.0.0, Dst: 255.255.255.255
User Datagram Protocol, Src Port: 68, Dst Port: 67
Bootstrap Protocol (Request)

No.     Time           Source                Destination           Protocol Length Info
     12 5.401359750    0.0.0.0               255.255.255.255       DHCP     342    DHCP Request  - Transaction ID 0xde0c185d

Frame 12: 342 bytes on wire (2736 bits), 342 bytes captured (2736 bits) on interface 0
Ethernet II, Src: Dell_39:4b:6e (d0:67:e5:39:4b:6e), Dst: Broadcast (ff:ff:ff:ff:ff:ff)
Internet Protocol Version 4, Src: 0.0.0.0, Dst: 255.255.255.255
User Datagram Protocol, Src Port: 68, Dst Port: 67
Bootstrap Protocol (Request)

No.     Time           Source                Destination           Protocol Length Info
     35 13.832656290   0.0.0.0               255.255.255.255       DHCP     342    DHCP Discover - Transaction ID 0xb9200f10

Frame 35: 342 bytes on wire (2736 bits), 342 bytes captured (2736 bits) on interface 0
Ethernet II, Src: Dell_39:4b:6e (d0:67:e5:39:4b:6e), Dst: Broadcast (ff:ff:ff:ff:ff:ff)
Internet Protocol Version 4, Src: 0.0.0.0, Dst: 255.255.255.255
User Datagram Protocol, Src Port: 68, Dst Port: 67
Bootstrap Protocol (Discover)

Wireshark registra logo após reconectar o cabo:

No.     Time           Source                Destination           Protocol Length Info
     13 12.440180322   0.0.0.0               255.255.255.255       DHCP     342    DHCP Request  - Transaction ID 0xc06e5459

Frame 13: 342 bytes on wire (2736 bits), 342 bytes captured (2736 bits) on interface 0
Ethernet II, Src: Dell_39:4b:6e (d0:67:e5:39:4b:6e), Dst: Broadcast (ff:ff:ff:ff:ff:ff)
Internet Protocol Version 4, Src: 0.0.0.0, Dst: 255.255.255.255
User Datagram Protocol, Src Port: 68, Dst Port: 67
Bootstrap Protocol (Request)

No.     Time           Source                Destination           Protocol Length Info
     14 12.444870618   192.168.1.254         192.168.1.5           DHCP     358    DHCP ACK      - Transaction ID 0xc06e5459

Frame 14: 358 bytes on wire (2864 bits), 358 bytes captured (2864 bits) on interface 0
Ethernet II, Src: VtechTel_55:61:31 (00:12:2a:55:61:31), Dst: Dell_39:4b:6e (d0:67:e5:39:4b:6e)
Internet Protocol Version 4, Src: 192.168.1.254, Dst: 192.168.1.5
User Datagram Protocol, Src Port: 67, Dst Port: 68
Bootstrap Protocol (ACK)

No.     Time           Source                Destination           Protocol Length Info
     15 12.463981621   192.168.1.5           224.0.0.22            IGMPv3   62     Membership Report / Join group 224.0.0.252 for any sources / Join group 224.0.0.251 for any sources

Frame 15: 62 bytes on wire (496 bits), 62 bytes captured (496 bits) on interface 0
Ethernet II, Src: Dell_39:4b:6e (d0:67:e5:39:4b:6e), Dst: IPv4mcast_16 (01:00:5e:00:00:16)
Internet Protocol Version 4, Src: 192.168.1.5, Dst: 224.0.0.22
Internet Group Management Protocol
    
por PeterM 29.08.2017 / 10:44

1 resposta

2

Há alguns meses, uma atualização automática interrompeu minha suspensão / retomada de Ethernet depois que ela funcionou perfeitamente por cerca de 6 meses. Aconteceu com alguns outros usuários aqui na mesma época.

A solução para mim foi criar um script que seja executado ao retomar da suspensão:

#!/bin/bash

# NAME: r8169-reset
# PATH: /lib/systemd/system-sleep
# DESC: Reset Ethernet card after suspend, not working automatically
# DATE: Feb ?? 2017. Modified: Apr 30, 2017.

MYNAME=$0

restart_ethernet() {
   /usr/bin/logger $MYNAME 'restart_ethernet(r8169) BEGIN'
   /sbin/modprobe -v -r r8169
   # /sbin/modprobe -v -r mii
   /sbin/modprobe -v r8169
   /usr/bin/logger 'systemctl restart NetworkManager.service (SUPPRESED)'
   /usr/bin/logger $MYNAME 'restart_ethernet(r8169) END'
}

/usr/bin/logger $MYNAME 'case=[' ${1}' ]'
case "${1}/${2}" in
   hibernate|suspend|pre*)
      ;;
   resume|thaw|post*)
      restart_ethernet;;
esac

Salve o script em /lib/systemd/system-sleep/r8169-reset . Claro, mude este nome de script para o seu nome de driver real. Altere também o nome do módulo do kernel do driver no script.

Anote a linha:

/usr/bin/logger 'systemctl restart NetworkManager.service (SUPPRESED)'

Às vezes, simplesmente reiniciar o gerenciador de rede é tudo o que é necessário e você pode tentar também.

Você precisará de poderes sudo para salvar o arquivo. Para uma boa medida, eu sempre marquei esses scripts como executable usando:

sudo chmod a+x /lib/systemd/system-sleep/r8169-reset

Você pode verificar /var/log/syslog para ver a saída do script.

Espero que isso funcione para você.

    
por WinEunuuchs2Unix 05.10.2017 / 02:00