11/02/2020

No wifi adapter found on Linux Ubuntu 18.04

 Run this command:

rfkill

D TYPE      DEVICE      SOFT      HARD

 0 bluetooth hci0   unblocked unblocked

 1 wlan      phy0   unblocked unblocked

If the wlan is hardware blocked, need to goto BIOS settings and change the wireless adapter to enabled.
For example, the Asrock X399, need to goto the BIOS and find South Bridge to change the wireless from Auto to Enabled. 

8/12/2020

Qt related knowledge

sudo apt install qt5-default

File paths:
/usr/lib/x86_64-linux-gnu/qt5/qt.conf: contains a list of file paths.
[Paths]
Prefix=/usr
ArchData=lib/x86_64-linux-gnu/qt5
Binaries=lib/qt5/bin
Data=share/qt5
Documentation=share/qt5/doc
Examples=lib/x86_64-linux-gnu/qt5/examples
Headers=include/x86_64-linux-gnu/qt5
HostBinaries=lib/qt5/bin
HostData=lib/x86_64-linux-gnu/qt5
HostLibraries=lib/x86_64-linux-gnu
Imports=lib/x86_64-linux-gnu/qt5/imports
Libraries=lib/x86_64-linux-gnu
LibraryExecutables=lib/x86_64-linux-gnu/qt5/libexec
Plugins=lib/x86_64-linux-gnu/qt5/plugins
Qml2Imports=lib/x86_64-linux-gnu/qt5/qml
Settings=/etc/xdg
Translations=share/qt5/translations

7/30/2020

How to increase font line space

for i in `ls *.ttf`; do echo $i; font-line percent 130 $i; done
https://github.com/source-foundry/font-line

5/26/2020

网易云音乐 Netease Cloud Music登录不能保持

find ~/.config/netease-cloud-music -exec sudo chown $USER:$USER {} +
find ~/.config/netease-cloud-music -exec sudo chmod 755 {} +
find ~/.cache/netease-cloud-music -exec sudo chown $USER:$USER {} +
find ~/.cache/netease-cloud-music -exec sudo chmod 755 {} +

5/24/2020

Ubuntu 18.04 fix mouse and fix wifi

If the bluetooth mouse doesn't work properly:
sudo add-apt-repository ppa:bluetooth/bluez
sudo apt install bluez

To fix it temporarily:
#!/bin/bash
sudo service bluetooth restart

If the WIFI adapter is lost after resume or hibernation:
#! /bin/bash

# Little sleep for safety (??)
sleep 5;

# Remove all of the wifi modules from the kernel
sudo modprobe -r mwifiex_pcie;
sudo modprobe -r mwifiex;
sudo modprobe -r cfg80211;

# Re-add all of the wifi modules
sudo modprobe -i cfg80211;
sudo modprobe -i mwifiex;
sudo modprobe -i mwifiex_pcie;

# Restart netmanager
sudo service NetworkManager restart;

5/11/2020

Enable Ubuntu 18.04/22.04 hibernate

To make things easy: create a swap drive instead of using a swap file.

In the BIOS settings: disable secure boot FIRST.

Then follow: https://www.geeksforgeeks.org/how-to-enable-hibernate-in-ubuntu-22-04-lts/

Edit the file /etc/systemd/sleep.conf with the following configuration:


[Sleep]
HibernateMode=shutdown


Enable the hibernation menu:

sudo gedit /etc/polkit-1/localauthority/50-local.d/com.ubuntu.desktop.pkla
 
[Enable hibernate in upower]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes

[Enable hibernate in logind]
Identity=unix-user:*
Action=org.freedesktop.login1.hibernate;org.freedesktop.login1.handle-hibernate-key;org.freedesktop.login1;org.freedesktop.login1.hibernate-multiple-sessions;org.freedesktop.login1.hibernate-ignore-inhibit
ResultActive=yes