Skip to content

Instantly share code, notes, and snippets.

@RobinRojowiec
Forked from peci1/Install.md
Created January 6, 2022 08:35
Show Gist options
  • Save RobinRojowiec/b65619eff98bc02332c164cf6816eade to your computer and use it in GitHub Desktop.
Save RobinRojowiec/b65619eff98bc02332c164cf6816eade to your computer and use it in GitHub Desktop.
Install Ubuntu 18.04 on Lenovo T14s AMD with Ryzen 7 PRO 4750U CPU and AMD Renoir GPU

Ubuntu 18.04 on Lenovo T14s

What's the problem?

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.

Steps

  1. Install Ubuntu 18.04.5 HWE from a flash drive
  2. sudo apt update && sudo apt dist-upgrade
  3. Install https://github.com/bkw777/mainline
  4. 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).
  5. Add PPA https://launchpad.net/~kisak/+archive/ubuntu/kisak-mesa (it provides updated Mesa package with graphics support)
  6. Download the following firmware packages:
  1. Unpack each of the firmware archives and copy the contents to /lib/firmware (retaining the folder structure).
  2. Reboot and pray :-D

CPU throttling prevention

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.

ROS-specific problems

RViz

If you have problems with RViz crashing when displaying pointclouds, run rviz with parameter --opengl 310.

Ignition-specific problems

SubT simulator crashes with Rescue Randy in scene

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.

  1. Checkout version ign-rendering4 of https://github.com/ignitionrobotics/ign-rendering
  2. Comment out lines https://github.com/ignitionrobotics/ign-rendering/blob/7d55d9b24a805875258975cb7d48c072e3a55493/ogre2/src/Ogre2DepthCamera.cc#L694-L712
  3. Change num passes from 5 to 4 on line https://github.com/ignitionrobotics/ign-rendering/blob/7d55d9b24a805875258975cb7d48c072e3a55493/ogre2/src/Ogre2DepthCamera.cc#L668
  4. mkdir -p build && cd build && cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr .. && make -j16 && sudo make install
  5. 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment