详细安装教程请参考arch wiki Installation guide (简体中文),此处只记录安装后遇到的问题.
暗影精灵2 PRO 静音LED不起作用和左边耳机会有噼里啪啦声:
具体解决方法我已经写到archwiki里了,请看: Laptop/HP#HP_Omen_15_ax210TX
grub更新菜单
1 | grub-mkconfig -o /boot/grub/grub.cfg |
安装os-prober让grub检测到其他系统并自动创建引导
1 | pacman -S os-prober |
使用system-boot(就是直接使用linux内核引导系统,不再需要grub,如果有多系统不推荐,会把efi分区搞得很乱):
1 | pacman -S efibootmgr dosfstools |
关于efi的部分可以看我的另一贴.
arch 安装应用后 应用菜单不刷新怎么办(这个正常情况是不会遇到的,只是刚装完有些功能不完整会这样,我就遇到了):
1 | kbuildsycoca5 --noincremental |
新增用户[1]:
首先添加一个用户,并把它加到wheel组
1 | useradd -m -G wheel -s /bin/bash [用户名] |
然后为这个用户设置密码
1 | passwd [用户名] |
最后设置wheel组的用户能用sudo获取root权限:
1 | visudo |
关闭NetworkManager网络检查(ping.archlinux.org有时候会被墙-_-)
NetworkManager#Checking_connectivity
启用dhcp自动获取网络地址,不然开机无法自动联网
1 | systemctl enable dhcpcd.service |
如果只使用有线网络 可以使用Systemd-networkd
——以下已包含dhcp的功能,下面两条命令包括上面那个的功能——
1 | pacman -s networkmanager |
安装一个图形界面,比如kde
1 | pacman -S plasma-desktop |
缩略图生成
若要在桌面和 Dolphin 内为媒体或文档文件生成缩略图,安装 kdegraphics-thumbnailers
,ffmpegthumbs
。
1 | pacman -S kdegraphics-thumbnailers ffmpegthumbs |
一些gtk应用的plasma panel托盘图标模糊且右键菜单比较奇怪
解决方法: 安装libappindicator-gtk3 libappindicator-gtk2
1 | pacman -S libappindicator-gtk3 libappindicator-gtk2 |
安装一个终端,不然进入图形界面只能进tty输入命令
1 | pacman -S konsole |
无法检测到蓝牙适配器:
安装bluez
,bluez-utils
1 | pacman -S bluez bluez-utils |
首先确定内核的蓝牙模块已载入
1 | modinfo btusb |
如果没有的话就是没载入,手动载入:
1 | modprobe btusb |
开启bluetooth服务
1 | systemctl start bluetooth |
开机后自动启动:
修改 /etc/bluetooth/main.conf
1 | [Policy] |
已知问题:
有时候会崩溃,且无法找到蓝牙适配器,使用dmesg
查看错误日志.
蓝牙耳机可能载入模块失败
1 | pactl load-module module-bluetooth-discover |
临时解决方法:
1 | pactl unload-module module-bluetooth-discover |
长期解决方法[2]:
Edit the file:
1 | /etc/pulse/default.pa |
and comment out (with an # at the beginning of the line) the following line:
1 | load-module module-bluetooth-discover |
now edit the file:
1 | /usr/bin/start-pulseaudio-x11 |
and after the lines:
1 | if [ x”$SESSION_MANAGER” != x ] ; then |
add the following line:
1 | /usr/bin/pactl load-module module-bluetooth-discover |
This way the Pulse audio’s Bluetooth modules will not be downloaded at boot time but after x11 is started.
字体优化:
有些字体可能看不见,比如 𫔭 𪠸 :
1 | 安装 ttf-hanazono ttf-ume(mincho) 字体 |
不要使用noto和思源黑体的亚洲字体整合包,因为会优先使用日语字体,造成中文大小不一,尽量下载思源黑体的分开的字体包,然后在~/.config/fontconfig/fonts.conf
中将中文的思源黑体设置为第一个,具体设置参考Font_configuration
解决DNS污染问题:
安装dnscrypt-proxy 具体方法参见arch wiki dnscrypt-proxy,使用dnsmasq-china-list排除中国域名
arch 使用pyhon-dlib会提示Undefined symbol: cblas_dtrsm
使用aur或archlinuxcn中的openblas-lapack-git代替pacman源中的cblas,貌似源中的cblas版本太低
自动清除pacman的缓存:
创建/usr/share/libalpm/hooks/clean-pacman-cache.hook
1 | [Trigger] |
ext4分区优化:
有备用电源或者笔记本可以关闭ext4的barriers具体方法参考
Ext4#Turning_barriers_off
调整内核的I/O调度Improving_performance#Changing_I/O_scheduler
The process to change I/O scheduler, depending on whether the disk is rotating or not can be automated and persist across reboots. For example the udev rule below sets the scheduler to none for NVMe, mq-deadline for SSD/eMMC, and bfq for rotational drives:
/etc/udev/rules.d/60-ioschedulers.rules
1 | # set scheduler for NVMe |
deadbeef-git 打开提示plugin cdda.so not found or failed to load
解决方法: 安装 libcddb libcdio
1 | pacman -S libcddb libcdio |
使用anime4k会提示缺少openCL库,安装ocl-icd
1 | pacman -S ocl-icd |
开启powertop的自动优化节省电量:
1 | 安装powertop |
以下shell是禁用usb的休眠,不然鼠标用起来很难受(注意:每个电脑的命令都不同,请自行用powertop查看相应的命令)
1 | Autosuspend for USB device USB Optical Mouse [PixArt] |
rider 需要安装moon(.net framework/.net core)
1 | pacman -S moon |
服务端需要mono-xsp,使用aur安装:
1 | yay -S xsp |
vscode 开发asp.net
:
安装 moon dotnet
1 | pacman -S moon dotnet-sdk |
dotnet 安装 dotnet-dev-certs 生成证书:
1 | dotnet tool install --global dotnet-dev-certs |
export要加入.bashrc 或者每次开始前执行
1 | export PATH="$PATH:/home/[user]/.dotnet/tools" |
生成证书
1 | dotnet dev-certs https |
如果想卸载
1 | dotnet tool uninstall --global dotnet-dev-certs |
编译汇编语言 需要安装nasm
1 | pacman -S nasm |
chrome/chromium 即使已经设置为默认浏览器也会提示设置为默认浏览器:
解决方法:
What has worked for me is go to
Settings -> Applications -> File Associations
and there, filter withhtml
. Then for the entriesxhtml+xml
andhtml
, you can moveGoogle Chrome
to the first position of the preference order.[3]
个人测试 只要把xhtml+xml
的默认开启最高优先级应用设置为chromium/chrome就行了
archLinux进行openGl的开发
安装glfw-x11 glad-c-git
1 | yay -S glfw-x11 glad-c-git |
open GL导入现有模型时需要安装assimp:
1 | pacman -S assimp |
顺便推荐一个glsl的教程: LearnOpenGL CN
python使用tkinter需要安装tk库:
1 | pacman -S tk |
kde设置三指手势:
1 | pacman -S gebaar xdotool |
手动安装mariadb:
运行mariadb/scripts/mariadb-install-db
设置路径(提示失败 路径更改成功):
1 | ./mysqld --datadir="./data" --langdir="./mysql/share" --basedir="./data/base" |
最后
1 | You can start the MariaDB daemon with: |
使用redash:
安装docker-compose
(此处可改docker的root目录,建议谷歌), 手动安装时需要临时使用pwgen
生成密钥,安装完成后可卸载.
安装时参考ubuntu的安装脚本 稍微改改就行了
1 | pacman -S docker-compose pwgen |
遇到以下问题:
1 | Possibly missing firmware for module: aic94xx |
直接使用aur中提供的驱动:
1 | yay -S aic94xx-firmware wd719x-firmware |
为kde spellChecker
添加字典:
1 | sudo pacman -S hunspell-en_US |
wine-wechat 数据文件:
1 | ==> WeChat data will be put into ~/.local/lib/wine-wechat when needed. |
wine-wechat 运行要保证当前运行环境变量为中文,否则无法显示中文字体,即使wine装了中文字体:
1 | LC_ALL=zh_CN.UTF-8 wechat |
使用此Wine-QQ-TIM项目的QQ或者TIM乱码,缺少字体:
1 | sudo pacman -S wqy-microhei |
耳机电流声:
1 | The newer implementation of the PulseAudio sound server uses timer-based audio scheduling instead of the traditional, interrupt-driven approach. |
1 | Static noise when using headphones |
开启alsa的噪音消减模块:
1 | Arch does not load the Pulseaudio Echo-Cancellation module by default, therefore, we have to add it in /etc/pulse/default.pa. First you can test if the module is present with pacmd and entering list-modules. If you cannot find a line showing name: <module-echo-cancel> you have to add |
kde discover 无法使用pacman backenddiscover 使用了 packagekit,使用 pkcon 需要root权限,按理来说packagekit会自动获取root且无需输入密码,但discover无法获取root已无法已root用户运行,问题未知,放弃解决
解决方法:
卸载discover packagekit packagekit-qt5
新安装的话 索性不装就行了
2020年2月4日已解决,重新安装后好了,可能之前是bug,现在修复好了
C++使用openCV:
1 | pacman -S opencv |
traceroute:
1 | 目前使用了ipip.net 的besttrace |
wine 错误0009:err:module:load_so_dll failed to load .so lib "/usr/bin/../lib32/wine/l3codeca.acm.so": libmpg123.so.0: cannot open shared object file: No such file or directory
解决方法:sudo pacman -S lib32-mpg123
包含中国国内软件的winetricks-zh
1 | pacman -S winetricks-zh |
qq軽聊版需要库:
1 | sudo pacman -S lib32-libpulse |
ark 解压7z和rar
1 | 查看可选依赖 |
plasma的鼠标样式有时候会不应用在标题栏和其他地方
1 | I had a similar problem on Arch. |
plasma自带的虚拟桌面指示有些bug而且不好看,代替默认虚拟桌面的指示
1 | yay -S plasma5-applets-virtual-desktop-bar-git |
为arch添加command not found
1 | sudo pacman -S pkgfile |
更新command-not-found数据库
1 | pkgfile -U |
最后在~/.bashrc
添加
1 | source /usr/share/doc/pkgfile/command-not-found.bash |
nethogs: 按进程查看流量占用
coc中c语言自动补全,需要安装ccls:
1 | sudo pacman -S ccls |