사용자 도구

사이트 도구


linux:laptop

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
linux:laptop [2020/06/16 09:02]
kwon37xi [충전 전원 Watt 알아내기]
linux:laptop [2024/02/09 20:36] (현재)
kwon37xi
줄 1: 줄 1:
-====== Linux Laptop(Notebook) ====== +====== Linux Laptop(Notebook) ====== 
-  * [[http://www.webupd8.org/2014/01/install-laptop-mode-tools-164-with.html|Install Laptop Mode Tools 1.64 With Configuration GUI In Ubuntu ~ Web Upd8: Ubuntu / Linux blog]] +  * [[linux:tlp|tlp]] 
-  * [[https://www.youtube.com/watch?v=xYDE65q33Kc|Laptop LCD 자가 수리]] +  * [[linux:power_profiles_daemon|Power Profiles Daemon]] 
- +  * [[linux:powertop|PowerTop]] 
-===== TLP ===== +  * [[linux:auto-cpufreq|auto-cpufreq]] 
-  * https://linrunner.de/tlp/ +  * [[linux:cpufreq|Linux CPU Frequency]] 
-  * [[http://jinyongjeong.github.io/2019/10/28/ubuntu_battery_save/|Ubuntu 노트북 사용시 배터리 최적화 하기 · Jinyong]] +  * [[linux:cpupower-gui|cpupower-gui]]
-  * [[https://sergeswin.com/954/|리눅스 사용중인 노트북의 배터리 걱정, 이제 붙들어 매세요! - 서지스윈 @IT. 블로그 매거진.]] +
-  * [[http://www.webupd8.org/2015/08/power-management-tool-tlp-08-released.html|Power Management Tool `TLP` 0.8 Released]]<code sh> +
-sudo add-apt-repository ppa:linrunner/tlp +
-sudo apt-get update +
-sudo apt-get install tlp tlp-rdw+
  
-# thinkpad 사용시 +====== 모델 번호 알아내기 ====== 
-sudo apt-get install tp-smapi-dkms acpi-call-tools +  * ''dmidecode'' 명령으로 알아낼 수 있다. 
- +  * 정리해서 보여주려면 다음 코드를 실행한다. 
-# start +<code sh> 
-sudo tlp start +for d in system-manufacturer system-product-name system-version bios-release-date bios-version processor-version 
- +do     
-# ubuntu 에서 서비스 활성화 여부 체크 +      echo "${d^} : " $(sudo dmidecode -s $d);  
-systemctl list-unit-files|grep tlp +done
-tlp.service                                                               enabled         enabled  +
- +
-# tlp 현재 상태 +
-sudo tlp-stat -s+
 </code> </code>
 +  * [[https://linux.die.net/man/8/dmidecode|dmidecode(8): DMI table decoder - Linux man page]]
 +  * [[https://www.nixcraft.com/u/nixcraft|How do I know my Lenovo laptop model on Ubuntu Linux? - Linux - nixCraft Linux/Unix Forum]]
 +  * [[https://askubuntu.com/questions/258922/how-to-display-notebook-model-number|command line - How to display notebook model number? - Ask Ubuntu]]
 +  * [[https://coconuts.tistory.com/807|리눅스 하드웨어 정보 확인 dmidecode 명령어 사용방법]]
 +
  
 ===== 배터리 상태 Battery ===== ===== 배터리 상태 Battery =====
줄 35: 줄 31:
 # 배터리 0번 상태 # 배터리 0번 상태
 upower -i /org/freedesktop/UPower/devices/battery_BAT0 upower -i /org/freedesktop/UPower/devices/battery_BAT0
 +
 +# 선택해서 알아보기
 +upower -e | fzf | xargs upower -i
 </code> </code>
  
줄 45: 줄 44:
 </code> </code>
  
 +===== 전원 설정 =====
 +
 +  * 기본적으로 [[linux:gnome|Gnome]]이나 [[linux:kde|KDE]]의 전원 설정만으로 가능해야함. 그래도 안되면 아래 항목 수행해본다.
 +
 +  * 노트북을 닫았을 때의 suspend 동작 gnome 3 설정<code sh>
 +gsettings set org.gnome.settings-daemon.plugins.power lid-close-ac-action 'suspend'
 +gsettings set org.gnome.settings-daemon.plugins.power lid-close-battery-action 'suspend'
 +gsettings set org.gnome.settings-daemon.plugins.power active true
 +</code>
 +  * 활동이 없을 때 절전여부<code sh>
 +gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-type 'suspend'
 +</code>
 +  * ''suspend'' 반대는 ''nothing''<code sh>
 +gsettings set org.gnome.settings-daemon.plugins.power lid-close-ac-action 'nothing'
 +gsettings set org.gnome.settings-daemon.plugins.power lid-close-battery-action 'nothing'
 +gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-type 'nothing'
 +</code>
 +  * 기본적으로 gnome 설정만으로도 됐는데, 만약 안된다면 ''logind'' 설정도 추가 **이 설정은 불필요했음** - ''sudo vi /etc/systemd/logind.conf''<code>
 +# 노트북 덮개를 닫으면 대기 모드(저저력모드)로 들어간다. 편집후 재부팅 할것.
 +HandleLidSwitch=suspend
 +HandleLidSwitchExternalPower=suspend
 +HandleLidSwitchDocked=suspend
 +</code>
 +  * 대기 모드에서 깨어날 때 화면이 잠금 상태여야 한다.<code sh>
 +gsettings set org.gnome.desktop.screensaver ubuntu-lock-on-suspend true
 +</code>
 +  * 전원 버튼을 약 1초정도 눌렀을 때(4초이상누르면 무조건꺼짐) ''suspend'', ''interactive'' 등의 행위<code sh>
 +gsettings set org.gnome.settings-daemon.plugins.power power-button-action 'suspend'
 +# ''button-power'' 라는 값도 있는데, 무시됐었음.
 +</code>
 +  * ''hibernate'' 기능(현재 메모리 상태를 swap 디스크에 저장하고 전원완전 종료)로 설정하려면 패키지 설치<code sh>
 +sudo apt install pm-utils && sudo pm-hibernate
 +</code>
 +  * [[https://tipsonubuntu.com/2018/04/28/change-lid-close-action-ubuntu-18-04-lts/|How to Change Lid Close Action in Ubuntu 18.04 LTS - Tips on Ubuntu]]
 +  * [[https://itsfoss.com/ubuntu-close-lid-suspend/|Fix Laptop Doesn’t Suspend After Lid is Closed on Ubuntu Linux - It's FOSS]][[https://itsfoss.com/ubuntu-close-lid-suspend/|Fix Laptop Doesn’t Suspend After Lid is Closed on Ubuntu Linux - It's FOSS]]
 +  * [[https://tipsonubuntu.com/2018/04/28/change-lid-close-action-ubuntu-18-04-lts/|How to Change Lid Close Action in Ubuntu 18.04 LTS - Tips on Ubuntu]]
 +
 +===== 참조 =====
 +  * [[https://www.linuxuprising.com/2021/05/3-tools-to-display-linux-laptop-battery.html|3 Tools To Display Linux Laptop Battery Information From the Command Line - Linux Uprising Blog]]
 +  * [[http://www.webupd8.org/2014/01/install-laptop-mode-tools-164-with.html|Install Laptop Mode Tools 1.64 With Configuration GUI In Ubuntu ~ Web Upd8: Ubuntu / Linux blog]]
 +  * [[https://www.omgubuntu.co.uk/2019/05/slimbook-battery-optimizer-ubuntu|A Handy Battery Optimizer App for Ubuntu Laptops - OMG! Ubuntu!]]
 +  * [[https://www.omgubuntu.co.uk/improve-battery-life-linux|8 Tricks for Better Battery Life on Linux Laptops - OMG! Ubuntu!]]
 +  * [[https://www.youtube.com/watch?v=xYDE65q33Kc|Laptop LCD 자가 수리]]
 +  * [[https://www.tecmint.com/disable-suspend-and-hibernation-in-linux/|How to Disable Suspend and Hibernation Modes In Linux]]
linux/laptop.1592265745.txt.gz · 마지막으로 수정됨: 2020/06/16 09:02 저자 kwon37xi