Network Manager - Settings disappearing after upgrade

Okay so if I install certain applications, my system wants to upgrade itself...i.e. with kernels. This always ends up in a bad situation for me and I end up having to restore. The biggest issue that I'm having to restore for is the fact that upgrading deletes the entire network configuration.

When I next boot I find that I have no wired connection at all and that's my only connected internet connection. Is there any way I can check/backup and then restore the settings after the upgrade? Happening every time -_-. (Fifth time restoring).

System:
  Host: daffodil Kernel: 4.19.12-1-MANJARO x86_64 bits: 64 compiler: gcc 
  v: 8.2.1 Desktop: Cinnamon 4.0.8 Distro: Manjaro Linux 
Machine:
  Type: Desktop Mobo: Gigabyte model: Z97-HD3 v: x.x serial: <root required> 
  UEFI: American Megatrends v: F6 CT date: 08/08/2014 
CPU:
  Topology: Quad Core model: Intel Core i7-4790K bits: 64 type: MT MCP 
  arch: Haswell rev: 3 L2 cache: 8192 KiB 
  flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 64026 
  Speed: 1500 MHz min/max: 800/4400 MHz Core speeds (MHz): 1: 1500 2: 1501 
  3: 1500 4: 1501 5: 1500 6: 1500 7: 1502 8: 1502 
Graphics:
  Device-1: AMD Ellesmere [Radeon RX 470/480/570/570X/580/580X] 
  vendor: Sapphire Limited Nitro+ driver: amdgpu v: kernel bus ID: 01:00.0 
  Display: x11 server: X.Org 1.20.3 driver: amdgpu,ati unloaded: modesetting 
  tty: N/A 
  OpenGL: renderer: AMD POLARIS10 (DRM 3.27.0 4.19.12-1-MANJARO LLVM 7.0.0) 
  v: 4.5 Mesa 18.3.1 direct render: Yes 
Audio:
  Device-1: Intel 9 Series Family HD Audio vendor: Gigabyte 
  driver: snd_hda_intel v: kernel bus ID: 00:1b.0 
  Device-2: AMD Ellesmere [Radeon RX 580] vendor: Sapphire Limited 
  driver: snd_hda_intel v: kernel bus ID: 01:00.1 
  Sound Server: ALSA v: k4.19.12-1-MANJARO 
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet 
  vendor: Gigabyte driver: r8168 v: 8.045.08-NAPI port: d000 bus ID: 03:00.0 
  IF: enp3s0 state: up speed: 1000 Mbps duplex: full mac: fc:aa:14:01:bc:4c 
  IF-ID-1: tun0 state: unknown speed: 10 Mbps duplex: full mac: N/A 
Drives:
  Local Storage: total: 931.51 GiB used: 589.65 GiB (63.3%) 
  ID-1: /dev/sda vendor: Western Digital model: WD1003FZEX-00MK2A0 
  size: 931.51 GiB 
Partition:
  ID-1: / size: 28.71 GiB used: 7.63 GiB (26.6%) fs: ext4 dev: /dev/sda3 
  ID-2: /home size: 47.81 GiB used: 5.63 GiB (11.8%) fs: ext4 dev: /dev/sda4 
  ID-3: /var size: 9.55 GiB used: 4.11 GiB (43.0%) fs: ext4 dev: /dev/sda5 
  ID-4: swap-1 size: 7.81 GiB used: 0 KiB (0.0%) fs: swap dev: /dev/sda2 
Sensors:
  System Temperatures: cpu: 33.0 C mobo: N/A gpu: amdgpu temp: 29 C 
  Fan Speeds (RPM): N/A gpu: amdgpu fan: 772 
Info:
  Processes: 247 Uptime: 6m Memory: 15.59 GiB used: 1.61 GiB (10.3%) 
  Init: systemd Compilers: gcc: 8.2.1 clang: 7.0.1 Shell: bash v: 4.4.23 
  inxi: 3.0.28 

Apparently that's correct; you have an interface named

instead?

Which configuration is being deleted? You should be able to re-add your network connection settings via the Network Manager GUI.

the enp3s0 goes missing and I'm not sure how to restore it. The option for adding a wired connection completely disappears and I don't know all of the different settings. (Linux usually does this for me).

Hence the need to grab the details, back them up and slot the relevant file back into place.

Are you sure this is what you need to do?

Is the network device being detected, i.e. is the driver/kernel module working correctly?

Have you checked with other kernels?

Currently kernel 4.19.12 appears to be working correctly. Every time it upgrades (i.e. install steam or something)... the next time I reboot the wired connection gets deleted.

I'm not sure if it's the kernel or if something comes along at the same time.

OK, so there's your starting point. Work out which packages are being upgraded, and install another kernel if you don't have one (e.g. 4.14) so you can compare.

So back to the original question I asked:

"Is there any way I can check/backup and then restore the network-manager settings after the upgrade? "

Which settings?

However - I suspect you're missing the entire point of my replies. If your network card is going missing after a kernel upgrade that might indicate a driver regression or kernel module issue. The easiest way to find out is to check another kernel - or upgrade all the other packages except the kernel and any extramodules you have installed.

Because a) I don't know if the network card is going missing or b) whether settings are being deleted thanks to a botched reinstall of network manager (which again, causes all the settings to be deleted). Hence wanting a back up so I check this.

I have zero reason to believe that the kernel is at fault and upgrading the kernel to a much later version risks breaking compatibility with my GPU (which again, I'm not willing to risk yet).

So no, it's not the easiest way for me.

OK, well, good luck then.

I would highly suggest switching to the r8169 kernel module.

Okay, so can't do that either at the moment. So the recommended solution is to ignore kernel 419 updates?

I appreciate this is a security concern but it appears to be my only viable alternative at this stage. (Everyone seems to think it's a kernel issue).

In which case I need to force prevent the system from updating the kernels.

Why can you not switch drivers. It is a trivial procedure.

In the past r8168 was always the go to driver for this adapter. Of late the r8169 kernel module seems to be the better driver to use, (especially on the more recent kernels). If you are experiencing issues with the r8168 driver, it would be best to test out the r8169 kernel module instead. You will have to temporarily blacklist the r8168 driver (if you have the r8168 driver installed). In /etc/modprobe.d there is likely a file named r8169_blacklist .conf. You must ensure that r8169 is not blacklisted in any conf file in /etc/modprobe.d. Simply change any entry from r8169, to r8168 in any conf file in /etc/modprobe.d. Save the changes, and then reboot.

Well, seems your setup is a little fragile. Normally network configurations happen automatically and is pretty much solid. As @tbg already told you, it is easy to switch the drivers by changing the blacklisting first. Else you may try to switch to r8169 permanently.

You might have something similar like this:

$ mhwd -li
> Installed PCI configs:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
         network-r8168            2016.04.20                true            PCI
          video-nvidia            2018.08.09               false            PCI

Therefore we suggest to remove the r8168 drivers by

sudo mhwd -r pci network-r8168

Double check if the following file exists and remove it:

sudo rm -v /etc/modprobe.d/r8169_blacklist.conf

Reboot your system and check if your network is still working. Also try to install another kernel via

sudo mhwd-kernel -i linux414

1 Like

Well you are bound to have big problems if both drivsrs are loading. Pick one and blacklist the other. Simply create the file:

r8168_blacklist.conf

With the contents:

blacklist r8168

Or, set it to be r8169 whichever you want.

Please post:

grep -r "blacklist\|install\|options"  /etc/modprobe.d/

Once before any changes, then post again after your changes.

I made no changes to selecting which network driver I wanted, that’s how it was out of the box. (My tinkering has been with the GPU not network).

In the mean time, the kernel updated without issue, but unlike previous times when updating there was no mention of the network-manager and hence the problem has not manifested. Bringing me back to the issue I had before.

How do I back up the Network-manager settings…? I.e. all the configuration stuff. So I don't have retype everything in manually.

As a side note… I know my details above indicated 4.19.12 upgraded to 4.19.13…but my System Info details point out that I’m on Kernel 4.20.0-rc3-amd-staging-drm-next-git-b8cd95e15410+ so that’s fun.

Tbg: The grep comes back empty.

Then you will have to create the file I suggested if you wish to test out the r8169 driver (leaving r8168 still installed).

If you wish to permanently uninstall the r8168 driver then follow Phil's instructions above. You will not have to create any blacklist file if you follow his instructions.

Well I followed his instructions and now it doesn't list (in mhwd) r8169 or r8168 and yet I still have an internet connection after restart. >_>

That is proper. The r8169 driver is included in the kernel. It does not need to be installed.

You should also set your speed to auto-negotiation in Network Managers connection properties.

Forum kindly sponsored by