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

推荐订阅源

Cisco Talos Blog
Cisco Talos Blog
阮一峰的网络日志
阮一峰的网络日志
云风的 BLOG
云风的 BLOG
D
Docker
Vercel News
Vercel News
IT之家
IT之家
Recent Announcements
Recent Announcements
Last Week in AI
Last Week in AI
V
Visual Studio Blog
Engineering at Meta
Engineering at Meta
腾讯CDC
Google DeepMind News
Google DeepMind News
I
InfoQ
博客园 - 三生石上(FineUI控件)
Apple Machine Learning Research
Apple Machine Learning Research
The GitHub Blog
The GitHub Blog
博客园 - Franky
The Cloudflare Blog
A
About on SuperTechFans
有赞技术团队
有赞技术团队
Y
Y Combinator Blog
T
Tenable Blog
P
Proofpoint News Feed
Recorded Future
Recorded Future
Security Latest
Security Latest
H
Hackread – Cybersecurity News, Data Breaches, AI and More
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
博客园 - 聂微东
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Google Online Security Blog
Google Online Security Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Simon Willison's Weblog
Simon Willison's Weblog
The Last Watchdog
The Last Watchdog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
N
News and Events Feed by Topic
TaoSecurity Blog
TaoSecurity Blog
U
Unit 42
The Hacker News
The Hacker News
Martin Fowler
Martin Fowler
T
Threat Research - Cisco Blogs
NISL@THU
NISL@THU
F
Full Disclosure
M
MIT News - Artificial intelligence
人人都是产品经理
人人都是产品经理
Hugging Face - Blog
Hugging Face - Blog
V
V2EX
Project Zero
Project Zero

yywr – 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 走出舒适区的第一步:先做个垃圾出来 – yywr's Blog 视频录制和推流直播工具OBS Studio 的使用 – 基础篇 – yywr's Blog [一个酷酷的软件] Readest 电子书阅读器 – yywr's Blog 私有音乐服务 Navidrome:部署与Nginx 二级目录反代访问 – yywr's Blog 简单的私有云数据访问工具 – FileBrowser 部署记要 – yywr's Blog 配置评论邮件通知,沮丧的一天 – yywr's Blog 停止想象 – yywr's Blog 关于冥想的一些想法 – yywr's Blog
UPower – 将笔记本电池当成UPS使用 – yywr's Blog
yywr · 2024-10-26 · via yywr – 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

以上

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