April 4, 2018

Fedora -- I hate Network Manager

If it "just worked" I would not complain or mind. However, it has been broken since time immemorial. I have some old notes about nuking it from back around 2009. Note that simply deleting NetworkManager and stopping its service does not seem to work anymore. Too many things are dependent on it these days and you have to find a way to beat it into submission rather than just destroying it.

So, here is the story. I just rebooted my machine and my network is useless. The issue (as always) is that network manager has rewritten the file /etc/resolv.conf. I could just copy the right thing over the top of this file, but I am tired of doing that after every reboot. And what happens if I manage this machine remotely? Will it just drop off the network? Maybe not, but I would much prefer a static configuration managed by hand.

What ultimately worked was to run this:

This brought up a little GUI, I selected my wired interface (eno1), clicked on a little gear thing at the bottom and you get an edit dialog. Select the IPv4 Settings tab, and there is a place to enter Search domains. I enter the two I want, separated by a space and voila! After a reboot they appear in my resolv.conf file.

I hate this thought. I know this is editing some file someplace, but I have yet to discover what or where. It does not seem to be anything in the /etc directory.

My trials before this was discovered

Following my old tried and true procedures, I use dnf to remove the NetworkManager package.

cp resolv.conf.BAK resolv.conf
dnf erase NetworkManager
The first command restores my working resolv.conf file, that I keep a copy of due to Network Manager's broken behavior and my need to do this on a regular basis. Now I have a functional network.

Removing NetworkManager removes 166 packages and frees up 307M. What a monster! In the midst of the removal I get a notice that cinnamon has crashed. Having Cinnamon bricked is a small price to pay for having a network that is reliable and working.

However, after a reboot, things are worse not better. Not only is resolv.conf overwritten, but the network is not up. I have to do "service network start" now to get it going. I seem to now be running "mate", which perhaps is some kind of fallback if cinnamon is borked. We really like xfce, so let's try:

dnf groups install "Xfce Desktop"
dnf install @xfce-desktop-environment
This installs all the packages, but now comes the hard part, making Xfce the default session. This is always nearly impossible, but let's try and see if things are any better. For whatever reason, my system is running lightdm not gdm, so I don't get offered a choice before I log in. Advice for how to do this seems to change on a regular basis. "The way" used to be to use switchdesk, then this was deprecated, but now it seems to be back!!
su
dnf install switchdesk-gui
switchdesk
All very nice, it offers me the choice of xfce, but after I log out and back in again, I am still running mate. I try a reboot. Somewhere in the midst of all of this, NetworkManager has been reinstalled, so my network comes up, albeit with a mangled resolv.conf -- which is what we set out to fix when we started all of this.


Have any comments? Questions? Drop me a line!

Adventures in Computing / tom@mmto.org