Ubuntu18-04美化记录

本文记录了Ubuntu18.04系统的美化过程,包括显卡配置、电源管理软件TLP的安装与配置,以及系统主题、GRUB启动项的美化。同时,介绍了如何正确安装Nvidia驱动并切换显卡,以解决电脑发热和续航问题。
摘要由CSDN通过智能技术生成

喜欢Ubuntu的一个好处就是相比win来说Linux可以更方便的对系统进行一些修改,而且安装很多东西很方便,相比mac可以充分利用硬件(mac没有N卡,配置深度学习的时候不能用显卡跑代码)。作为一个颜控,最重要的当然是Ubuntu界面很舒服很漂亮~~~~

自从接触了Ubuntu之后就开始了折腾之旅,装双系统、分区、熟悉操作命令、配置环境、美化界面等等,对于一个小白来说,过程还是很艰辛的。很早之前就想把折腾的过程记录下来了,但是太懒啦,哈哈哈。这两天室友刚开始用Ubuntu,激励我记录一下,文章大概可以分成:显卡配置和电源管理美化系统主题美化grub启动项基础命令操作,这几个大部分。


显卡配置和电源管理

我的电脑是小米,刚装Ubuntu的时候真的是为发烧而生,风扇声音比我散热器的声音都大,非常hot并且导致续航时间严重缩短(当初我换新电脑的时候可主要因为原来电脑续航不够哇),上网查原因主要是显卡驱动问题和Ubuntn没有win那么好的电源管理导致的。所以主要从这两个方面入手。

TLP电源管理软件

首先TLP是免费的,可以减少电脑发热量和增加笔记本电池使用时间的电源管理工具。它是轻量级的工具,没有GUI,不用进行大量配置,一般的电脑使用默认配置就可以了。但是默认的配置会导致系统把显卡驱动切换到集成显卡上,所以一会我们还要管理一下显卡的驱动,首先介绍tlp的安装,随后介绍tlp的配置文件各代表了什么含义。

tlp的安装

添加PPA:
sudo add-apt-repository ppa:linrunner/tlp
更新软件列表:
sudo apt-get update
安装TLP:
sudo apt install tlp
启动TLP:
sudo tlp start
>>> TLP started in AC mode.

tlp的配置文件

现在 TLP 已经被启动起来了,而且已经设置好了节省电池所需要的默认配置。我们可以查看该配置文件。文件路径为 /etc/default/tlp。我们需要编辑该文件来修改各项配置。配置的一些示例如下:

# ------------------------------------------------------------------------------
# tlp - Parameters for power save
# See full explanation: http://linrunner.de/en/tlp/docs/tlp-configuration.html

# Hint: some features are disabled by default, remove the leading # to enable      #通过去掉“#”来开启参数
# them.

# Set to 0 to disable, 1 to enable TLP.    #设置为‘“1”启用TLP服务
TLP_ENABLE=1

# Operation mode when no power supply can be detected: AC, BAT
# Concerns some desktop and embedded hardware only.
TLP_DEFAULT_MODE=AC

# Seconds laptop mode has to wait after the disk goes idle before doing a sync.
# Non-zero value enables, zero disables laptop mode.
DISK_IDLE_SECS_ON_AC=0
DISK_IDLE_SECS_ON_BAT=2

# Dirty page values (timeouts in secs).
MAX_LOST_WORK_SECS_ON_AC=30
MAX_LOST_WORK_SECS_ON_BAT=90

# Hint: CPU parameters below are disabled by default, remove the leading #
# to enable them, otherwise kernel default values are used.

# Select a CPU frequency scaling governor.                      #CPU调度策略
# Intel Core i processor with intel_pstate driver:
#   powersave(*), performance
# Older hardware with acpi-cpufreq driver:
#   ondemand(*), powersave, performance, conservative
# (*) is recommended.
# Hint: use tlp-stat -p to show the active driver and available governors.
# Important:
#   You *must* disable your distribution's governor settings or conflicts will
#   occur. ondemand is sufficient for *almost all* workloads, you should know
#   what you're doing!
CPU_SCALING_GOVERNOR_ON_AC=powersave
CPU_SCALING_GOVERNOR_ON_BAT=powersave

# Set the min/max frequency available for the scaling governor.
# Possible values strongly depend on your CPU. For available frequencies see
# the output of tlp-stat -p.
#CPU_SCALING_MIN_FREQ_ON_AC=0
#CPU_SCALING_MAX_FREQ_ON_AC=0
#CPU_SCALING_MIN_FREQ_ON_BAT=0
#CPU_SCALING_MAX_FREQ_ON_BAT=0

# Set Intel P-state performance: 0..100 (%)
# Limit the max/min P-state to control the power dissipation of the CPU.
# Values are stated as a percentage of the available performance.
# Requires an Intel Core i processor with intel_pstate driver.
CPU_MIN_PERF_ON_AC=0
CPU_MAX_PERF_ON_AC=100
CPU_MIN_PERF_ON_BAT=0
CPU_MAX_PERF_ON_BAT=30

# Set the CPU "turbo boost" feature: 0=disable, 1=allow       #开启intel cpu 睿频
# Requires an Intel Core i processor.
# Important:
# - This may conflict with your distribution's governor settings
# - A value of 1 does *not* activate boosting, it just allows it
CPU_BOOST_ON_AC=1
CPU_BOOST_ON_BAT=1

# Minimize number of used CPU cores/hyper-threads under light load conditions        #与cpu有关
SCHED_POWERSAVE_ON_AC=0
SCHED_POWERSAVE_ON_BAT=1

# Kernel NMI Watchdog:
#   0=disable (default, saves power), 1=enable (for kernel debugging only)
NMI_WATCHDOG=0

# Change CPU voltages aka "undervolting" - Kernel with PHC patch required     #调节CPU 电压以达到节能的目的 ,谨慎开启!!!
# Frequency voltage pairs are written to:
#   /sys/devices/system/cpu/cpu0/cpufreq/phc_controls
# CAUTION: only use this, if you thoroughly understand what you are doing!
#PHC_CONTROLS="F:V F:V F:V F:V"

# Set CPU performance versus energy savings policy:              #与CPU有关
#   performance, normal, powersave
# Requires kernel module msr and x86_energy_perf_policy from linux-tools
ENERGY_PERF_POLICY_ON_AC=normal
ENERGY_PERF_POLICY_ON_BAT=powersave

# Hard disk devices; separate multiple devices with spaces (default: sda).
# Devices can be specified by disk ID also (lookup with: tlp diskid).
DISK_DEVICES="sda sdb"

# Hard disk advanced power management level: 1..254, 255 (max saving, min, off)
# Levels 1..127 may spin down the disk; 255 allowable on most drives.
# Separate values for multiple disks with spaces. Use the special value 'keep'
# to keep the hardware default for the particular disk.
DISK_APM_LEVEL_ON_AC="254 254"
DISK_APM_LEVEL_ON_BAT="128 128"

# Hard disk spin down timeout:
#   0:        spin down disabled
#   1..240:   timeouts from 5s to 20min (in units of 5s)
#   241..251: timeouts from 30min to 5.5 hours (in units of 30min)
# See 'man hdparm' for details.
# Separate values for multiple disks with spaces. Use the special value 'keep'
# to keep the hardware default for the particular disk.
#DISK_SPINDOWN_TIMEOUT_ON_AC="0 0"
#DISK_SPINDOWN_TIMEOUT_ON_BAT="0 0"

# Select IO scheduler for the disk devices: cfq, deadline, noop (Default: cfq);     #选择磁盘驱动器I/O调度方式,建议deadline
# Separate values for multiple disks with spaces. Use the special value 'keep'
# to keep the kernel default scheduler for the par
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值