Macbook Pro Mid 2014安装Manjaro 19.0.2 Kyria KDE
安装测试时间2020/03/23
用Linux替代macOS的必要性(动机、原因)
- OSX对自由不友好,闭源系统对用户来说缺乏可配置性,不能折腾(mbp上的OSX使用了6年,很稳定很满意,但是用久了也让人厌倦)。
- OSX对隐私不友好(地理位置收集,广告跟踪投放等,无法完全关闭。当然Win10和Google对隐私更不友好),让我考虑转到Linux的最重要的原因是道德层面的考量,支持开源和保护隐私不是一句口号,需要付诸实践。(这里引用Stallman的一句话,一直让我印象深刻:Information, Once Collected, Will Be Misused.)
用Linux替代macOS的可行性
实践出真知,参考: – Arch Wiki: Mac。 – Arch Wiki: HiDPI
备份mac
- 安装前备份/Library/ColorSync/Profiles/Displays/<此处的文件>
- 为了确保启动响铃是关闭的,请提前在Mac OS X系统中就将音量调至静音
通过Manjaro Live System进行硬件检测:
- 蓝牙正常(可与iPhone配对提供网络)
- 屏幕亮度和Apple Logo亮度调节正常,音量调节功能键、键盘亮度调节功能键正常
- 电池容量和健康程度检测正常
- FaceTime摄像头没有驱动(没有关系,即使是在OSX下也几乎没用过摄像头)
- 无线网卡为Broadcom 4360,不能直接被内核驱动,安装broadcom-wl-dkms后正常
- 触摸板正常
- 合盖睡眠正常
- 开机键正常
- Speaker和有线耳机正常
安装Manjaro 19.0.2 Kyria KDE后使用测试:
- KDE PLASMA Desktop Environment开机内存占用500M以下
- 发热和fan control正常
- 电量测试1(10:35 85% 12:00 50%,屏幕满亮度,键盘满亮度,开启蓝牙,无wifi,0音量vlc播放flv40分钟)
- 电量测试2(11:14 85% 12:11 68% 12:56 55% 1:17 50% 2:09 34% 2:34 26%,正常浏览网页、编辑文档及配置系统)
结论
完美使用,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`.