Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@xiaolai
Last active September 25, 2021 07:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xiaolai/0dd2d7546dd1931f40b4e674d0e11d82 to your computer and use it in GitHub Desktop.
Save xiaolai/0dd2d7546dd1931f40b4e674d0e11d82 to your computer and use it in GitHub Desktop.
UBUNTU@RedmiBook

禁用睡眠

systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target

启用睡眠

systemctl unmask sleep.target suspend.target hibernate.target hybrid-sleep.target

盖板动作

sudo nano /etc/systemd/logind.conf 

修改 #HandleLidSwitch=suspend

  • HandleLidSwitch=poweroff 在合上盖板时计算机关机
  • HandleLidSwitch=hibernate 在合上盖板时计算机休眠
  • HandleLidSwitch=suspend 在合上盖板时计算机挂起
  • HandleLidSwitch=ignore 不进行任何操作

保存该文件并通过键入 systemctl restart systemd-login 重新启动服务以应用更改。

为 wifi 设置驱动程序

mokutil --disable-validation

按照指示,设置一个临时的八位以上的密码... 一会儿重启的时候会用到。

重新启动,在蓝色屏幕里,选择 DISABLE SECURE BOOT —— 这时需要刚刚设置的密码,会陆续随机要求你输入“第几位字符”……

联网下载驱动

git clone https://github.com/lwfinger/rtw89.git
cd rtw89
make
sudo make install
sudo mkdir /usr/lib/firmware/rtw89
sudo cp rtw8852a_fw.bin /usr/lib/firmware/rtw89
sudo modprobe rtw89pci

SauceCode Pro Nerd Fonts

Nerd Fonts download page

wget https://github.com/ryanoasis/nerd-fonts/releases/download/v2.1.0/SourceCodePro.zip
unzip SourceCodePro.zip
fc-cache -fv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment