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”

How to Use AdGuard Protected Public DNS on Routers and Mobile Devices

Table of Contents

  1. Quick Guide
  2. Feedback from Communities
  3. How it works
  4. AdGuard Home and AdGuard DNS
  5. Use in a Router
  6. Use in Asus RT-AC1200G+
  7. Use in Huawei B311As-853
  8. Use in Android Devices
  9. Use in iOS Devices
  10. Reference

Quick Guide

  1. AdGuard Protected DNS: 94.140.14.14, 94.140.15.15.
  2. AdGuard Protected DNS-over-TLS: dns.adguard.com
  3. The WAN DNS is the DNS used by the router.
  4. The DHCP DNS is the DNS assigned to the DHCP client.
  5. SSH login and run ‘nvram set dhcp_dns1_x=94.140.14.14 ; nvram set dhcp_dns2_x=94.140.15.15 ; nvram commit ; service restart_dnsmasq‘ to change the DHCP DNS in RT-AC1200G+
  6. On Android, create a Private DNS with the DNS-over-TLS in Android 9 and newer.
  7. On iOS, assign the DNS SERVERS in the WiFi connection.
Continue reading “How to Use AdGuard Protected Public DNS on Routers and Mobile Devices”

Style Guide

Styles

StyleDescription
[reference number]Source links are managed in the reference section
[icon, button, and menu item name]Clickable or selectable items
“field and label name, messages”Fixed text strings
‘input string, code, command, command parameters, and url’User-editable text strings
command name, script name, application, file/folder name, and post/article sectionName of a command,  option, and item
highlightKey items and conclusion
<?php echo'';>
PHP color coding with line numbers
$ls -la
bash in colors

Symboles

NameSymbole
Next➞ U+279E
Arrow Key→U+2192
←U+2190
↑U+2191
↓U+2193
Command
Do not disturb
Dot in the middle
Information
Settings
Space

The Max Power for an ATX 4-Pin CPU Power Connector is 108W

Because the i5-9400F consumes 80W at-wall while loading 300 tabs in Chrome, which is a huge jump from 30W at idle, I want to know if it is safe using the only 4-pin CPU power connector on Gigabyte H310M S2V 2.0 (rev. 1.0).

I checked the 4.2.2.3 +12V CPU Power Connector (Required) in Single Rail Power Supply ATX12VO Design Guide and 4.2.2.5 +12V Power Connector in Power Supply Design Guide for Desktop Platform Form Factors. Molex 39012040 and 444761112 are used on the PSU and 39299042 on the motherboard.

The maximum current can be found in the Part DetailsElectricalCurrent – Maximum per Contact on their datasheet respectively:

  1. molex 39012040: 13.0A
  2. molex 444761112: 11.0A
  3. molex 39299042: 9.0A

Because the voltage is 12V and the minimum curent of the above parts is 9.0A, the maximum power is 12V x 9.0A = 108W.

Style Guide

The Style used in AmigoTechNotes

Reference

  1. Intel: Single Rail Power Supply ATX12VO Design Guide
  2. Intel: Power Supply Design Guide for Desktop Platform Form Factors
  3. molex: 39012040
  4. molex: 444761112
  5. molex: 39299042

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”