My Experiments with Pi (Part 2 of N)

NOTE: This is the continuation of my first post about my experiences with Raspberry Pi 4. You can check out the first part here.

Previously on ....

In my last post I talked about how cool the RPi 4 looked and my motivation in buying it. Later I talked about Raspbian, Docker Containers and finally the need to move to a "64-bit" OS for "more POWER!!". In this piece I'll continue from there describing my experiences with other OSes. Also a friendly reminder that I was trying to do all of this on a headless setup, i.e. without any display. Since I don't have any working HDMI capable monitor and due to this ongoing pandemic, I simply can't go out and get one. 

Thinking of Ubuntu

Gentoo Running on Raspberry Pi 4B
Gentoo for Raspberry Pi 4B
Raspberry Pi 4 has numerous (read more than one) 64 bit OS options available. Some notable ones being Arch based Manjaro, Gentoo 64, Debian based Ubuntu, Debian based Kali Linux and many others. These are maintained by really talented people who are very helpful and often help out the people to get their favorite flavor of linux running on their Raspberry Pi. Since I have used a debian based distro for pretty much all my life, I wanted to use a debian based OS on my Pi. Keeping the main challenge in mind it was kinda impossible to do it using the options available. It would've been painful to get Ubuntu Server 18.04, Ubuntu Mate and the whole debian gang, set up on the pi as in most cases, one had to first log in to Pi using the GUI / command line. This sounds easy except it is output via the HDMI. Once that was done, one could set up, networking, SSH, VNC and all other tools that allow you to control it remotely from a different computer. Not to mention the challenges with wifi firmware and netplan which were another can of worms.

Ubuntu Logo
Ubuntu Logo
Besides this, there were issues with the USB 3 ports not working on the 4GB Raspberry Pi 4 (the one I had) due to some power management issues in kernel that needed to be fixed in early releases of the kernel. Plus the overall task seemed very daunting so I shied away from it. But then came Ubuntu 20.04 LTS.

Enter Ubuntu 20.04 LTS

Ubuntu 20.04 LTS
On April 23 2020, Ubuntu 20.04 LTS was launched. And it came with support for Raspberry Pi 4. This was all thanks to, it using the Linux Kernel 5.4 which had a lot of fixes for the Raspberry Pi 4 merged upstream (basically the "main" Linux kernel). The new kernel was very power efficient, and thanks to the fixes submitted by the Raspberry Pi Foundation being merged in upstream would meant that it would work really well with the Raspberry Pi 4. I was very excited by this and wanted to try it. However, I waited for a few more days before installing it as I do with most of the things I install on my hardware, so that any launch day bugs could be sorted and I could look at overall feedback of the people. The biggest advantage was that official images supported ssh on first boot meaning I could install it without a display attached to it. I would only have to write the image, configure the network and a few other things, and I should've been good to go.

Taking the Leap

So on 1st May, since it was a holiday for me and a start to a long weekend, and it had been about a week since the new release, I decided to install it. If anything went wrong I could fix it over the weekend. While it looked really easy on paper and in the instruction manual, when I actually tried to install it a whole lot went wrong. Before I go on with it, here is my biggest mistake. Almost every other guide on installing an OS on any raspberry pi suggests that you keep a separate SD card with Raspbian installed in it and install all other OSes on a separate one. So that if any thing goes wrong you can go back to a known good state. Well, how do I put this, I went ahead and wiped off the fully updated and stable Raspbian SD card that was serving me well and went ahead with installing Ubuntu on it. That was my biggest mistake. The known good network settings and initial boot configurations were all gone. Raspbian comes with 'raspi-config' a handy command line utility that helps you set up your pi. I assumed Ubuntu 20.04 would come with it, I was wrong. Setting up the pi and the network along with other things now was going to be really painful.

After I initially installed it, I simply couldn't get it to connect to either WiFi or Ethernet. Having troubleshooted for over 3 hrs and having messed up the boot config in more places than I could keep track of (read over 8 places), I considered re-flashing my SD card. Re-flashing seems to have solved a lot of problems as, the moment I connected it via Ethernet to my router, it immediately popped up on my router. I could now SSH to it. I had successfully set up ubuntu server 20.04. Hurray! Setting up a Desktop should have been an easy task from here. In fact it would only take 3 lines to install one of the three recommended for the raspberry pi. I picked the LXDE based Lubuntu as the DE I wanted to run and went ahead and tried to install it. It installed fine after nearly 30+ minutes of downloading and installation. My intention was to install a desktop environment and use a VNC or RDP or something to interface with it.

No DISPLAY!

The sub heading says it all. I got no display out put over VNC. I tried to troubleshoot. The VNC server was crashing. I was like okay, time to change my VNC server. Used another one, and viola I faced the same issue. Looking at the error logs, I figured out, that there were some issues with the Xorg server. Basically, the server responsible for displaying out stuff. I am no expert at Desktop environments or how to debug them, so my next solution to this problem was to use a different desktop environment. I installed XFCE based Xubuntu next. Same issue. Same error message. Next I tried KDE based Kubuntu. Kubuntu installation took nearly an hour, I hoped all the stuff it was putting would help me fix the issues. Except it didn't. I was tired of this and so I decided to stop. Maybe look into it the next day with a fresh perspective.

Going Basic

Firefox on Ubuntu 20.04 running on Raspberry Pi 4B
Firefox on Ubuntu 20.04 LTS
I saw a couple of installation guides and videos online and I noticed that all were using the "stock" gnome based desktop environment with the Raspberry Pi 4. Although it is said that the gnome based desktop is quite taxing for the raspberry pi, all of them were using it and it looked like it ran well. I thought I'd give it a shot, one last time. And guess what, it actually worked. I installed a RDP client and I could actually connect to it. I was running Ubuntu on my Raspberry Pi 4. My happiness was short lived though. It was broken, and in multiple places. Though I was connected to Wifi and even using it to basically connect it via both RDP and SSH, it would show as disconnected. Setting up the WiFi via GUI was not possible as it was not able to scan the networks, even though I could scan them fine using command line. Bluetooth was broken too. Audio was choppy and extremely taxing on the system. And above all, my Raspberry Pi 4 ran quite hot.

Now I understand that it is summer and the ambient temperature is over 30* C, the raspberry pi on idle despite the active cooling fan ran at 55* C. On load it would touch 60* C and would often reboot. In comparison Raspbian idle's around 44* C and touches about 51* C on a similar load. A lot of settings like auto login, Ethernet settings were completely broken. Overall it looked cool, but it was clear I wouldn't want to use it for a long term. Maybe some time later, once the software had matured or maybe when I would get a monitor, I could try it out once again, but not right now. Having made my mind that it was not the OS I was hoping for I started preparing for going back to Raspbian, but this time with a 64-bit kernel (OMG!!).

Learning's...

I so wanted to call this a conclusion, but I still have a lot more things to share, so I will stick with learning's. Major one being, always backup and have a fail safe ready. Secondly always experiment on a temporary setup. Not everything needs to happen on prod. Third, new and shiny software is cool, but the old one is generally stable and well supported. You will rarely find both of them together. Lastly, know when to stop troubleshooting and look into other people's solutions. What others have done may or may not fix your issues, so always keep a track of your changes.

In the next article, I'll talk a bit about Raspbian with a 64-bit Kernel, and some of the apps I run on it. Hope you enjoyed it and learned something from it too. Do consider sharing it with your friends :) Thanks for reading.

 

Comments

  1. Happyluke (2021) | happyluke
    Happy Luke is an online bookmaker. Lucky Luke is the bookmaker. happyluke Lucky Luke rb88 is the bookmaker. Happy Luke. 온카지노 Rating: 3 · ‎4 reviews

    ReplyDelete

Post a Comment

Popular posts from this blog

My Experiments with Pi (Part 1 of N)

Program of the Week 02 - Unique Element