{"id":4303,"date":"2025-10-18T10:38:48","date_gmt":"2025-10-18T09:38:48","guid":{"rendered":"https:\/\/m0aws.co.uk\/?p=4303"},"modified":"2025-10-23T10:28:28","modified_gmt":"2025-10-23T09:28:28","slug":"raspberrypi-os-13-networking-tidy-up-broken-lm-senors","status":"publish","type":"post","link":"https:\/\/m0aws.co.uk\/?p=4303","title":{"rendered":"RaspberryPi OS 13 Networking tidy up &amp; broken lm-sensors"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Since <a href=\"https:\/\/www.raspberrypi.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">RaspberryPi<\/a> are now forcing users of its SBC to use RaspberryPi OS 13 (via the RaspberryPi Imager tool) instead of the reliably stable Debian 11 or 12 several issues have come to light.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Firstly if like me you run most of the your Pi4\/5 SBCs headless\/lights out you&#8217;ll notice that networking is now ridiculously managed via Network Manager and Netplan.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This is a ridiculous method of managing such a simple device, it&#8217;s over complicated, messy and ill thought out. Yet another classic example of change for the sake of change and not to actually improve things.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This combination of Network Manager (often referred to as Network Mangler for good reason) and Netplan is fraught with bugs. Try setting a second IP address on an interface and you&#8217;ll find it doesn&#8217;t work. <em><strong>nmtui<\/strong><\/em> will show the ip address as being configured however, netplan never actually puts the config into play.<br><br>Having to use <em><strong>nmtui<\/strong><\/em> on the command line to manage ethernet interfaces is also ridiculous. Its badly laid out menu system takes an age to get through to do the simplest of config changes. What&#8217;s wrong with just editing the <em>\/etc\/network\/interfaces<\/em> file?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After much frustration trying to configure the ethernet interface on my headless Pi5 I decided to get rid of this hideous method of managing ethernet interfaces and put it back to using the simple <em>interfaces<\/em> file.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I&#8217;ve documented the steps just in case anyone else wants to do the same.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1: Make sure the traditional networking stack is installed:<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install ifupdown\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2 \u2013 Disable NetworkManager:<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl stop NetworkManager.service\nsudo systemctl disable NetworkManager.service\nsudo systemctl mask NetworkManager.service\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">(Optional but tidy: )<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt purge network-manager\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3 \u2013 Disable Netplan<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt purge netplan.io\nsudo rm -f \/etc\/netplan\/*.yaml\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Also ensure <code><em>\/lib\/systemd\/systemd-networkd<\/em><\/code> is <strong>disabled<\/strong>, since Netplan can trigger it:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl disable systemd-networkd\nsudo systemctl mask systemd-networkd\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step 4 \u2013 Create your <code>\/etc\/network\/interfaces<\/code> file<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code># Example \/etc\/network\/interfaces for Ethernet (eth0) with static IP:\n#\n# Loopback\nauto lo\niface lo inet loopback\n\n# Ethernet\nauto eth0\niface eth0 inet static\n    address 192.168.1.10\n    netmask 255.255.255.0\n    gateway 192.168.1.1\n    dns-nameservers 1.1.1.1 8.8.8.8\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Example for DHCP:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>auto eth0\niface eth0 inet dhcp<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If you use Wi-Fi:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>auto wlan0\niface wlan0 inet dhcp\n    wpa-ssid \"YourSSID\"\n    wpa-psk \"YourPassword\"<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step 5 \u2013 Enable the traditional networking service<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl enable networking.service\nsudo systemctl restart networking.service<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Then confirm:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ip a<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You should see your interfaces up with the expected IP addresses, managed by ifupdown.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 6 \u2013 (Optionally) Clean residual files<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Remove leftover NetworkManager\/Netplan configs to avoid confusion:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo rm -rf \/etc\/NetworkManager\nsudo rm -rf \/etc\/netplan\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Verification<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Check which subsystem is active:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl is-active NetworkManager\nsystemctl is-active networking\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Expected output:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>inactive\nactive\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The <code><em>\/etc\/network\/interfaces<\/em><\/code> method works perfectly on Pi 5 and is lighter weight and ideal for embedded or headless servers.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you later reinstall NetworkManager, it will <strong>override<\/strong> interfaces again unless you mark them as unmanaged in <code><em>\/etc\/NetworkManager\/NetworkManager.conf<\/em><\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can still use <code>ifup<\/code> \/ <code>ifdown<\/code> commands manually for control.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You now have your Pi running the classic, lightweight networking stack which is ideal if you use your Pi as a 24\/7 server like I do. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Note:<\/strong> This method is still supported on RaspberryPi  Debian 13 but, it&#8217;s no longer the default.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As a final note, if you want to add a second IP Address to your Ethernet interface it&#8217;s extremely simple to define in the <em>\/etc\/network\/interfaces<\/em> file. I&#8217;ve created an example of how to do this below for reference.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Loopback\nauto lo\niface lo inet loopback\n\n#\n# Primary interface - static IP\n#\nauto eth0\niface eth0 inet static\n    address 192.168.1.10\n    netmask 255.255.255.0\n    gateway 192.168.1.1\n    dns-nameservers 1.1.1.1 8.8.8.8\n\n#\n# Secondary IP on same interface\n#\nauto eth0:1\niface eth0:1 inet static\n    address 192.168.1.11\n    netmask 255.255.255.0\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Check both IP Addresses appear on the same interface:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ip a show eth0\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">For the example above you&#8217;ll see:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>inet 192.168.1.10\/24\ninet 192.168.1.11\/24\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Finally, if like me you use <em>lm-sensors<\/em> to keep check on how hot your Pi is running you&#8217;ll find that the <em>sensors<\/em> command no longer works, it just throws a segmentation fault. This is a nuisance as I use this as part of my Node-Red Monitoring Dashboard.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A partial work around is to use the <em>vcgencmd<\/em> command as it can return the temperature of the <em>system on a chip<\/em> (SOC) device.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vcgencmd measure_temp<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You can create an alias for this command in your <em>~\/.profile<\/em> file, I&#8217;ve named the alias &#8216;cputemp&#8217; in this example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>alias cputemp=\"vcgencmd measure_temp\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Once you&#8217;ve saved your <em>.profile<\/em> file logout and back in again and you&#8217;ll now have a new command to use to get the CPU temp.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">More soon &#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Since RaspberryPi are now forcing users of its SBC to use RaspberryPi OS 13 (via the RaspberryPi Imager tool) instead of the reliably stable Debian 11 or 12 several issues have come to light. Firstly if like me you run most of the your Pi4\/5 SBCs headless\/lights out you&#8217;ll notice that networking is now ridiculously &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/m0aws.co.uk\/?p=4303\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;RaspberryPi OS 13 Networking tidy up &amp; broken lm-sensors&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[503,500,502,287,510,504,180,132,264,4,499,353,38,505,496,495,497,179,135,439,122,412,351,508,507,506,511,509,498,501],"tags":[],"class_list":["post-4303","post","type-post","status-publish","format-standard","hentry","category-profile","category-etc-network-interfaces","category-alias","category-commandline","category-cpu","category-cputemp","category-dashboard","category-debian","category-distribution","category-ham-radio","category-interfaces","category-iso","category-linux","category-lm-sensors","category-netplan","category-networkmanager","category-networkmangler","category-nodered","category-opensource","category-pi4","category-raspberrypi","category-raspberrypios","category-raspbian","category-segfault","category-segmentationfault","category-sensors","category-soc","category-temperature","category-trixie","category-vcgencmd"],"_links":{"self":[{"href":"https:\/\/m0aws.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/4303","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/m0aws.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/m0aws.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/m0aws.co.uk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/m0aws.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4303"}],"version-history":[{"count":39,"href":"https:\/\/m0aws.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/4303\/revisions"}],"predecessor-version":[{"id":4357,"href":"https:\/\/m0aws.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/4303\/revisions\/4357"}],"wp:attachment":[{"href":"https:\/\/m0aws.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4303"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/m0aws.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4303"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/m0aws.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4303"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}