惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

N
News and Events Feed by Topic
D
Docker
云风的 BLOG
云风的 BLOG
F
Fortinet All Blogs
F
Full Disclosure
H
Hackread – Cybersecurity News, Data Breaches, AI and More
P
Proofpoint News Feed
Microsoft Azure Blog
Microsoft Azure Blog
WordPress大学
WordPress大学
The GitHub Blog
The GitHub Blog
L
LangChain Blog
H
Help Net Security
B
Blog
T
Tailwind CSS Blog
V
V2EX
博客园_首页
阮一峰的网络日志
阮一峰的网络日志
人人都是产品经理
人人都是产品经理
The Cloudflare Blog
Recent Announcements
Recent Announcements
aimingoo的专栏
aimingoo的专栏
美团技术团队
A
About on SuperTechFans
C
Cybersecurity and Infrastructure Security Agency CISA
K
Kaspersky official blog
I
InfoQ
Project Zero
Project Zero
I
Intezer
Google DeepMind News
Google DeepMind News
博客园 - 【当耐特】
Hugging Face - Blog
Hugging Face - Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
T
Threat Research - Cisco Blogs
Last Week in AI
Last Week in AI
C
Cyber Attacks, Cyber Crime and Cyber Security
G
GRAHAM CLULEY
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
AWS News Blog
AWS News Blog
Spread Privacy
Spread Privacy
S
Securelist
Recorded Future
Recorded Future
D
Darknet – Hacking Tools, Hacker News & Cyber Security
博客园 - 叶小钗
S
Security Affairs
Blog — PlanetScale
Blog — PlanetScale
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
月光博客
月光博客
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
罗磊的独立博客
The Hacker News
The Hacker News

Computer – Ed_'s Blog

给 Debian 开了自动安全更新 – yywr's Blog macOS 下 xlr-spaceFN 键盘映射方案实现方案 v1 – yywr's Blog 移动网络/高延迟网络下 ssh 的替代品 – yywr's Blog H3C NX30PRO 半砖救回记 – yywr's Blog OBS摄像头设置教程:画面形状与绿幕功能详解 – yywr's Blog 视频录制和推流直播工具OBS Studio 的使用 – 基础篇 – yywr's Blog 私有音乐服务 Navidrome:部署与Nginx 二级目录反代访问 – yywr's Blog 简单的私有云数据访问工具 – FileBrowser 部署记要 – yywr's Blog 又一个 Honkintosh – yywr's Blog Samba 服务基本用法 – yywr's Blog Crontab 使用笔记 – yywr's Blog 终于修了个梯子 – yywr's Blog 防火墙配置工具 UFW – yywr's Blog
UPower – 将笔记本电池当成UPS使用 – yywr's Blog
yywr · 2024-10-26 · via Computer – Ed_'s Blog

Skip to content

由于我使用老旧笔记本作为私有云使用,除了之前提到的「合盖子不休眠」的设置外,电池的设置也是一项很有用的设定,谁也不知道哪次的突然断电会不会带来意想到不到的结果,所以 UPower 安排起来

UPower 的功能描述太抽象,就不抄了,自己官网看(https://upower.freedesktop.org)

准备

  • 安装: apt install upower
  • 开机启动:systemctl enable upower

配置

打开配置文件并编辑,文件在:/etc/UPower/UPower.conf (注意大小写)

找到下面几个参数进行设置

  • 前三项分别是「低电量,临界值,动作执行」时的电量百分比
  • 最后一项是动作执行,可选关机、休眠、混合睡眠(PowerOff / Hibernate / HybridSleep)
PrecentageLow=40
PercentageCritical=30
PercentageAction=20
CriticalPowerAction=HybridSleep

保存配置文件后,重启服务 systemctl restart upower

其它补充

为什么我的值设置的这么高,因为我的电池不行了,56Wh 的出厂设计容量,现在只有 12.5Wh,随时断电

可以通过下面方式查看电池信息

  • 查看电池名称: upower -e 
  • 查看具体的电池信息: upower -i 上一条命令查到的电池名称
  • 更多使用方法:upower -h

以上

本文是 居家服务器折腾笔记 的一部分