Kamis, 30 September 2021

The Official Raspberry Pi 4 Case Sucks! Here’s What You Can do to Reduce the Overheating

The Raspberry Pi 4 is an absolute favorite among millions of people, especially in the nerd community, and I’m no exception. But did you know that the Pi throttles without proper cooling?

Here, I’m going to describe some serious drawbacks in the Official Raspberry Pi 4 Case and also share some ways to mitigate them.

raspberry pi 4 official case
Raspberry Pi 4 official case

After the first boot, my Raspberry Pi 4 (8 GB RAM version) mounted inside the Official Raspberry Pi 4 case, would shoot to 80 °C when the unattended upgrades kicked in. I was on Ubuntu with all firmware updates that are apparently supposed to fix heating issues.

On idle, this hot vanilla and strawberry cake would never go less than 75°C.

I could hardly use it until I removed the top white cover of the case. The temperature dropped to only around 67 °C on idle — Can you believe that? Even after I double-checked after a while with a reboot. This, obviously, still isn’t also quite acceptable. If I got the case and plan to use it for long-term purpose, why would I want to keep the case lid open all the time?

And why is something like this happening? It’s all because of a very poor design of the official Raspberry Pi case.

The Official Raspberry Pi 4 Case is a Heat Monster!

Thermal throttling in simple terms, is a reduction in the performance of your Pi processor (CPU) so that the temperature does not exceed extremely high temperatures (such as 80 °C) and cause damage.

The case is built out of plastic — a poor conductor of heat (simple old school physics), and hence is unable to dissipate it effectively throughout the case and out of the Pi board. Therefore, the processor on the Pi board heats up and gets throttled down to an extremely inferior level of performance, once it literally reaches a temperature of an alarming degree. I noticed a 100% CPU usage during unattended upgrades right after first boot with the CPU’s temperature at 80 °C.

Beautiful though it may look, the official case delivers a big blow to the Pi’s performance.

If you really want to get the most out of your Pi’s performance, you must take care of its cooling too. These heating issues cannot simply be ignored:

Heat gets trapped

Once you set up the Pi inside this case there is not even a single vent for that excess heat to escape. So it keeps getting accumulated inside until it reaches those crazy temps and triggers the throttle.

No fan outlet (badly needed)

The top white cover could have had a circular vent on top of the case for at least the Official Raspberry Pi 4 Fan.

No passive cooling

If the case had been of metal, it could have doubled up as heat-sink and dissipate the heat efficiently out of the processor residing on the Pi board.

Other drawbacks apart from heating issues

The official Pi 4 case has a few more drawbacks:

  1. Inconvenient SD Card Management: It is not very convenient to assemble the Pi board inside the case and get the SD card port in the correct orientation to be able to switch cards later on.
  2. No Screwing System: No screws are provided, maybe because it could break the dummy holders on the base of the case that almost look like you could use four screws to fix the board securely onto the base.

What can you do to control the overheating in Raspberry Pi 4?

After doing some intense research, I found some of the best cooling solutions available in the market – all thanks to our amazing modding community!

Use an ice tower cooler

I first found an in-depth performance review of various Pi coolers at Jeff Geerling’s, who is known online as geerlingguy. I straightaway went for the ICE tower cooler after going through the temperature stats and assembled it:

raspberry pi 4 ice tower cooler
Raspberry Pi 4 ice tower cooler

Temperatures dropped to 30 °C on idle and under load, it now stays at around 45 °C. I’m yet to mod a proper case for it. There are ready to purchase case with enough space for the cooler. You may find such cases on Amazon or other online stores.

No products found.

Use an aluminum heat sink for passive cooling

There is also a remarkable video online on passive cooling, reviewing an aluminum heat-sink-as-a-case.

A thermal pad is provided, which is equivalent to the thermal paste used on Desktop processors. On placing it in the manner shown in the video, the heat is dissipated out of the processor on the Pi board throughout the whole case. A wonderful magic of science!

Modding the official Pi case

If you still want to get the official case, it is advisable to at-least go for a fan mod:

Potential Manufacturing Solutions

Here are some solutions that can make the whole process of manufacturing easier, by applying DevOps inspired improvements:

  • Think about it, that circular piece of plastic cut out from the top of the cover could be recycled to manufacture so many more Pi 4 cases in production. Isn’t it? It would clearly be a win-win scenario and also lowers costs as well!

Personal Notes

Hope this write-up helps you in getting the most out of your Raspberry Pi 4. It’s been a quite a while since I used to write here on It’s FOSS. Feels good to be back. I’d love to know your thoughts, suggestions, and experiences down in the comments below. Please do not hesitate to share.



from It's FOSS https://ift.tt/3D0cizj
via IFTTT

Selasa, 28 September 2021

How to Install Skype on Arch Linux

There was a time when Skype used to be the default application for video calls. Microsoft bought Skype, change its P2P architecture, tried to monetize it, tried to push it as business tool but Skype kept on seeing a gradual decline.

There are tons of video calling apps on mobile. On desktop, Zoom is preferred for video conferencing. Even Microsoft has a new communication tool in the form of Microsoft Teams.

Despite everything, Skype is still being developed and there are few people still using it. If you are one of those people who want to use Skype on their Arch Linux system, this tutorial will help you.

There are two ways you can get Skype on Arch Linux:

  • Using Snap
  • Using Arch Linux

Let’s see both methods one by one.

Method 1: Install Skype on Arch Linux using Snap

The easiest way to install Skype is via the Snap Store. The biggest advantages of using the Skype snap is that it is maintained by the Skype developer, and it updates automatically in the background.

And it is really easy to install as well. Open a terminal and use the following command:

sudo snap install skype

If you get snap: command not found in reply, you’ll need to install Snapd first.

snap check 1
Check is Snap support is installed or not

Installing Snap support on Arch Linux

To download Snap, run the following commands:

git clone https://aur.archlinux.org/snapd.git
clone snapd
Clone snapd

Before you build and install Snap, you need to change the permission for the folder by using this command:

sudo chmod a+w snapd

Now, enter the folder and install Snap:

cd snapd && makepkg -si
snap install
Installing Snap

Once Snap is installed, you need to activate the snap socket that handles communication with systemd. To do that, use this command:

sudo systemctl enable --now snapd.socket

Next, you need to create a symbolic link between /var/lib/snapd/snap and /snap using this command:

sudo ln -s /var/lib/snapd/snap /snap

After that, you should either reboot your system or log out and log back in for these changes to take place.

snap socket enable

Now, we can check to make sure that Snap is installed correctly by running it in the terminal.

Finally, you can install the Skype snap by typing:

sudo snap install skype
snap install skype

You might get an error that says error: too early for operation, device not yet seeded or device not acknowledged. This means that snapd had a couple of processes that need to be run first. You can either wait a few minutes and retry, or logout and log back in.

Once the installation is complete, you can launch Skype either by selecting it from the system menu or by typing skype in the terminal.

Skype snap
Skype snap running in Arch Linux

Method 2: Install Skype from Arch User Repository

Since Skype is a proprietary piece of software, Arch devs don’t make it available through their repos. Thankfully, it is available in the Arch User Repository (AUR).

If you already have an AUR helper like yay installed, you can use:

yay -S skypeforlinux-stable-bin

Alternatively, if you do not want to use an AUR helper, you can still get the package from the AUR and install it without AUR helper. It takes a bit more effort, though.

First, you should check for updates by running the following command:

sudo pacman -Syy

Next, you need to clone the package’s git repo to your system by using the following command:

sudo git clone https://aur.archlinux.org/skypeforlinux-stable-bin.git
sky aur clone

In order to install Skype you need to change file permissions, you can that by running:

sudo chmod a+w skypeforlinux-stable-bin
skype aur permission

Now, you can enter the folder by typing:

cd skypeforlinux-stable-bin

To finally install Skype, enter this command into the terminal:

makepkg -si
sky aur install

Once the installation process is complete, you can run Skype either by selecting it from the system menu or by typing skypeforlinux in the terminal.

AUR version of Skype
AUR version of Skype

You can choose either of the methods based on your preference and enjoy Skype on Arch Linux.



from It's FOSS https://ift.tt/3ASMqF0
via IFTTT

Troubleshooting “Bash: Command Not Found” Error in Linux

This beginner tutorial shows how to go about fixing the Bash: command not found error on Debian, Ubuntu and other Linux distributions.

When you use commands in Linux, you expect to see an output. But sometimes, you’ll encounter issues where the terminal shows ‘command not found’ error.

bash command not found error

There is no straightforward, single solution to this error. You have to do a little bit of troubleshooting on your own.

It’s not too difficult, honestly. The error gives some hint already when it says “bash: command not found”. Your shell (or Linux system) cannot find the command you entered.

There could be three possible reasons why it cannot find the command:

  • It’s a typo and the command name is misspelled
  • The command is not even installed
  • The command is basically an executable script and its location is not known

Let’s go in detail on each possible root cause.

Fixing “bash: command not found” error

bash command not found error 1

Method 1: Double check the command name (no, seriously)

It is human to make mistakes, specially while typing. It is possible that the command you entered has a typo (spelling mistake).

You should specially pay attention to:

  • The correct command name
  • The spaces between the command and its options
  • The use of 1 (numeral one), I (capital i) and l (lowercase L)
  • Use of uppercase and lowercase characters

Take a look at the example below, where I have misspelled the common ls command.

command not found error

So, make double sure what you are typing.

Method 2: Ensure that the command is installed on your system

This is another common reason behind the command not found error. You cannot run a command if it is not installed already.

While your Linux distribution comes with a huge number of commands installed by default, it is not possible to pre-install all the command line tools in a system. If the command you are trying to run is not a popular, common command, you’ll have to install it first.

You can use your distribution’s package manager to install it.

command not found debian
You may have to install the missing command

In some cases, popular commands may get discontinued and you may not even install it anymore. You’ll have to find an alternative command to achieve the result.

Take the example of ipconfig command. This deprecated command was used for getting Ip address and other network interface information. Older tutorials on the web still mention using this command but you cannot use it anymore in newer Linux versions. It has been replaced by the ifconfig tool.

bash command not found error
Some popular commands get discontinued over the time

Occasionally, your system won’t find even the extremely common commands. This is often the case when you are running a Linux distribution in Docker containers. To cut down on the size of the operating system image, the containers often do not include even the most common Linux commands.

This is why Docker user stumble across things like ping command not found error etc.

ping command not found ubuntu
Docker containers often have only a few commands installed

So, the solution is to either install the missing command or find a tool that could do the same thing you were trying to do with the missing command.

Method 3: Check if it is an executable script with correct path

This is a common mistake Linux rookies make while running a shell script.

Even if you are in the same directory and try to run an executable script just by its name, it will show an error.

root@debian-test:~/scripts# sample
-bash: sample: command not found

You need to either specify the shell interpreter explicitly or its absolute path.

bash script command not found error

If you are in some other directory and try to execute the shell script without giving the correct path to the file, it will complain about not finding the file.

script file not found error

Adding it to the PATH

In some cases, you download the entire software in a tar file, extract it and find an executable file along with other program files. To run the program, you need to run the executable file.

But for that, you need to be in the same directory or specify the entire path to the executable file. This is tiresome.

Here, you can use the PATH variable. This variable has a collection of directories and these directories have the binary (executable) files of various Linux commands. When you run a command, your Linux system checks the mentioned directories in the PATH variable to look for the executable file of that command.

You can check the location of the binary of a command by using the which command:

path location

If you want to run an executable file or script from anywhere on the system, you need to add the location of the file to this PATH variable.

adding executable to path variable linux

The PATH variable then needs to be added to the rc file of the shell so that the changes made to PATH variable is permanent.

You get the gist here. It is important that your Linux system has the knowledge about the location of the executable script. Either you give the path while running it or you add its location to the PATH variable.

Did it help you?

I understand that when you are new to Linux, things could be overwhelming. But when you understand the root cause of the problem, it gradually improved your knowledge.

Here, there is no straightforward solution possible for the ‘command not found error’. I gave you some hints and pointers and that should help you in troubleshooting.

If you still have doubt or need help, please let me know in the comment section.



from It's FOSS https://ift.tt/2Y5Qjbq
via IFTTT

Senin, 27 September 2021

How to Install and Setup Flutter Development on Ubuntu and Other Linux

Google’s UI toolkit Flutter is getting increasingly popular for creating cross-platform applications for the mobile, web and desktop.

Flutter is not a programming language but a software development kit. Dart is the programming language used underneath the Flutter SDK.

Flutter is the main framework behind Google’s open source Fuchsia OS, Google STADIA and many other software and mobile apps.

If you want to start developing with Flutter, this tutorial will help you to get your set-up ready on Ubuntu and hopefully other Linux distributions.

Installing Flutter on Ubuntu and other Linux with Snap

The easiest way to install Flutter on Linux is by using Snap. If you are using Ubuntu, you already have got Snap. For other distributions, please make sure to enable Snap support.

Open a terminal and use the following command in a terminal to install Flutter:

sudo snap install flutter --classic

You’ll see something like this on your terminal:

installing Flutter on ubuntu

Once the installation completes, it is time to verify it. Not just Flutter installation but also verify every dependency that needs to be satisfied for Flutter to function properly.

Verify Flutter dependencies

To verify that every dependency, for the correct work of Flutter, is installed, Flutter has a built-in option:

flutter doctor

The process will start, looking like this:

Verify Flutter Install

And it will be finishing like this:

Flutter verification completes

As you can see, we need Android Studio for working. So let’s install it. How do we do that? Installing Android Studio on Linux is also effortless with Snap.

Install and set up Android Studio

In a terminal, use the following command to get Android Studio installed:

sudo snap install android-studio --classic
Install Android Studio in Linux with Snap

Once installed, open Android Studio from our operating system menu.

open android studio

You are almost done. It’s time for configuring Android Studio.

Setting up Android Studio

Click next and select standard if you don’t want to complicate things.

Setting up Android Studio

Select your preferred theme (I like the Dark one).

Setting up Android Studio

Verify that everything is OK and click on Next.

Setting up Android Studio

Finally, hit the Finish button.

Setting up Android Studio

And wait until the download is finished.

Setting up Android Studio

Creating a sample Hello World Flutter app

In Android Studio, go to Projects and select New Flutter Project. Flutter SDK path will be set by default.

new flutter project

And here is where the magic starts to appear because this is where you set your project name, which in this case it will be called hello_world.

Let’s select the three available platforms: Android, iOS, and Web. And finally, click on Finish.

Sample Flutter project

The principal file in the projects is located in lib/main.dart, as is shown in the next image.

Sample Flutter projects

Once selected, erase everything contained inside the file and change it for this sample code:

// Copyright 2018 The Flutter team. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Welcome to Flutter',
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Welcome to Flutter'),
        ),
        body: const Center(
          child: Text('Hello World'),
        ),
      ),
    );
  }
}

It’s important to say that this is only for showing you how Flutter works, in case you’re convinced about learning this beautiful and incredible language, here is the Documentation to see more about it. Try it!

Finally, select Chome Web device and do click on the Run button, as is shown below; and see the magic!

Sample Flutter project in Ubuntu

It’s incredible how fast you can create a Flutter project. Say hello to your Hello World project.

Running a sample Flutter project

In the end…

Flutter and Dart are perfect if you want to contribute with beautiful mobile and Web interfaces in a short time.

Now you know how to install Flutter on Ubuntu Linux and how to create your first app with it. I really enjoyed writing this post for you, hoping this helps you and if you have any questions, please let me know by leaving a comment or sending me an email to marco.carmonag@alumno.buap.com. Good luck!

Tutorial contributed by Marco Antonio Carmona Galván, a student of physics and data science.



from It's FOSS https://ift.tt/39IbHFP
via IFTTT