Rog 幻14 完美安装 linux: 10小时续航,QQ和微信

2020-11-09  本文已影响0人  上官二狗_e72c

rog幻14 linux完美攻略: 独显关闭, QQ, 微信, FN快捷键.

题记:在幻14上折腾了大半个月,从Arch到Fedora,最后到ubuntu。终于实现了一版比较完美的方案。目前实现的功能有:

  1. 关闭独显,或使用混合模式。
  2. QQ和微信安装。(没办法,公司用)
  3. FN快捷键
  4. 10小时续航。
  5. 中文输入法

目前还有问题的:

  1. 使用内置扬声器播放时,无法调节音量。(可以修改,比较折腾。)

下面开始教程

环境准备

由于公司的服务器系统都是debian系列的,我选用的发行版本是 ubuntu 20.10 unity。
由于目前linux内核对于amd 4000系列的cpu支持都比较差。可以接受的最低版本的内核为5.8.
可以使用的发行版本为:

  1. ubunut 20.10系列
  2. fedora 33
  3. manjaro 20.01
  4. Arch

其他内核低于5.8的发行版,是无法正常使用的。

正常安装系统后,首先进行换源:

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.aliyun.com/ubuntu/ groovy main restricted universe multiverse
# deb-src https://mirrors.aliyun.com/ubuntu/ groovy main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ groovy-updates main restricted universe multiverse
# deb-src https://mirrors.aliyun.com/ubuntu/ groovy-updates main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ groovy-backports main restricted universe multiverse
# deb-src https://mirrors.aliyun.com/ubuntu/ groovy-backports main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ groovy-security main restricted universe multiverse
# deb-src https://mirrors.aliyun.com/ubuntu/ groovy-security main restricted universe multiverse

# 预发布软件源,不建议启用
# deb https://mirrors.aliyun.com/ubuntu/ groovy-proposed main restricted universe multiverse
# deb-src https://mirrors.aliyun.com/ubuntu/ groovy-proposed main restricted universe multiverse

执行命令:

sudo apt update 
sudo apt install git aptitude cargo

安装驱动

目前针对华硕笔记本系列,主要可以使用的驱动程序有rog-core和asus-nb-ctrl.
如果你使用的linux版本内核低于5.8,需要自己编译相关的内核补丁。

虽然rog-core已经进入archive状态,但是我个人觉得rog-core提供的功能已经够用了,并且足够稳定,所以我使用的是rog-core。

git clone https://github.com/flukejones/rog-core.git

cd rog-core

make

sudo make install 

在编译时,有可能中间会报缺少依赖的错误。使用apt将相关的依赖装上。

安装完成后,这时,systemd中应该有一个rog-core的服务。启动该服务。

systemctl enable rog-core
systemctl start rog-core

这时,键盘上的FN快捷键应该都是好使的了。并且可以调节风扇的转速。

rog-core -f silent

我一般都是把风扇调节为安静模式。

中文环境和输入法安装.

打开系统设置中的语言支持,会提示安装缺失的语言包。确定。安装完成后,安装中文输入法。我这边使用的中文输入法是fcitx-rime。

sudo apt install fcitx-rime

安装完成后,将下面的键盘输入系统改为fcitx.

重启机器。

reboot

启动后,使用super+空格就应该可以切换输入法了。rime默认使用的是繁体输入。按ctrl+`可以选择输入方案。选择简体输入方案即可。

独显关闭

独显关闭的坑很多,目前我使用的是pop os中的system76-power作为独显关闭的工具。

sudo apt-add-repository ppa:system76-dev/stable
sudo apt install system76-power

安装完成后,启动服务

systemctl enable system76-power
systemctl start system76-power

切换显卡前,先看一下目前的配置

lspci | grep VGA

这时,可以看见AMD的核显和独显。由于我个人没有独显的使用需求。我一般都是直接关闭独显。

 system76-power graphics integrated

如果有深度学习的相关需求,可以使用compute模式.

切换完成后,重新启动.

reboot

启动完成后,重新查看显示

lspci | grep VGA

这时,就只有核显在工作了。

QQ和微信安装

首先安装deepin-wine-ubunut的库。

git clone https://github.com/wszqkzqk/deepin-wine-ubuntu.git
cd deepin-wine-ubuntu

./install.sh

需要注意的是,由于20.10许多包和20.04 不同,所以在安装过程中会报一些包依赖错误。
这时,修改/etc/apt/source.list, 全局替换groovy为focal.然后执行update。
然后,使用aptitude安装缺失的包。一定要注意是否会卸载一些核心库。我是看都没有涉及到核心库,才安装的。

解决完依赖问题,并且将deepin-wine的环境都安装完成之后,就可以安装QQ和微信了。
TIM: https://mirrors.aliyun.com/deepin/pool/non-free/d/deepin.com.qq.office/deepin.com.qq.office_2.0.0deepin4_i386.deb
微信: https://gitee.com/wszqkzqk/deepin-wine-containers-for-ubuntu/raw/master/deepin.com.wechat_2.6.8.65deepin0_i386.deb

中文乱码的问题

修改/opt/deepinwine/tools/run.sh, 将WINECMD修改为WINE_CMD="LC_ALL=zh_CN.UTF-8 deepin-wine.
然后重新启动TIM或者微信。

10小时续航

安装tlp tlp-rdw

sudo apt install tlp tlp-rdw

systemctl enable tlp

systemctl start tlp

10小时续航的主要情况还是看你的工作负载。在关闭独显的情况下,我进行非编译的轻度工作一般都可以续航6个小时左右,如果对续航还有要求,我一般会关闭睿频。
这样,一般就可以达到10小时左右的续航了。具体的耗电量可以使用powertop查看。我由于本身的桌面使的就是unity.如果使用的是i3等窗口管理器,续航还会更长。

其他

到这一步,这台电脑已经能满足我的需求了。如果你还有不同的需求,或者使用的是其他的发行版,我这边将我参考的一些资料提供出来,希望可以对你有帮助。

https://wiki.archlinux.org/index.php/CPU_frequency_scaling_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)
https://www.reddit.com/r/linuxhardware/comments/g2n8wn/asus_zephyrus_g14_the_first_few_hours_on_linux/
https://wiki.archlinux.org/index.php/ASUS_GA401I
https://www.jianshu.com/p/acc0f11be8cf
https://support.system76.com/#pop
https://github.com/wszqkzqk/deepin-wine-ubuntu

上一篇 下一篇

猜你喜欢

热点阅读