Need help with Ubuntu on PI 4

Hello everyone,

I joined the forum today. Coming to look for help with MATE on PI 4. Complete noob. Well not completely... I was using the ODROID XU4 computer for about 2 years with Armbian OS. I couldn't get Ubuntu to work well on it. So I settled for Armbian which did the job as a server, but as a desktop I couldn't get it to be a great experience. Then the USB3 ports on the XU4 died, and after some research I found that this was a common problem with the XU4 and I wasn't thrilled with the idea of getting a replacement. Well it seems like the moon and the stars were perfectly aligned for me to find that the PI 4 computer is available, with equal/better processing power to XU4 when it's overclocked, and Ubuntu is available for it. And there is a whole community of PI users helping each other. I am immediately sold.

Now I got everything up and running. But I ran into some minor issues, only the kind of issues that a newbie would have.

This is the image I used:

ubuntu-20.04-preinstalled-server-arm64+raspi.img.xz

I was trying to follow this guy on youtube doing a temperature test and I found out that my Ubuntu MATE image for PI 4 doesn't come with some raspberry pi tools such as rpi-eeprom-update (for firmware updates) and vcgencmd (for hardware sensor access). The official raspberry pi OS "Raspbian" has those tools but I don't want to use Raspbian. Can I add raspi tools to Ubuntu?

I tried putting this line in /etc/apt/sources.list:

deb http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi

But this is the kind of error I get:

N: Skipping acquire of configured file 'main/binary-arm64/Packages' as repository 'http://raspbian.raspberrypi.org/raspbian buster InRelease' doesn't support architecture 'arm64'

Because, obviously I did the wrong thing which was to copy the line from someone elses' settings that I found online. And try as hard as I could, the answer to whether I could download rpi tools to Ubuntu was not resolved through google search. Is there is a kind or wise soul out there to point me in the right direction, I would be most grateful. If it can't be done, then I will want to find some equivalent tools. Specifically I want to be able to record / plot the temperature sensors.

Hi Terry,

I guess this can help you :

Hi olek,

Thanks for the info. I had looked through that thread and I have used desktopify. But I don't see the solution.

There does not appear to be an authoritative answer on availability of rpi-eeprom-update for Ubuntu 20.04.

Please take note of James Chambers's comment from his GitHub:

Ahh yes the new bootloader firmware utility.

This utility is only available on Raspbian at the moment. I think mostly nobody dares to risk bricking everyone's Pis because if you look at the source code at https://github.com/raspberrypi/rpi-eeprom it makes extensive use of the /opt/vc tools (some of which are not open source). The 64 bit build of these tools is known to be partially incomplete and poorly tested. I build the absolute latest vc tools in this image but I wouldn't trust them to perform this update correctly.

Right now no distro has dared to include this utility and I definitely wouldn't be the first because I would never put all of your Pis at risk like that. If something goes wrong when using this utility you can brick the Pi.

I have written extensively about this utility here: https://jamesachambers.com/raspberry-pi-4-bootloader-firmware-updating-recovery-guide/

The most important thing to understand is that the rpi-eeprom bootloader updates are permanent. Reformatting your SD card won't affect them as they are actually flashed onto a special EEPROM chip inside the Pi. This means that if you have a spare SD card or just install Raspbian and then install the bootloader updates you can install anything you want after that.

I actually keep a spare SD card with Raspbian on it just to safely flash these updates.

The following command displays the temperature in centigrade * 1000

cat /sys/class/thermal/thermal_zone0/temp

I use the following script

#!/bin/bash
Temp=$(cat /sys/class/thermal/thermal_zone0/temp)
echo $(( $Temp / 1000))"°C"

in the "command" option in the panel to continually display the temperature.

frank,

Thank you for the info. The comments from James explain a lot. Also it helps to illustrate the challenges that a dev will face when porting to pi 4. I'm truly appreciative that it has come this far.

cheers