The internet breaks on Debian KDE when wired Ethernet connects because NetworkManager assigns a lower metric to the new connection, making it the default route even without valid internet access. To fix this, you must configure your wired interface to either not connect automatically or assign it a higher metric than your Wi-Fi adapter so traffic continues to flow through the wireless network.
Understanding the Default Route Conflict
When you plug in an Ethernet cable, NetworkManager detects the link and attempts to establish a connection. By default, it treats the wired connection as a primary network interface. If this interface does not have active internet access (for example, if it is connected to a local network without a gateway or a router that is not configured for DHCP), NetworkManager still installs a default route for it into the system routing table.
This creates a conflict where the operating system prioritizes the wired path over the Wi-Fi path. Since the wired path leads nowhere, all internet traffic is dropped. This behavior is standard for most Linux distributions but can be disruptive in environments where you frequently switch between wired and wireless networks. The core issue is not that the internet stops working entirely, but that the wrong gateway is selected.
Why Metrics Matter
Linux uses a concept called "metric" to determine which route to use when multiple paths exist. A lower metric indicates a higher priority. Typically, Wi-Fi interfaces are assigned a metric of 600, while Ethernet interfaces might receive a metric of 100. When both are active, the system chooses the Ethernet route. If that route lacks a functional gateway, your connectivity fails immediately.
Resolving this requires adjusting these priorities or changing how NetworkManager handles the wired connection. You should avoid simply disabling the wired adapter entirely, as you may need it for local network resources. Instead, we will look at configuration changes within the KDE Plasma desktop environment and command-line tools.
Method 1: Disable Autoconnect for Wired Ethernet
The most effective solution for many users is to prevent NetworkManager from automatically connecting to wired Ethernet when it detects a link. This ensures that your Wi-Fi connection remains the primary path unless you explicitly choose to use the cable. You can achieve this through the KDE Network Settings or via the terminal.
- Open Network Settings: Click on the network icon in your system tray. Select
Wired Connectionor go toSettings>Network Connections. - Edit the Connection: Find your specific wired connection profile. Click the gear icon or select
Edit. - Disable Autoconnect: Navigate to the
Generaltab. Uncheck the box labeledConnect Automatically. This tells NetworkManager to only activate the wired interface when you manually click "Connect." - Apply Changes: Save the settings. Now, when you plug in the cable, the system will recognize it but will not install a default route until you manually enable the connection.
This method is safe and reversible. It gives you full control over which interface is active. However, if you prefer automatic switching, you can use Method 2 to adjust the routing priority instead.
Method 2: Adjust Interface Metrics via Terminal
If you want the wired connection to remain available but subordinate to Wi-Fi, you can modify the metric directly using the command line. This approach is useful if you cannot find the autoconnect option in your GUI or if you manage multiple connections.
First, identify the name of your wired interface by running nmcli device status. Look for the interface type listed as ethernet. Then, modify the connection profile to increase its metric value above that of your Wi-Fi adapter. For example, if Wi-Fi has a metric of 600, set the wired metric to 700.
nmcli con mod "YourWiredConnectionName" ipv4.route-metric 700
nmcli con mod "YourWiredConnectionName" ipv6.route-metric 700
Replace YourWiredConnectionName with the actual name shown in nmcli con show. After running these commands, restart NetworkManager with sudo systemctl restart NetworkManager. This forces the system to prioritize Wi-Fi even when both interfaces are active.
Verifying the Fix
To confirm the change, check your current routes with ip route. You should see two default routes, one via the Wi-Fi gateway and one via the Ethernet gateway. The Wi-Fi route should have the lower metric number. If you still experience issues, ensure that your Wi-Fi connection is also set to Connect Automatically so it remains the fallback.
Advanced Troubleshooting
In rare cases, the issue may stem from DNS resolution rather than routing. If the wired connection provides local network access but no internet, it might inject incorrect DNS servers. Check your /etc/resolv.conf file to see which nameservers are being used. If they belong to the local network, you may need to configure NetworkManager to ignore DNS settings from the wired interface.
You can do this by editing the connection profile again and going to the DNS tab. Set the mode to Automatic and uncheck Use this connection only for resources on its network if such an option exists, or simply leave the DNS fields blank to force the system to use the DHCP-provided DNS from Wi-Fi.
For more detailed guidance on managing network profiles, refer to our guide on Debian KDE: Wired Ethernet Without Internet Causes Internet Breakage, WiFi Works. Additionally, if you encounter package conflicts during updates related to network managers, check Cannot Update Packages on Linux? Troubleshooting Tips.
Frequently Asked Questions
Will disabling autoconnect stop me from using the wired internet?
No, it will not stop you from using it. It simply prevents the system from activating the connection automatically when you plug in the cable. You can still manually connect to the wired network whenever you need high-speed stability or local network access.
How do I check my current route metrics?
Run the command ip route in your terminal. Look for lines starting with default. The number at the end of each line represents the metric. Lower numbers indicate higher priority. You can compare this against your Wi-Fi and Ethernet gateways to see which one is currently preferred.
Can I set different metrics for IPv4 and IPv6?
Yes, NetworkManager allows separate metrics for IPv4 and IPv6. Use the commands ipv4.route-metric and ipv6.route-metric in nmcli to adjust them independently. This is useful if your ISP provides different routing behaviors for dual-stack connections.
What if I need the wired connection for LAN access but not internet?
You can configure the wired connection to not provide a default gateway. In the connection settings, under the IPv4 Settings tab, set the Method to Link-Local Only or manually enter the IP address without a gateway. This allows local communication while keeping internet traffic on Wi-Fi.
Does this issue affect other Linux desktops like GNOME?
Yes, this is a common behavior across most Linux distributions using NetworkManager. While the GUI menus differ between KDE Plasma and GNOME Tweaks, the underlying logic regarding default routes and metrics remains the same. The terminal solutions provided here work universally.