Macbook Pro Mid 2014安装Manjaro 19.0.2 Kyria KDE

安装测试时间2020/03/23

用Linux替代macOS的必要性(动机、原因)

用Linux替代macOS的可行性

实践出真知,参考: – Arch Wiki: Mac。 – Arch Wiki: HiDPI

备份mac

通过Manjaro Live System进行硬件检测:

安装Manjaro 19.0.2 Kyria KDE后使用测试:

结论

完美使用,Perfect!


具体配置

sudo pacman-mirrors -i -c China -m rank
sudo pacman -Syyu
# 安装无线网卡驱动
sudo pacman -S broadcom-wl-dkms dkms linux-headers
# 解决高分辨率显示的问题
System Settings -> Display Configuration -> Global Scale
vim ~/.bash_profile
export PLASMA_USE_QT_SCALING=1
# 一些应用软件
copy cryptomator geph tor-browser miniconda3
sudo pacman -S yay vim goldendict keepassxc telegram-desktop
sudo pacman -Rns cantata skanlite vlc konversation kdeconnect k3b  steam-manjaro
oh my zsh
# 中文输入法
sudo pacman -S fcitx-im fcitx-configtool fcitx-googlepinyin
vim ~/.xprofile
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx
注销重新登录,打开fcitx,打开configuration,添加Google pinyin
# 终端走代理(使用的迷雾通)
export http_proxy=http://127.0.0.1:9910
export https_proxy=http://127.0.0.1:9910
git config --global http.proxy 'socks5://127.0.0.1:1080' 
git config --global https.proxy 'socks5://127.0.0.1:1080'
yay megasync cryptomator google-chrome netease-cloud-music wps-office wps-office-cn ttf-wps-fonts ttf-ms-fonts wps-office-mime-cn wps-office-mui-zh-cn xmind-2020 acroread foxitreader baidunetdisk-bin
# 交换Cmd和Alt的位置
/etc/modprobe.d/hid_apple.conf
options hid_apple swap_opt_cmd=1
# You then need to regenerate the initramfs and reboot. 
# 使用conda
conda info
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r/
conda config --set show_channel_urls yes
conda update conda
conda create -n pytorch
conda activate pytorch
conda install pytorch torchvision cudatoolkit=10.1 -c https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch
conda install jupyterlab
jupyter-lab
# test
from __future__ import print_function
import torch
x = torch.rand(5, 3)
print(x)
torch.cuda.is_available()
#如果是win10双系统,需要禁用快速启动
在电源选项里,电源按钮。
Filelight
/var/cache/pacman/pkg 3个G
清除未安装软件包的缓存:`pacman -Sc`
`pacman -Scc` 可以清理所有缓存
yay -S wps-office ttf-wps-fonts
yay -S deepin-wine-tim #hidpi字体太小,不能记住密码等问题
# env WINEPREFIX="$HOME/.deepinwine/Deepin-TIM" winecfg,在Graphics选项卡中修改dpi,如 修改为210,这样应该能解决
yay -S deepin-wine-wechat
# env WINEPREFIX="$HOME/.deepinwine/Deepin-WeChat" winecfg

维护

清理空间:使用Filelight 如/var/log/journal占了2G,使用sudo journalctl --vacuum-time=2d 如/var/cache/pacman/pkg/占了2G,使用sudo paccache -r来保留the most recent 3 version,Enable and start paccache.timer to discard unused packages weekly, sudo systemctl start paccache.timer, sudo systemctl enable paccache.timer, 最直接暴力的方法sudo pacman -Sc', 'sudo pacman -Scc' 如~/.cache/yay占了2G,使用yay -Sc --aur 删除orphan:sudo pacman -Rns $(pacman -Qtdq) 风扇散热问题:安装mbpfan-aur,enable mbpfan.service,设置/etc/mbpfan.conf风扇最小转速 安装lm-sensors检测主板和CPU温度。 禁用baloo_file_indexer,balooctl suspend,balooctl disable`.