Ubuntu18-04美化记录

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

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


显卡配置和电源管理

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

TLP电源管理软件

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

tlp的安装

tlp的配置文件

我主要是在cpu那个部分做了一些调整,一个i7的电脑,硬生生被调成了i5的性能,我真的是后悔当时没直接买i5。更详细的信息可以参考官方文档.

给出我的配置:

# ------------------------------------------------------------------------------# tlp - Parameters for power saving# 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.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# Operation mode select: 0=depend on power source, 1=always use TLP_DEFAULT_MODE# Hint: use in conjunction with TLP_DEFAULT_MODE=BAT for BAT settings on AC.TLP_PERSISTENT_DEFAULT=0# 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=0DISK_IDLE_SECS_ON_BAT=2# Dirty page values (timeouts in secs).MAX_LOST_WORK_SECS_ON_AC=15MAX_LOST_WORK_SECS_ON_BAT=60# 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.# Intel Core i processor with intel_pstate driver:#   powersave(*), performance.# Older hardware with acpi-cpufreq driver:#   ondemand(*), powersave, performance, conservative, schedutil.# (*) is recommended.# Hint: use tlp-stat -p to show the active driver and available governors.# Important:#   powersave for intel_pstate and ondemand for acpi-cpufreq are power#   efficient for *almost all* workloads and therefore kernel and most#   distributions have chosen them as defaults. If you still want to change,#   you should know what you're doing! You *must* disable your distribution's#   governor settings or conflicts will occur.CPU_SCALING_GOVERNOR_ON_AC=powersaveCPU_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=1#CPU_SCALING_MAX_FREQ_ON_AC=0CPU_SCALING_MIN_FREQ_ON_BAT=1#CPU_SCALING_MAX_FREQ_ON_BAT=0# Set energy performance hints (HWP) for Intel P-state governor:#   performance, balance_performance, default, balance_power, power# Values are given in order of increasing power saving.# Note: Intel Skylake or newer CPU and Kernel >= 4.10 required.CPU_HWP_ON_AC=balance_performanceCPU_HWP_ON_BAT=balance_power# 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=0CPU_MAX_PERF_ON_AC=40#CPU_MIN_PERF_ON_BAT=0CPU_MAX_PERF_ON_BAT=30# Set the CPU "turbo boost" feature: 0=disable, 1=allow# 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=0# Minimize number of used CPU cores/hyper-threads under light load conditions:#   0=disable, 1=enable.SCHED_POWERSAVE_ON_AC=1SCHED_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.# 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:#   performance, balance-performance, default, balance-power, power.# Values are given in order of increasing power saving.# Requires kernel module msr and x86_energy_perf_policy from linux-tools.ENERGY_PERF_POLICY_ON_AC=performanceENERGY_PERF_POLICY_ON_BAT=power# 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"# 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)

                                                        

声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!

上一篇 2019年4月4日
下一篇 2019年4月4日

相关推荐