====== Linux Laptop(Notebook) ====== * [[linux:tlp|tlp]] * [[linux:power_profiles_daemon|Power Profiles Daemon]] * [[linux:powertop|PowerTop]] * [[linux:auto-cpufreq|auto-cpufreq]] * [[linux:cpufreq|Linux CPU Frequency]] * [[linux:cpupower-gui|cpupower-gui]] ====== 모델 번호 알아내기 ====== * ''dmidecode'' 명령으로 알아낼 수 있다. * 정리해서 보여주려면 다음 코드를 실행한다. for d in system-manufacturer system-product-name system-version bios-release-date bios-version processor-version do echo "${d^} : " $(sudo dmidecode -s $d); done * [[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 ===== * [[https://linuxconfig.org/how-to-obtain-a-laptop-battery-information-and-charging-state-on-linux|How to obtain a laptop battery information and charging state on Linux - LinuxConfig.org]] # 전체 전원 관련 장치 목록 upower -e # 배터리 0번 상태 upower -i /org/freedesktop/UPower/devices/battery_BAT0 # 선택해서 알아보기 upower -e | fzf | xargs upower -i ===== 충전 전원 Watt 알아내기 ===== * [[https://unix.stackexchange.com/questions/10418/how-to-find-power-draw-in-watts|linux - How to find power draw in watts? - Unix & Linux Stack Exchange]] * 충전시 몇 Watt 로 충전되고 있는지 확인하기 awk '{print $1*10^-6 " W"}' /sys/class/power_supply/BAT0/power_now ===== 전원 설정 ===== * 기본적으로 [[linux:gnome|Gnome]]이나 [[linux:kde|KDE]]의 전원 설정만으로 가능해야함. 그래도 안되면 아래 항목 수행해본다. * 노트북을 닫았을 때의 suspend 동작 gnome 3 설정 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 * 활동이 없을 때 절전여부 gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-type 'suspend' * ''suspend'' 반대는 ''nothing'' 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' * 기본적으로 gnome 설정만으로도 됐는데, 만약 안된다면 ''logind'' 설정도 추가 **이 설정은 불필요했음** - ''sudo vi /etc/systemd/logind.conf'' # 노트북 덮개를 닫으면 대기 모드(저저력모드)로 들어간다. 편집후 재부팅 할것. HandleLidSwitch=suspend HandleLidSwitchExternalPower=suspend HandleLidSwitchDocked=suspend * 대기 모드에서 깨어날 때 화면이 잠금 상태여야 한다. gsettings set org.gnome.desktop.screensaver ubuntu-lock-on-suspend true * 전원 버튼을 약 1초정도 눌렀을 때(4초이상누르면 무조건꺼짐) ''suspend'', ''interactive'' 등의 행위 gsettings set org.gnome.settings-daemon.plugins.power power-button-action 'suspend' # ''button-power'' 라는 값도 있는데, 무시됐었음. * ''hibernate'' 기능(현재 메모리 상태를 swap 디스크에 저장하고 전원완전 종료)로 설정하려면 패키지 설치 sudo apt install pm-utils && sudo pm-hibernate * [[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]]