The Ryzen CPU and Renoir GPU are too new for all kernels supported by Ubuntu 18.04 (5.4 is the latest supported). The notebook will boot with 18.04.5, but a lot of things will not work (sleep, screen brightess, audio, graphics only works in a limited way etc.).
This tutorial shows the steps necessary to be done to successfully run the system with full support for the GPU and other peripherals.
- Install Ubuntu 18.04.5 HWE from a flash drive
sudo apt update && sudo apt dist-upgrade
- Install https://github.com/bkw777/mainline
- Using Mainline, install latest kernel 5.10.* (newer 5.11 or newer might also work, but 5.10 is a long-term support version, which means it should be easier maintainable in the future).
- Add PPA https://launchpad.net/~kisak/+archive/ubuntu/kisak-mesa (it provides updated Mesa package with graphics support)
- Download the following firmware packages:
- https://packages.debian.org/sid/all/firmware-amd-graphics/download
- https://packages.debian.org/sid/all/firmware-iwlwifi/download
- https://packages.debian.org/bullseye/firmware-realtek
- Unpack each of the firmware archives and copy the contents to
/lib/firmware
(retaining the folder structure). - Reboot and pray :-D
If you give the CPU a decent load for more than a minute, the CPU might get throttled all the way down to 400 MHz!
First thing is knowing the current frequency of your CPU. https://extensions.gnome.org/extension/1082/cpufreq/ might help if you use Gnome. This program also has a switch that enables turbo frequencies. Switch it on!
There's no other way to avoid throttling than removing heat from the chassis. That's best done with the internal fan. However, the preinstalled control mechanism tops at 3900 rpm, which is not enough to avoid throttling. Here's what you can do to increase the fan speed.
Create file /etc/modprobe.d/thinkpad_acpi.conf
with the following content:
options thinkpad_acpi fan_control=1
Save it and reboot.
After the reboot, the following should work:
echo level full-speed | sudo tee /proc/acpi/ibm/fan
To set the fan back to automatic control, do:
echo level auto | sudo tee /proc/acpi/ibm/fan
You can also install the thinkfan utility to manage this automatically. Or you can just integrate the max-fan command into your computation-heave pipeline launcher.
If you have problems with RViz crashing when displaying pointclouds, run rviz with parameter --opengl 310
.
For me, SubT simulator crashes when I load a scene with Rescue Randy. The solution is to partly revert gazebosim/gz-rendering#251 . It will cause incorrect rendering of particle effects, but that's mostly it.
- Checkout version ign-rendering4 of https://github.com/ignitionrobotics/ign-rendering
- Comment out lines https://github.com/ignitionrobotics/ign-rendering/blob/7d55d9b24a805875258975cb7d48c072e3a55493/ogre2/src/Ogre2DepthCamera.cc#L694-L712
- Change num passes from 5 to 4 on line https://github.com/ignitionrobotics/ign-rendering/blob/7d55d9b24a805875258975cb7d48c072e3a55493/ogre2/src/Ogre2DepthCamera.cc#L668
mkdir -p build && cd build && cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr .. && make -j16 && sudo make install
- After each update of libignition-rendering4-ogre2 package via package manager, update you local checkout of ign-rendering and re-do the manual installation step
Network card in Lenovo Thunderbolt 3 Dock Gen 2
The driver available in kernel is somewhat outdated and sometimes the NIC stops working or prevents sleep. This will install a DKMS module building the newest available version of the driver directly from Realtek.
Then create file
/usr/src/r8152-2.14.0/dkms.conf
with the following content:Then call
Reboot, and you're done.
You can check the version of the driver you're using by
If it shows 2.14, that's the latest one.