1

I've installed Elementary OS for web development and android development. I usually work with Vscode, terminal and multiple chrome tabs opened. I'm pretty sure that my laptop can handle it. I face lags in vscode and in chrome. Android Studio is also pretty lagging.

Spec: 8gb Ram, AMD A10 processor, Dedicated Graphics. AMD 530 Graphics 2gb, Installed OS on SSD. Dual boot with Windows 10

11
  • Open terminal, type uname -a then type sudo update-initramfs -u and provide results. – Sysadmin Jul 11 '20 at 5:29
  • uname -a Linux vsskamal 5.3.0-62-generic #56~18.04.1-Ubuntu SMP Wed Jun 24 16:17:03 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux update-initramfs: Generating /boot/initrd.img-5.3.0-62-generic W: Possible missing firmware /lib/firmware/amdgpu/navi10_mes.bin for module amdgpu I: The initramfs will attempt to resume from /dev/sdb6 I: (UUID=7742a678-cc87-4fd7-bda8-8cce92408272) I: Set the RESUME variable to override this. – vsskamal Jul 11 '20 at 6:37
  • Check which GPU is in use. See this thread. unix.stackexchange.com/questions/16407/… I am wondering will kernel upgrade to 5.7.7 will solve your problem. I have a tutorial for the kernel update. But first check which GPU is in use and let me know. They provided commands which will let you to check this in terminal. – Sysadmin Jul 11 '20 at 7:01
  • lspci -vnnn | perl -lne 'print if /^\d+\:.+(\[\S+\:\S+\])/' | grep VGA 00:01.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Wani [Radeon R5/R6/R7 Graphics] [1002:9874] (rev ca) (prog-if 00 [VGA controller]) – vsskamal Jul 11 '20 at 9:04
  • Your primary GPU is Radeon and is working. OK. Then the only solution I have is a kernel upgrade. – Sysadmin Jul 11 '20 at 16:58
0

How to upgrade Elementary OS to the newest kernel.

Install necessary packages
sudo apt-get install build-essential libncurses-dev bison flex libssl-dev libelf-dev
Make directory for kernel
sudo mkdir /home/yourusername/Downloads/kernel
Download kernel 5.7.8
cd /home/username/Downloads/kernel
wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.7.8.tar.xz
tar -xf linux-5.7.8.tar.xz
cd linux-5.7.8
cp -v /boot/config-$(uname -r) .config
make menuconfig

Save config and then exit. Use tab button to select first the save button, then, OK, then Exit, and once again exit.

use 4 core/thread - if your processor have 4 cores
make -j 4
use 8 core/thread - if your processor have 8 cores
make -j 8
Type in terminal
sudo make modules_install 
sudo make install 
sudo update-initramfs -c -k 5.7.8
ignore these errors below, just because those three bin files are not made yet
W: Possible missing firmware /lib/firmware/amdgpu/navi12_ta.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/navi10_mes.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/navi12_dmcu.bin for module amdgpu
Update grub entries and restart the computer
sudo update-grub
sudo reboot

After restart open terminal and type, to check the kernel version:

uname -mrs
to check errors after reboot:
sudo journalctl -xb
sudo dmesg
17
  • Wifi not working after upate and boot time increased. W: Possible missing firmware /lib/firmware/rtl_nic/rtl8125a-3.fw for module r8169 W: Possible missing firmware /lib/firmware/rtl_nic/rtl8168fp-3.fw for module r8169 W: Possible missing firmware /lib/firmware/amdgpu/navi12_ta.bin for module amdgpu W: Possible missing firmware /lib/firmware/amdgpu/navi10_mes.bin for module amdgpu W: Possible missing firmware /lib/firmware/amdgpu/navi12_dmcu.bin for module amdgpu – vsskamal Jul 12 '20 at 8:01
  • Ok. You need to install firmware for Wi-Fi adapter. I will provide a tutorial. – Sysadmin Jul 12 '20 at 9:05
  • Tutorial for missing Realtek added. Let me know does Wi-Fi work after restart and write about system behavior. Do you still have lags? – Sysadmin Jul 12 '20 at 9:29
  • Wifi still not fixed. Yes, I'm having lags while opening new tabs in google chrome, when alt + tab. lags in vs code, and some IDE's. Nothing's changed I guess. Weirdly I'm getting some errors while booting. It takes around 20-30 seconds and it showing this error. imgur.com/a/Kg2KUwm after that it showing elementary os symbol. I'm on SSD. I don't know why it's taking that much time. – vsskamal Jul 12 '20 at 11:01
  • Did you install firmware for Wi-Fi? I provided tutorial. – Sysadmin Jul 12 '20 at 11:03
0

How to install Realtek firmware

Make directory for Realtek firmware
mkdir /home/username/Downloads/rtl
Enter directory for Realtek firmware
cd /home/username/Downloads/rtl
Download Realtek firmware
wget https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/rtl_nic/rtl8168fp-3.fw
wget https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/rtl_nic/rtl8125a-3.fw
Copy Realtek firmware to proper firmware directory in system
sudo cp rtl8168fp-3.fw /lib/firmware/rtl_nic 
sudo cp rtl8125a-3.fw /lib/firmware/rtl_nic
Update initramfs:
sudo update-initramfs -c -k 5.7.8
update GRUB:
sudo update-grub
check kernel version after reboot:
uname -mrs
check errors after reboot:
sudo journalctl -xb
sudo dmesg
0

How to install Realtek Wi-Fi drivers manually

Type in terminal:

cd
mkdir /home/username/Downloads/realtek
cd /home/username/Downloads/realtek
sudo apt-get install --reinstall git dkms build-essential linux-headers-5.3.0-62
git clone https://github.com/tomaspinho/rtl8821ce
cd rtl8821ce
sudo chmod +x dkms-install.sh
sudo chmod +x dkms-remove.sh

Type to install:

cd /home/username/Downloads/realtek/rtl8821ce
sudo ./dkms-install.sh

Type to remove if you will have to remove it after the reboot.

cd /home/username/Downloads/realtek/rtl8821ce
sudo ./dkms-remove.sh
7
  • When I run this cmd sudo apt-get install --reinstall git dkms build-essential linux-headers-$(uname -r) I'm getting this errors Reading state information... Done E: Unable to locate package linux-headers-5.7.8 E: Couldn't find any package by glob 'linux-headers-5.7.8' E: Couldn't find any package by regex 'linux-headers-5.7.8' – vsskamal Jul 12 '20 at 11:57
  • Try : sudo apt-get install --reinstall git dkms build-essential linux-headers-5.3.0-62 – Sysadmin Jul 12 '20 at 12:00
  • sudo ./dkms-install.sh About to run dkms install steps... Error! DKMS tree already contains: rtl8821ce-v5.5.2_34066.20200325 You cannot add the same module/version combo more than once. Module rtl8821ce/v5.5.2_34066.20200325 already built for kernel 5.7.8/4 Module rtl8821ce/v5.5.2_34066.20200325 already installed on kernel 5.7.8/x86_64 Finished running dkms install steps. – vsskamal Jul 12 '20 at 12:03
  • Hah, so you have the module for Wi-Fi already installed and it is not working. Then the only choice is to choose older linux kernel version when GRUB shows after the computer start. And then remove the kernel you previously installed 5.7.8. I will provide a tutorial how to remove it safely. Also check the swappiness with this command: sysctl vm.swappiness How much free memory you have: free -h And the swap size with these two commands: df -Th /swap grep -i swap /etc/fstab – Sysadmin Jul 12 '20 at 12:10
  • sysctl vm.swappiness vm.swappiness = 60 free -h total used free shared buff/cache available Mem: 7.3G 1.7G 737M 270M 4.9G 5.1G Swap: 4.9G 0B 4.9G df -Th /swap grep -i swap /etc/fstab df: /swap: No such file or directory df: grep: No such file or directory df: swap: No such file or directory Filesystem Type Inodes IUsed IFree IUse% Mounted on /dev/sdb5 ext4 8.2M 489K 7.7M 6% / – vsskamal Jul 12 '20 at 12:15
0

How to safely remove 5.7.8 kernel

cd /var/lib/initramfs-tools/
sudo rm -rf 5.7.8
cd /boot
sudo apt --purge remove linux-image-5.7.8
sudo rm -f config-5.7.8
sudo rm -f initrd.img-5.7.8
sudo rm -f System.map-5.7.8
sudo rm -f vmlinuz-5.7.8
sudo update-initramfs -u -k all
sudo update-grub
sudo systemctl reboot
sudo apt update && sudo apt upgrade && sudo apt dist-upgrade && sudo apt autoremove && sudo apt autoclean
sudo purge-old-kernels
sudo apt --purge autoremove
sudo update-initramfs -u -k all
sudo update-grub
sudo systemctl reboot

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.