Enable Video hardware Acceleration in Chrome / Chromium / Firefox on Ubuntu 20.04

This post keep tracking my test enabling video hardware acceleration on Ryzen 2200g and Intel i5-6500 using integrated graphic card.

Table of Contents

  1. Quick Guide
  2. Testing Video Hardware Acceleration on Chrome
    1. GPU Supported Video Codec
    2. Use CloudReady to Test
    3. Test Procedure
    4. CloudReady Test Result
  3. Testing Video Hardware Acceleration on Firefox
  4. Terminology
    1. Vulkan, VA-API, & VD-PAU
    2. ANGLE
  5. Installation & Configuration
    1. GPU Drivers
    2. Monitor Tools
    3. Chrome & Chromium
    4. Firefox
  6. Final Thoughts
  7. Reference

Quick Guide

  1. No huge performance advantage when hardware accelerated video decode has been enabled in Chomre/chromium on i5-6500 and J3455. The CPU usage is still high to me.
  2. Fail to enable hardware accelerated video decode with Ryzen 2200g
  3. It’s easier to test using CloudReady to know if the hardware accelerated video decode feature in Chrome/Chromium is supported.
  4. Some video issues if hardware accelerated video decode is enabled on Ubuntu 20.04LTS.
Continue reading “Enable Video hardware Acceleration in Chrome / Chromium / Firefox on Ubuntu 20.04”

Turn Off LED on msi Motherboard

Table of Contents

  1. Quick Guide
  2. Install msi-rgb
  3. Turn Off Immediatedly
  4. Turn Off on Start
  5. Turn Off After Resume
  6. Reference

Quick Guide

  1. Get and install nagisa’s msi-rgb utlity for msi motherboards.
  2. OpenRGB is an alternative solution and supports more motherboards.
  3. Turn off by running ‘sudo /home/amigo/msi-rgb/target/release/msi-rgb -x 00000000 00000000 00000000‘.
  4. Use crontab to turn off after boot.
  5. Create a shell script in /lib/systemd/system-sleep/ to turn off after resume.
Continue reading “Turn Off LED on msi Motherboard”

Prepare the LAMP Development Environment with VisualStudio Code and VirtualBox

For PHP development, I preferred to code in the host and run in the guest OS. It helps to keep the host clean and stable. Because PHP and APEX[1] are both required, I switch from NetBeans to Visual Studio Code.

  1. Install and Configure Visual Studio Code and PHP Extensions
  2. Import and Configure TurnKey LAMP Stack
Continue reading “Prepare the LAMP Development Environment with VisualStudio Code and VirtualBox”

Build the Linux Kernel Module to Enable RTL8811CU/RTL8821CU USB Wireless Dongles

There is no built-in support for Realtek RTL8811CU[1][2] and RTL8821CU[3] in Ubuntu 20.04 LTS. The later also has a Bluetooth controller. I have to download the RTL8811CU/RTL8821CU driver source code, compile to a kernel module, add it to the kernel, and switch to the WiFi USB mode.

The following USB wireless dongle uses the RTL8811CU chipset:

  1. TOTOLINK A650UA[4]

Quick Summary

For Ubuntu 18.04 LTS and 20.04LTS, follow these steps:

$sudo apt-get update
$sudo apt-get install dkms git
$git clone https://github.com/brektrou/rtl8821CU.git
$cd ~/rtl8821CU
$sudo ./dkms-install.sh
$sudo /usr/sbin/usb_modeswitch -KW -v 0bda -p 1a2b

If the usb_modeswitch doesn’t work, check the vendor and product id:

$sudo modprobe 8821cu
$lsusb

If it works, make it work automatically:

$sudo vi /lib/udev/rules.d/40-usb_modeswitch.rules
/1a2b
# D-Link DWA-171 Wifi Dongle
#ATTR{idVendor}=="0bda", ATTR{idProduct}=="1a2b", RUN+="usb_modeswitch '/%k'"

# TOTOLINK A500UA
ATTR{idVendor}=="0bda", ATTR{idProduct}=="1a2b", RUN+="/usr/sbin/usb_modeswitch -K -v 0bda -p 1a2b"

For RTL8821CU, run systemctl start bluetooth.service to enable Bluetooth.

Continue reading “Build the Linux Kernel Module to Enable RTL8811CU/RTL8821CU USB Wireless Dongles”

Build the Linux Kernel Module to Enable RTL8192EU USB Wireless Dongles

The built-in support for Realtek RTL8192EU[1][2] in Ubuntu 20.04 LTS has some issues with D-Link DWA-131 E1[3]. It provides a weak signal and slow WiFi. To improve, I have to download the RTL8192EU driver source code, compile to a kernel module, add it to the kernel, remove the existing drivers, and fix the detection issue.

The following USB wireless dongle uses the RTL8192EU chipset:

  1. D-Link DWA-131 E1

Quick Summary

For Ubuntu 18.04 LTS and 20.04LTS, follow these steps:

$sudo apt-get update
$sudo apt-get install dkms git
$git clone https://github.com/Mange/rtl8192eu-linux-driver
$cd ~/rtl8192eu-linux-driver
$sudo rmmod 8192eu
$sudo rmmod rtl8xxxu
$sudo dkms remove rtl8192eu/1.0 --all
$sudo dkms add .
$sudo dkms install rtl8192eu/1.0
$sudo depmod -a
$echo "blacklist rtl8xxxu" | sudo tee /etc/modprobe.d/rtl8xxxu.conf
$echo -e "8192eu\n\nloop" | sudo tee /etc/modules
$echo "options 8192eu rtw_power_mgnt=0 rtw_enusbss=0" | sudo tee /etc/modprobe.d/8192eu.conf
$sudo update-grub
$sudo update-initramfs -u;
$sudo shutdown -r now
Continue reading “Build the Linux Kernel Module to Enable RTL8192EU USB Wireless Dongles”

Manage Ubuntu Kernels

Display and peripheral issues are always related to the kernel drivers and modules. Upgrade to a newer kernel version might help.

There are many tools to manage kernels[1]:

  1. Manage with the ubuntu-mainline-kernel.sh[2]
  2. Manage with the Ubuntu Mainline Kernel Installer[3]
  3. Manage with dpkg[4]
  4. Low Latency vs Generic Kernel
  5. Upgrade to a Low Latency Kernel
  6. The GRUB[5] Configuration
  7. Remove Unused Kernel
Continue reading “Manage Ubuntu Kernels”

Build the Linux Kernel Module to Enable RTL8812AU USB Wireless Dongles

There is no built-in support for Realtek RTL8812AU[1][2] in Linux. To enable, I have to download the RTL8122AU driver source code, compile to a kernel module, and add to the kernel.

Following USB wireless dongles use the RTL8812AU chipset:

  1. D-Link DWA-171 A1[3]
  2. Edimax EW-7811UTC[4]
  3. netis WF2190[5]
  4. TP-Link Archer T2U Ver 3.0 (RTL8811AU)

Quick Summary

For Ubuntu 18.04 LTS and 20.04LTS, follow these steps:

$sudo apt-get update
$sudo apt-get install dkms git
$git clone https://github.com/aircrack-ng/rtl8812au.git
$cd ~/rtl8812au
$sudo make dkms_install
$sudo modprobe 88XXau

Continue reading “Build the Linux Kernel Module to Enable RTL8812AU USB Wireless Dongles”

Remote Access VM on VirtualBox from Google Chrome

I need to run a Windows desktop application to keep track of my expanse. Because CodeWeavers needs Android and Asus ChromeBox CN60 doesn’t have Android support yet according to the list, the only solution is remote access.

My experiment with QNAP Virtualization Station is good but it loses keyboard input sometimes. I have to refresh the page to get it back again. Therefore, I give phpVirtualBox a shot.

Eventually, I realize the lack of RDP-compatible client on ChromeOS makes it impossible to access VirtualBox from CN60.

Continue reading “Remote Access VM on VirtualBox from Google Chrome”