ITCooky Recipes

Lets cooky it yammy things!

How to fix bugs in Ubuntu 20.04 LTS after installation + all necessary programs!

дата September 21, 2020

I am actually an Ubuntu fan! This is a system that once configured, works for years, so long that you forget the scare after installation and the adjustments that need to be made! To begin, I download the image Ubuntu 20.04.1 LTS the installation is usual without tricks; be sure to check the boxes to download and install third party software!

CPU: AMD Ryzen 7 3700X
Storage: M2 SAMSUNG 970 EVO Plus

Since we have Ubuntu, we need to know how to open the console and work with hands.
The console is invoked with [Ctrl] + [Alt] + [T]

And you should be ready to enter the admin password that was set during installation at any time! Both in the console and in the GUI!

All installed apps can be found at the bottom left by clicking the Show Application boxes; You can rotate and type the name in the search!

Installing programs in Ubuntu 20.04
I booted up and tried to find Ubuntu Software Center to install new programs, but it’s gone! It was replaced by Snap Store, only it doesn’t work after install, you need to remove and install it then it will work

Run on console
sudo apt purge snapd
sudo apt install snapd

And we get

Change keyboard shortcuts to change languages
Of course you added the language yourself, it’s easy, but now try changing the keyboard shortcut to change it.
in Settings > Keyboard Shortcuts > Switch to next input source

I press the keys, just as they tell me on the screen, and nothing happens, no panic, this place just doesn’t work!

To change the keys for the language, you need to install via terminal
sudo apt install gnome-tweaks

We find it in apps with the word Tweaks and we execute it
In Keyboard & Mouse > Additional Loyaut Options > Switching to another loyaut choose your combination

You can move the window buttons (minimize, close) from right to left here in Windows Titlebars

Program to format disks in Ubuntu 20.4
As with the language change, I right-click the disk, press Format … and nothing happens!

You need to install GParted, it is not in the Snap Store so on the console
sudo apt install gparted

In the applications we find it by name GParted

Correction of progress bar of file copy tu USB status
Every Ubuntu has this problem. Copy speed to USB 2 starts at 300mb/s (!!!) and drops to 38mb/s at the end of the copy. The system reports that the process is finished, although it is still in progress, and if you take out the USB flash drive, it may ruin it!

To fix this issue, add the line


at the end of the file /etc/sysctl.conf

You can do this directly from the console using vi the editor of the era without internet – [esc] + [i] edit, [esc] + [x] delete, [esc] + [d] + [d] delete line, [esc] + [: q!] + [enter] exit without writing, [esc] + [: wq!] + [enter] exit write and you have to see where you put the cursor – he lives his lifetime
sudo vi /etc/sysctl.conf

Or, through a more or less understandable process with the DOS Midnight Commander text editor, before that you need to install it
sudo apt-get install mc
sudo mc

After that the progress bar shows 6mb/s as it should be with USB 2 approximately.

Add a selection of other operating systems on other disks at Ubuntu boot
sudo os-prober
sudo update-grub

Installing Branded Video Drivers on Ubuntu for Nvidia GPU
I haven’t figured out why to install them yet, because Ubuntu already works with Nvidia

Look at what drivers is now
lspci -k | grep -EA2 'VGA|3D'

0a:00.0 VGA compatible controller: NVIDIA Corporation TU106 [GeForce RTX 2070] (rev a1)
Subsystem: Gigabyte Technology Co., Ltd TU106 [GeForce RTX 2070]
Kernel driver in use: nouveau

nouveau – standart

First I tried doing it like this: doesn’t work, don’t try

Looking for the latest driver
sudo apt-get update && clear && apt-cache search nvidia-[0-9] | grep 'binary driver'

nvidia-340 - NVIDIA binary driver - version 340.108

install it does not work, do not try
sudo apt-get install nvidia-340 nvidia-settings
After this command, I have a black screen, if you don’t then you need do
sudo nvidia-xconfig
and reboot!

There are often problems with branded drivers, they only need to be configured if you know exactly what you need them for. You will also need to monitor Ubuntu updates if you change the kernel version, there will also be a black screen.

To overcome the black screen, you must reboot in recovery mode and run root console here you must do

sudo apt-get purge nvidia-340

I decided the problem was solved but no, Ubuntu started crashing on a black screen after taking a screenshot or in settings

In general, Nvidia video drivers are installed this way
I see what drivers there are (I don’t know how they appeared here)
sudo ubuntu-drivers list
and do
sudo ubuntu-drivers autoinstall
after that reboot
and I see
lspci -k | grep -EA2 'VGA|3D'

0a:00.0 VGA compatible controller: NVIDIA Corporation TU106 [GeForce RTX 2070] (rev a1)
Subsystem: Gigabyte Technology Co., Ltd TU106 [GeForce RTX 2070]
Kernel driver in use: nvidia

nvidia – proprietary driver installed

The image on movement is torn, if you drag the window the upper part moves faster than the lower part. You need to enable Force Full Composition Pipeline in Nvidia settings. Look for the Nvidia X Server Settings application in Show Applications and in the X Server Dispay Configuration in Advenced .. put a check like this

And after installation, the standard video card fan frequency and temperature sensor disappeared! But now you can get a lot more with the nvidia-smi command or specifically the temperature

nvidia-smi -q -d temperature

==============NVSMI LOG==============

Timestamp : Mon Sep 21 09:51:50 2020
Driver Version : 450.66
CUDA Version : 11.0

Attached GPUs : 1
GPU 00000000:0A:00.0
GPU Current Temp : 53 C
GPU Shutdown Temp : 94 C
GPU Slowdown Temp : 91 C
GPU Max Operating Temp : 89 C
Memory Current Temp : N/A
Memory Max Operating Temp : N/A

Video card performance test in Ubuntu
In my case, I only use it to heat the video card
sudo apt install mesa-utils

Controlling the Nvidia graphics card fan in Ubuntu
A rather funny story happened. I am sitting in front of the computer and suddenly vzhuuuh sound like a 20 year old HDD; ooo my god HDD of the RAID array is dying, I bought some SSD, I could not buy the same capacity only half, I configured it and again sitting next to the computer and vzhuuuh …

It turned out that the GeForce RTX ™ 2070 MINI ITX 8G at low speeds the fan creaks when it starts up and often starts to move around zero.
Uh, well, nothing, SSD is a good investment …

So to enable the ability to control fans in Nvidia drivers, add to the file (you may have a different folder)
to section

Section "Device"


Option         "Coolbits" "4"

everything completely in my case is like this

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce RTX 2070"
    Option         "Coolbits" "4"

And reboot

After that, this item Enable GPU Fan Settings will appear in the drivers, you can manually set the fan speed, and after reboot it will go back to zero

This mode of operation is not adapted at all, I will make a bash script that will turn on the fan depending on the temperature.

I make a script (/home/alexandr/my folder)
vi /home/alexandr/.gpu_fan_control

while true;
gtemp=`/usr/bin/nvidia-smi -q -d temperature | /usr/bin/grep "GPU Current" | /usr/bin/awk '{print $5}'`

if [ $gtemp -lt 50 ]
if [ $gspeed -ne 33 ]
/usr/bin/nvidia-settings -a [gpu:0]/GPUFanControlState=1 -a [fan:0]/GPUTargetFanSpeed=33
DISPLAY=:0.0 notify-send "GPU FAN SPEED SET TO 33%" "GPU temperatute is $gtemp C"

if [[ $gtemp -gt 50  && $gtemp -lt 55 ]]
if [ $gspeed -ne 40 ]
/usr/bin/nvidia-settings -a [gpu:0]/GPUFanControlState=1 -a [fan:0]/GPUTargetFanSpeed=40
DISPLAY=:0.0 notify-send "GPU FAN SPEED SET TO 40%" "GPU temperatute is $gtemp C"

if [[ $gtemp -gt 55  && $gtemp -lt 60 ]]
if [ $gspeed -ne 50 ]
/usr/bin/nvidia-settings -a [gpu:0]/GPUFanControlState=1 -a [fan:0]/GPUTargetFanSpeed=50
DISPLAY=:0.0 notify-send "GPU FAN SPEED SET TO 50%" "GPU temperatute is $gtemp C"

if [[ $gtemp -gt 60  && $gtemp -lt 65 ]]
if [ $gspeed -ne 70 ]
/usr/bin/nvidia-settings -a [gpu:0]/GPUFanControlState=1 -a [fan:0]/GPUTargetFanSpeed=70
DISPLAY=:0.0 notify-send "GPU FAN SPEED SET TO 70%" "GPU temperatute is $gtemp C"

if [ $gtemp -gt 65 ]
if [ $gspeed -ne 90 ]
/usr/bin/nvidia-settings -a [gpu:0]/GPUFanControlState=1 -a [fan:0]/GPUTargetFanSpeed=90
DISPLAY=:0.0 notify-send "GPU FAN SPEED SET TO 90%" "GPU temperatute is $gtemp C"
sleep 5

Making it executable
sudo chmod +x /home/alexandr/.gpu_fan_control

So how it will starts up by itself … I didn’t find a way to do it through the console, only through Ubuntu windows through Startup Applications

Restart! Now the temperature is controlled by the running script, if it changes the speed, a message appears. The fan does not move in vain!

Not getting the temperature of each Ryzen core in Ubuntu
I don’t know why I decided that AMD will show the temperature of each CPU core, I’m used to seeing it on INTEL CPUs, but AMD doesn’t know how to do it! In fact, there is none of that in the BIOS, just a CPU temperature. But the problem is also that on GIGABYTE X570 I AORUS PRO WIFI motherboard the parametrs are monitored by the iTE IT8688E chip, it needs the it87 driver, it seems to be there, but it is old, and it was completely abandoned! ! I mean, on Linux, because of this chip, you can’t even get what little information there is!

That’s what we have, we put
sudo apt-get install lm-sensors
Detect sensors
sudo sensors-detect
and see
sudo sensors
we are interested in this

Adapter: PCI adapter
Tdie: +51.0°C (high = +70.0°C)
Tctl: +51.0°C 

And that is! k10temp is a sensor that knows the Ubuntu kernel and shows CPU temperature

But there is a way, confusing and dangerous thanks to I do according to that topic!

Install what you will need to build the driver
sudo apt-get install build-essential dkms git

We found that driver on github, this one is not native, the native developer has retired
git clone
cd it87

Change in the file number 8686 to 8688 so that the system does not alert – there is no such device
sudo sed -i 's/8686/8688/g' ./it87.c
sudo make dkms

If you want to remove the DKMS module and rebuild it,remove it like this
See what’s installed
dkms status

it87, v1.0-48-g40bec4b, 5.4.0-47-generic, x86_64: installed

here we need a name and a version, we delete it
sudo dkms uninstall it87/v1.0-48-g40bec4b
you also need to delete the folders
sudo rm -R /usr/src/it87-v1.0-48-g40bec4b
sudo rm -R /var/lib/dkms/it87

Also, you need to create a file for nice info description
sudo vi /etc/sensors.d/GA-AX570-PRO-WiFi.conf

# Gigabyte X570 PRO WiFi

chip "it8688-isa-*"
label in0 "CPU Vcore"
label in1 "+3.3V"
label in2 "+12V"
label in3 "+5V"
label in4 "Vcore SoC"
label in5 "CPU Vddp"
label in6 "DRAM A/B"
label in7 "3 Vsb"
label in8 "Vbat"
label temp1 "Sys1 Temp"
label temp3 "CPU Temp"
label temp4 "PCIe_x16 Temp"
label temp5 "VRM_MOS Temp"
label temp6 "PCH Temp"
label fan1 "CPU fan"
label fan2 "Sys1_Fan"
label fan3 "Sys2_Fan"
label fan4 "Sys3_PCH_Fan"
label fan5 "CPU_Opt_Fan"
ignore intrusion0
ignore temp2

Now turn on the module
sudo modprobe it87

We look at sensor data
and now a new piece of information has appeared

Adapter: ISA adapter
CPU Vcore: 936.00 mV (min = +0.35 V, max = +1.45 V)
+3.3V: 2.03 V (min = +1.94 V, max = +2.06 V)
+12V: 1.99 V (min = +1.94 V, max = +2.06 V)
+5V: 2.03 V (min = +1.94 V, max = +2.06 V)
Vcore SoC: 1.08 V (min = +0.90 V, max = +1.26 V)
CPU Vddp: 912.00 mV (min = +0.85 V, max = +0.95 V)
DRAM A/B: 1.38 V (min = +1.10 V, max = +1.60 V)
3 Vsb: 3.29 V (min = +0.00 V, max = +6.12 V)
Vbat: 3.07 V
CPU fan: 1201 RPM (min = 300 RPM)
Sys1_Fan: 837 RPM (min = 300 RPM)
Sys2_Fan: 4753 RPM (min = 300 RPM)
Sys1 Temp: +55.0°C (low = +127.0°C, high = +127.0°C) sensor = thermistor
CPU Temp: +46.0°C (low = +127.0°C, high = +127.0°C) sensor = AMD AMDSI
PCIe_x16 Temp: +21.0°C (low = +0.0°C, high = +127.0°C) sensor = thermistor
VRM_MOS Temp: +48.0°C (low = +0.0°C, high = -120.0°C) sensor = thermistor
PCH Temp: +61.0°C (low = -16.0°C, high = +90.0°C) sensor = thermistor

There are all the temperatures, fan speeds and voltages!

If you has an error

modprobe: ERROR: could not insert 'it87': Device or resource busy

add acpi_enforce_resources=lax to
sudo vi /etc/default/grub in this line

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_enforce_resources=lax"

sudo update-grub2
and reboot

To start after a reboot, add to
sudo vi /etc/modules


To monitor temperatures you must install
sudo apt install psensor

And we have a graph, bad but better than nothing

Image editing software for Ubuntu
It’s of course Gimp, it’s on the Snap Store.

Photo editing software for Ubuntu
The photos in RAW, ORF etc format – RawTherapee. It’s not on the Snap Store either, it needs to be installed through the console
sudo add-apt-repository ppa:dhor/myway
sudo apt install rawtherapee

In applications we find it by the name RawTherapee

Video Editing Software for Ubuntu
Kdenlive is in the Snap store

Video editors aren’t simple at all and neither is this one!

There is no video rotation in this editor, or I couldn’t find it, so I use ffmpeg on the console
I make
sudo apt-get install ffmpeg
to rotate the video 180 degrees counterclockwise
ffmpeg -i test_in.mp4 -vf "transpose=2,transpose=2" test_out.mp4
other angles and sides

For the transpose parameter you can pass:
0 = 90CounterCLockwise and Vertical Flip (default)
1 = 90Clockwise
2 = 90CounterClockwise
3 = 90Clockwise and Vertical Flip

It can replace some Kdenlive functions, for example, attach audio to video
ffmpeg -i 'test in.mp4' -i 'test in audio.aac' -c copy test_out_vid_aud.mp4

Merge video snippets into one from a video list
ffmpeg -f concat -safe 0 -i list.txt -c copy test_out_all.mp4

list.txt video list

file ./e1.mp4
file ./e2.mp4
file ./e3.mp4
file ./e4.mp4
file ./e5.mp4
file ./e6.mp4

Ubuntu already has a program for working with documents and spreadsheets – LibreOffice, the FireFox Internet browser is here!

Leave a Reply

Your email address will not be published. Required fields are marked *