systemd-resolve high cpu usage after update to 17.04

I had a similar conflict between systemd-resolve and dnsmasq on port 53.

https://unix.stackexchange.com/questions/304050/how-to-avoid-conflicts-between-dnsmasq-and-systemd-resolved

and

https://github.com/systemd/systemd/pull/4061

led me to add DNSStubListener=no in /etc/systemd/resolved.conf and then sudo service systemd-resolved restart.


Caused Problems with other Apps (teamViewer in my case)

Suggested by another Steps of solution

Add the line DNSMASQ_EXCEPT=lo to /etc/default/dnsmasq

sudo nano /etc/default/dnsmasq

Restart dnsmasq via

sudo service systemd-resolved restart

Say Thanks If I helped, It went back to normal and does NOT screw around with other apps, as the previous method DID.

Cheers, Mark


systemd-resolved gets crazy when somebody modifies the file /etc/resolv.conf, which is meant to be pointing to its own listening address 127.0.0.53.

That somebody could be any script triggered by networking events (VPN coming up, or down, DHCP, etc.)

If you set the nameserver back to 127.0.0.53, then systemd-resolved will "calm down" few seconds later.

Assuming that everybody's respecting the rules, and only using resolvconf for modifying the resolver's configuration, you can also do this:

The file /etc/resolvconf/interface-order specifies the order in which nameservers will be used, depending on the network interface they were received from.

If you add an entry for systemd-resolved at the top of the file, it will always be considered first and the file will not be modified.