事情的真相并不一定是你看到的，你看到的，只能代表你能够看到的。
安装nvidia-open-dkms(依赖会自动安装nvidia-utils, linux-headers 如果没有也要安装）查询glxinfo -Bnvidia-smiX11/xorg查看是否存在/etc/X11/xorg.conf如果没有，使用nvidia-xconfig自动生成一份记得里面需要xserver路径(没有手动修改）：Section "Files" ModulePath "/usr/lib/nvidia/xorg" ModulePath "/usr/lib/xorg/modules" EndSectionwayland查看是否加载nvidia_drm没有的话方式有二：1, 创建文件/etc/modprob.d/nv_wayland.confoptions nvidia_drm modeset=1\#options nvidia NVreg_PreserveVideoMemoryAllocations=12, # /etc/default/grubGRUB_CMDLINE_LINUX="nvidia-drm.modeset=1"grub-mkconfig -o /boot/grub/grub.cfg//?手动增加mkinitcpio -p linux(arch版本update-initramfs)470-510版本还需要ln -s /dev/null /etc/udev/rules.d/61-gdm.rules判断是否设置成功：（必须为Y）cat /sys/module/nvidia_drm/parameters/modeset
下载archlinux镜像文件rufus写盘https://mirrors.ustc.edu.cn/archlinux/iso/latest/archlinux-x86_64.iso进入Live先关闭reflector，因为它会自动修改源顺序systemctl stop reflectorping一下，没连网无线网卡使用wpa_supplicant或iwctl连网iwctl #进入到#[iwctl]后 station wlan0 scan #默认网卡驱动都是wlan0 station wlan0 get-networks #获取可连接wifi列表 station wlan0 connect 你要连接的wifi名 #输入密码 quit #退出 #测试网络连接 ping baidu.com同步电脑时间timedatectl set-timezone Asia/Shanghai使用fdisk -l查看分区情况，使用cfdisk分区，尽量选用UEFI/gpt分区格式/dev/sda1 512MB EFI /dev/sda2 内存大小 swap /dev/sda3 50G linux(/根目录) /dev/sda4 200G linux(/home)mkfs.fat -F 32 /dev/sda1 mkswap /dev/sda2 && swapon /dev/sda2 mkfs.ext4 /dev/sda3 mkfs.ext4 /dev/sda4 parted -l（查看分区格式）mount /dev/sda3 /mnt mkdir /mnt/home mount /dev/sda4 /mnt/home更新live软件源nano /etc/pacman.d/mirrorlist （第一行加入） Server = https://mirrors.ustc.edu.cn/archlinux/$repo/os/$arch pacman -Syy pacman -S archlinux-keyring脚本安装【内核基础固件驱动等】主要文件到挂载的根目录pacstrap /mnt base base-devel linux linux-firmware linux-headers安装必要软件pacstrap /mnt grub efibootmgr intel-ucode pacstrap /mnt networkmanager dhcpcd openssh vim git bash-completion （amd CPU就装amd-ucode 双系统需要装os-prober)创建, 挂载EFI分区, 并生成fstabmkdir /mnt/boot/efi mount /dev/sda1 /mnt/boot/efi genfstab -U /mnt >> /mnt/etc/fstab cat /mnt/etc/fstab （检查各分区是否都被启动挂载）切根目录arch-chroot /mnt设置时区, 并生成/etc/adjtimeln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime hwclock --systohc生成本地支持环境语言nano /etc/locale.gen 去掉en_US.UTF-8和zh_CN.UTF-8前注释 locale-gen echo "LANG=en_US.UTF-8" > /etc/locale.conf设置ROOT密码和增加用户passwd root useradd -m -G wheel xxx passwd xxx nano /etc/sudoers wheel ALL=(ALL:ALL) NOPASSWD: ALL （去掉前面的#后sudo免密码）安装grub并生成grub.cfg如果双系统，去掉/etc/default/grub文件中这行注释 GRUB_DISKABLE_OS_PROBER=false 传统引导： grub-install --target=i386-pc /dev/sda grub-mkconfig -o /boot/grub/grub.cfg UEFI 引导： grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB grub-mkconfig -o /boot/grub/grub.cfg启动ssh和网络服务systemctl enable sshd systemctl enable NetworkManager systemctl enable dhcpcd安装桌面环境和登陆器， 启动登陆器服务pacman -S gnome gnome-tweaks gdm systemctl enable gdm退出重启exit (退出chroot环境) umount -a reboot进桌面后配置修改为国内源 并 增加32位软件源支持 sudo vim /etc/pacman.conf 增加 [archlinuxcn] SigLevel = Optional TrustAll Server = https://mirrors.ustc.edu.cn/archlinuxcn/$arch 删除前面# [multilib] Include = /etc/pacman.d/mirrorlist sudo pacman -Syyu sudo pacman -S archlinuxcn-keyring 配置~/.bashrc if [ -f /usr/share/bash-completion/bash_completion ]; then . /usr/share/bash-completion/bash_completion fi 安装paru (或yay) sudo pacman -S paru 删除# /etc/paru.conf BottomUp 没有声音: sudo pacman -S alsa-firmware sudo pacman -S sof-firmware sudo pacman -S alsa-ucm-conf 输入法 sudo pacman -S fcitx5 fcitx5-im fcitx5-chinese-addons fcitx5-configtool vim /etc/environment export GTK_IM_MODULE=fcitx5 export QT_IM_MODULE=fcitx5 export XMODIFIERS=@im=fcitx qv2ray缺少libfuse2 libcrypt.so.1 sudo pacman -S fuse2 sudo pacman -S libxcrypt-compat sudo pacman -S gnome-browser-connector AppIndicator and KStatusNotifierItem Support Dash to Panel Desktop Icons(DING) Blur my Shell Burn My Windows Compiz alike magic lamp effect Compiz windows effect gedit //gnome文本编辑器? gnome-nettool //gnome网络工具? file-roller // gnome归档管理器 seahorse //保存程序的PGP密钥 pacman -S alsa-utils pulseaudio pulseaudio-bluetooth sudo pacman -S nvidia nvidia-prime nvidia-settings nvidia-utils opencl-nvidia lib32-nvidia-utils lib32-opencl-nvidia libva-vdpau-driver sudo pacman -S nvidia-open nvidia-settings lib32-nvidia-utils sudo pacman -S nvidia-open-dkms optimus-manager optimus-manager --switch nvidia nvidia-xconfig nvidia-smi yay -S mutter-x11-scaling gsettings set org.gnome.mutter experimental-features "['x11-randr-fractional-scaling']" pacman -S sof-firmware sof-tools alsa-ucm-conf https://wiki.archlinuxcn.org/wiki/ http://blog.chinaunix.net/uid-25906175-id-3072940.html https://www.bilibili.com/read/cv20753052///微信需要的字体sudo pacman -S wqy-microheisudo pacman -S adobe-source-han-serif-cn-fontssudo pacman -S adobe-source-han-sans-cn-fontssudo pacman -S ttf-robotosudo pacman -S noto-fontssudo pacman -S noto-fonts-cjksudo pacman -S ttf-dejavu~/.config/fontconfig/fonts.conf 或 /etc/fonts/local.conf：<?xml version="1.0"?> <its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0"> <its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]" /> </its:rules> Android Font Config /usr/share/fonts /usr/local/share/fonts fonts ~/.fonts false serif Noto Serif sans-serif Roboto monospace DejaVu Sans Mono zh serif Source Han Serif CN zh sans-serif Source Han Sans CN zh monospace Noto Sans Mono CJK SC WenQuanYi Zen Hei Source Han Sans CN WenQuanYi Micro Hei Source Han Sans CN WenQuanYi Micro Hei Light Source Han Sans CN Microsoft YaHei Source Han Sans CN SimHei Source Han Sans CN SimSun Source Han Serif CN SimSun-18030 Source Han Serif CN conf.d /var/cache/fontconfig fontconfig ~/.fontconfig 30