Announcement

Collapse
No announcement yet.

No Lan connection after suspend

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    No Lan connection after suspend

    Hello everybody,
    First of all, sorry about my poor english

    My System :

    Betriebssystem: Kubuntu 24.04
    KDE-Plasma-Version: 5.27.11
    KDE-Frameworks-Version: 5.115.0
    Qt-Version: 5.15.13
    Kernel-Version: 6.8.0-41-generic (64-bit)
    Grafik-Plattform: X11
    Prozessoren: 8 × Intel® Core™ i7-6820HQ CPU @ 2.70GHz
    Speicher: 15,5 GiB Arbeitsspeicher
    Grafikprozessor: Mesa Intel® HD Graphics 530
    Hersteller: HP
    Produktname: HP ZBook 15 G3​​

    This week i install in a new partition Kubuntu 24.04.

    My Problem is, when the Notbook go to sleep (suspend), after typing in my passwd, a popupwindows open with the Info "restrictet lan connection"
    I have insall Kubuntu in German langwich, when i open a terminal and type in with root privilegs,
    <snip>
    root@joerg-hpzbook15g3:/home/joerg# netplan --all status
    Online state: online
    DNS Addresses: 127.0.0.53 (stub)
    DNS Search: localdomain

    ●1: lo ethernet UNKNOWN/UP (unmanaged)
    MAC Address: 00:00:00:00:00:00
    Addresses: 127.0.0.1/8
    ::1/128

    ●2: enp0s31f6 ethernet UP (NetworkManager: NM-3653cd24-0798-3ea9-addf-36d85a138ae5)
    MAC Address: f4:30:b9:d7:1a:3a (Intel Corporation)
    Addresses: 192.168.1.128/24 (dhcp)
    fe80::cbb5:ec2a:64f5:efd/64 (link)
    DNS Addresses: 192.168.1.1
    DNS Search: localdomain
    Routes: default via 192.168.1.1 from 192.168.1.128 metric 100 (dhcp)
    192.168.1.0/24 from 192.168.1.128 metric 100 (link)
    fe80::/64 metric 1024
    default via fe80::222:4dff:feb4:9fa3 metric 100 (ra)

    ●3: wlp3s0 wifi UP (NetworkManager: NM-283f9686-e802-4ad7-8fd8-828ea1ff2b2a)
    MAC Address: 34:f3:9a:8e:bc:73 (Intel Corporation)
    Addresses: 192.168.1.105/24 (dhcp)
    fe80::301a:e3de:4e0e:930/64 (link)
    DNS Addresses: 192.168.1.1
    DNS Search: localdomain
    Routes: default via 192.168.1.1 from 192.168.1.105 metric 600 (dhcp)
    192.168.1.0/24 from 192.168.1.105 metric 600 (link)
    fe80::/64 metric 1024
    default via fe80::222:4dff:feb4:9fa3 metric 600 (ra)

    ●4: virbr0 bridge DOWN/UP (unmanaged)
    MAC Address: 52:54:00:ff:b8:38
    Addresses: 192.168.122.1/24
    Routes: 192.168.122.0/24 from 192.168.122.1 (link)

    ​</snip>

    When the Computer goes to sleep mode, after type in my passwrd:
    <snip>
    root@joerg-hpzbook15g3:/home/joerg# netplan --all status
    Online state: online
    DNS Addresses: 127.0.0.53 (stub)
    DNS Search: localdomain

    ●1: lo ethernet UNKNOWN/UP (unmanaged)
    MAC Address: 00:00:00:00:00:00
    Addresses: 127.0.0.1/8
    ::1/128

    ●2: enp0s31f6 ethernet UP (NetworkManager: NM-3653cd24-0798-3ea9-addf-36d85a138ae5)
    MAC Address: f4:30:b9:d7:1a:3a (Intel Corporation)
    Addresses: fe80::cbb5:ec2a:64f5:efd/64 (link)
    Routes: fe80::/64 metric 1024

    ●3: wlp3s0 wifi UP (NetworkManager: NM-283f9686-e802-4ad7-8fd8-828ea1ff2b2a)
    MAC Address: 34:f3:9a:8e:bc:73 (Intel Corporation)
    Addresses: 192.168.1.105/24 (dhcp)
    fe80::301a:e3de:4e0e:930/64 (link)
    DNS Addresses: 192.168.1.1
    DNS Search: localdomain
    Routes: default via 192.168.1.1 from 192.168.1.105 metric 600 (dhcp)
    192.168.1.0/24 from 192.168.1.105 metric 600 (link)
    fe80::/64 metric 1024
    default via fe80::222:4dff:feb4:9fa3 metric 600 (ra)

    ●4: virbr0 bridge DOWN/UP (unmanaged)
    MAC Address: 52:54:00:ff:b8:38
    Addresses: 192.168.122.1/24
    Routes: 192.168.122.0/24 from 192.168.122.1 (link)
    root@joerg-hpzbook15g3:/home/joerg#

    ​</snip>

    Please help my,
    I have Install on the same hardware
    KDE Neon 6 -> working
    Suse -> working
    Mint -> working
    Ubuntu 24.04 -> working
    only Kubuntu 24.04 -> Prblem after suspend,

    Reagrds, joerg
    Last edited by Snowhog; Sep 05, 2024, 07:38 AM. Reason: Removed hard to read color formatting from snipped output

    #2
    Originally posted by Joerg Harrer View Post
    My Problem is, when the Notbook go to sleep (suspend), after typing in my passwd, a popupwindows open with the Info "restrictet lan connection"
    But is your connection working as expected? there seems to be a bug where some people are seeing this message, though usually on WiFi. Does the message go away? Does the tray icon eventually go to the normal one?

    Comment


      #3
      Hello claydoh,
      I switch on my WIFI connection only for writing in the forum.
      WIFI is working fine
      I prefer LAN for working..
      I found out something to day..
      1.) i switch on my pc, LAN is connectet, WIFI is on ( only to write in the forum ... ).
      2.) type in a root console
      <snip>
      root@joerg-hpzbook15g3:/home/joerg# netplan --all status
      Online state: online
      DNS Addresses: 127.0.0.53 (stub)
      DNS Search: localdomain

      ●1: lo ethernet UNKNOWN/UP (unmanaged)
      MAC Address: 00:00:00:00:00:00
      Addresses: 127.0.0.1/8
      ::1/128

      ●2: enp0s31f6 ethernet UP (NetworkManager: NM-3653cd24-0798-3ea9-addf-36d85a138ae5)
      MAC Address: f4:30:b9:d7:1a:3a (Intel Corporation)
      Addresses: 192.168.1.128/24 (dhcp)
      fe80::cbb5:ec2a:64f5:efd/64 (link)
      DNS Addresses: 192.168.1.1
      DNS Search: localdomain
      Routes: default via 192.168.1.1 from 192.168.1.128 metric 100 (dhcp)
      192.168.1.0/24 from 192.168.1.128 metric 100 (link)
      fe80::/64 metric 1024
      default via fe80::222:4dff:feb4:9fa3 metric 100 (ra)

      ●3: wlp3s0 wifi UP (NetworkManager: NM-283f9686-e802-4ad7-8fd8-828ea1ff2b2a)
      MAC Address: 34:f3:9a:8e:bc:73 (Intel Corporation)
      Addresses: 192.168.1.105/24 (dhcp)
      fe80::301a:e3de:4e0e:930/64 (link)
      DNS Addresses: 192.168.1.1
      DNS Search: localdomain
      Routes: default via 192.168.1.1 from 192.168.1.105 metric 600 (dhcp)
      192.168.1.0/24 from 192.168.1.105 metric 600 (link)
      fe80::/64 metric 1024
      default via fe80::222:4dff:feb4:9fa3 metric 600 (ra)

      ●4: virbr0 bridge DOWN/UP (unmanaged)
      MAC Address: 52:54:00:ff:b8:38
      Addresses: 192.168.122.1/24
      Routes: 192.168.122.0/24 from 192.168.122.1 (link)


      </snip>
      3.) go to sleep mode
      4.) wake up the PC
      5.) i got the poppup window
      "Kabelgebundene Verbindung 1
      Die Verbindung Kabelgebundene Verbindung 1 wurde deaktiviert.
      Kabelgebundene Schnittstelle (enp0s31f6) Die IP-Konfiguration ist nicht verfügbar"
      6.) Type in in the root shell
      <snip>
      root@joerg-hpzbook15g3:/home/joerg# netplan --all status
      Online state: online
      DNS Addresses: 127.0.0.53 (stub)
      DNS Search: localdomain

      ●1: lo ethernet UNKNOWN/UP (unmanaged)
      MAC Address: 00:00:00:00:00:00
      Addresses: 127.0.0.1/8
      ::1/128

      ●2: enp0s31f6 ethernet UP (NetworkManager: NM-3653cd24-0798-3ea9-addf-36d85a138ae5)
      MAC Address: f4:30:b9:d7:1a:3a (Intel Corporation)
      Addresses: fe80::cbb5:ec2a:64f5:efd/64 (link)
      Routes: fe80::/64 metric 1024

      ●3: wlp3s0 wifi UP (NetworkManager: NM-283f9686-e802-4ad7-8fd8-828ea1ff2b2a)
      MAC Address: 34:f3:9a:8e:bc:73 (Intel Corporation)
      Addresses: 192.168.1.105/24 (dhcp)
      fe80::301a:e3de:4e0e:930/64 (link)
      DNS Addresses: 192.168.1.1
      DNS Search: localdomain
      Routes: default via 192.168.1.1 from 192.168.1.105 metric 600 (dhcp)
      192.168.1.0/24 from 192.168.1.105 metric 600 (link)
      fe80::/64 metric 1024
      default via fe80::222:4dff:feb4:9fa3 metric 600 (ra)

      ●4: virbr0 bridge DOWN/UP (unmanaged)
      MAC Address: 52:54:00:ff:b8:38
      Addresses: 192.168.122.1/24
      Routes: 192.168.122.0/24 from 192.168.122.1 (link)


      </snip>

      ​7.) when i compare the enp0s31f6
      i got the the Values from DHCP server ( IP, GW, NS )
      after suspend no address..
      8) No i disconnect my Lan Cable from PC.
      9) I connect the LAN cable in the PC,
      10) its working..


      Is there is a way to bring the enp0s31f6 down and Up via skript after waik up the PC?
      like ifconfig enp0s31f6 down ; ifconfig enp0s31f6 up ;
      Regards Harrer Jörg



      ​ or something?
      Last edited by Snowhog; Sep 06, 2024, 08:19 AM. Reason: Removed hard to read color formatting

      Comment


        #4
        Luckily, the ethernet driver seems to be loading fine when waking, so we don't need to find out which it is using,

        But you can test manually reconnecting/disconnecting it using nmcli:

        nmcli device disconnect enp0s31f6
        & nmcli device connect enp0s31f6

        Try the second one and see if it brings things up. If it works, then we can create a config file that will do this:


        This will create a new file /lib/systemd/system-sleep/reset_network, with the correct format for running things before and after suspend.


        Code:
        sudo tee /lib/systemd/system-sleep/reset_network <<'EOB'
        #!/bin/sh
        case "$1"
        pre)
        
        ;;
        post)
        nmcli device connect enp0s31f6
        ;;
        esac
        
        EOB​
        Then we need to mark it executable
        sudo chmod +x /lib/systemd/system-sleep/reset_network​

        The file can then be edited using Kate/Kwrite without needing to use the terminal.

        You may need to play with things to get it to work.
        Note the format - pre) is for a command string to run before suspend, and post) is for after waking.
        You might need to add the disconnect command to pre), or you might need to string both together in post), like so:

        nmcli device disconnect enp0s31f6 && nmcli device connect enp0s31f6


        You might also try renewing the DHCP IP address instead of stopping and restarting enp0s31f6
        sudo dhclient -r -v enp0s31f6
        and
        sudo dhclient -v enp0s31f6
        ​Which may be less 'harsh'. I'd try these strung together using && as in the previous example, in the post) section, but you may need to try things similar to the nmcli examples.

        Comment


          #5
          i have insert following in /lib/systemed/system-sleep/reset_network
          <snip>
          #!/bin/sh
          case $1 in
          post)
          nmcli device connect enp0s31f6
          ;;
          pre)
          nmcli device disconnect enp0s31f6

          ;;

          esac

          ​</snip>

          the file is executable.
          <snip>
          joerg@joerg-hpzbook15g3:/lib/systemd/system-sleep$ ls -l
          insgesamt 16
          -rwxr-xr-x 1 root root 92 Okt 6 2022 hdparm
          -rwxr-xr-x 1 root root 117 Sep 7 15:13 reset_network
          -rwxr-xr-x 1 root root 227 Jan 9 2024 sysstat.sleep
          -rwxr-xr-x 1 root root 219 Feb 12 2024 unattended-upgrades
          joerg@joerg-hpzbook15g3:/lib/systemd/system-sleep$


          ​</snip>

          when i start the skript in a shell with ,
          <snip>
          joerg@joerg-hpzbook15g3:/lib/systemd/system-sleep$ ./reset_network pre
          Gerät »enp0s31f6« wurde erfolgreich getrennt.
          </snip>
          means in english "device secessfull disconnectet

          and ..
          <snip>
          joerg@joerg-hpzbook15g3:/lib/systemd/system-sleep$ ./reset_network post
          Gerät »enp0s31f6« wurde erfolgreich mit »1e571333-bd2e-4c89-94d1-d46390bc35f5« aktiviert.


          ​</snip>
          means in english " device »enp0s31f6«​ sucessfull activated

          ​so it looks for me the skript is working..

          But .. wenn i waik up the Pc after suspend, same problem.
          When i execute after waikup and insert passwd,
          /lib/systemd/system-sleep$ ./reset_network pre​ && /lib/systemd/system-sleep$ ./reset_network post the system is no longer responsible
          i can switch it only off with pressing 4 sec the Power-button...

          But when i Disconnect the Cable with the connector, got the same messages in the popup, but everthing is working..





          Please tell me the different between nmcli device disconnect enp0s31f6​ ,
          and diconnect the cable with the connector.

          Comment

          Working...
          X