sudo ubuntu-drivers autoinstall
Network and sound are dead. Originally, I used USB-NIC because it was troublesome to install the driver for the Ethernet socket on the motherboard. I was able to recognize the USB-NIC normally, but I couldn't even use it with the above operation. Did you do something else? Well, let's recover for the time being. At this time, let's set it for the Ethernet socket of the motherboard.
I checked the current kernel version below.
$ uname -r
5.4.0-54-generic
Next, I investigated the types of network chips.
$ lspci | grep Ether
06:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller (rev 05)
It's realtek RTL8125. I checked if the driver was in place. It is under the directory of the kernel Ver that has already been checked.
$ls /lib/modules/5.4.0-54-generic/kernel/drivers/net/ethernet/realtek/
8139cp.ko 8139too.ko
There is no RTL8125. I need to make this one. The files for RTL8125 driver generation can be obtained from the Realtek official page below. https://www.realtek.com/en/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-pci-express-software
I was able to use the following.
From the contents of Makefile and autorun.sh, I can see that the make and gcc commands are required to generate the driver, but unfortunately they are not installed. I can't use the net, so I can't apt install. So I will generate a driver on another sub PC and bring it with a USB drive.
Main PC:
Details | Remarks | |
---|---|---|
OS | Ubuntu 20.04 | |
CPU | AMD Ryzen 9 3900XT | |
network chip | Realtek RTL8125 |
Sub PC:
Details | Remarks | |
---|---|---|
OS | Ubuntu 18.04 | |
CPU | Intel(R) Core(TM) i5-8400 |
Install Ubuntu20.04 on VirtualBox and check that the kernel version is the same as the main PC with uname -r
. The first time was different, so after upgrading it became the same. Please refer to other articles. This or something
Download the above official files on VirtualBox and execute ./autorun.sh
in that folder. Probably there is a message that something is missing, but if the driver is generated in step 3, there is no problem.
Execute the following on VirutualBox and confirm that r8125.ko
exists.
$ ls /lib/modules/5.4.0-54-generic/kernel/drivers/net/ethernet/realtek/
8139cp.ko 8139too.ko atp.ko r8125.ko r8169.ko
Move r8125.ko
from the Virutual Box to the sub PC. Please move this with scp or shared folder.
Use the USB drive to move r8125.ko
from the sub PC to the following folder on the main PC.
/lib/modules/5.4.0-54-generic/kernel/drivers/net/ethernet/realtek/
$ sudo insmod /lib/modules/5.4.0-54-generic/kernel/drivers/net/ethernet/realtek/r8125.ko
After a few seconds, confirm that the network is back.
After confirming, type the following command so that it will be enabled even after rebooting.
sudo depmod -a
that's all.
Only Dummy Output was output in the setting audio Output Device. I tried the following command. inxi was installed with apt.
$ inxi -SMA
System:
Host: ueda-System-Product-Name Kernel: 5.4.0-54-generic x86_64 bits: 64
Desktop: Gnome 3.36.4 Distro: Ubuntu 20.04.1 LTS (Focal Fossa)
Machine:
Type: Desktop Mobo: ASRock model: B550M Steel Legend
serial: <superuser/root required> BIOS: American Megatrends v: P1.10
date: 06/11/2020
Audio:
Device-1: NVIDIA GP107GL High Definition Audio driver: N/A
Device-2: AMD Starship/Matisse HD Audio driver: N/A
Sound Server: ALSA v: k5.4.0-54-generic
Audio driver is N / A. This driver was installed by executing the following command.
sudo apt install linux-modules-extra-`uname -r`
Let's look again.
$ inxi -SMA
System:
Host: ueda-System-Product-Name Kernel: 5.4.0-54-generic x86_64 bits: 64
Desktop: Gnome 3.36.4 Distro: Ubuntu 20.04.1 LTS (Focal Fossa)
Machine:
Type: Desktop Mobo: ASRock model: B550M Steel Legend
serial: <superuser/root required> BIOS: American Megatrends v: P1.10
date: 06/11/2020
Audio:
Device-1: NVIDIA GP107GL High Definition Audio driver: snd_hda_intel
Device-2: AMD Starship/Matisse HD Audio driver: snd_hda_intel
Sound Server: ALSA v: k5.4.0-54-generic
The driver is now snd_hda_intel and the sound is coming out.
I've been tied up with Ubuntu for about 7 years, and internet disconnections have often occurred. I have been taking crappy workarounds such as OS reinstallation every time, but I feel that I have improved as a Ubuntist by being able to take the above measures. This time, I generated the driver by cross-compiling with VirtualBox, but it may have been smartly generated by specifying the argument of make. I gave up the method because it didn't hit easily even when I checked it while working. Please let me know if you have any details.
make and gcc should be done immediately after OS installation. Then, it was just a matter of compiling on the main PC.
Recommended Posts