Manjaro Difference between pages "UEFI - Install Guide" and "Power Management"

Difference between pages "UEFI - Install Guide" and "Power Management"

From Manjaro
(Difference between pages)
imported>Oguzkagan
 
imported>Aaditya
 
Line 1: Line 1:
= Introduction =


UEFI is the commonly agreed on name for both the EFI & UEFI
Power Saving Techniques can be used on Laptops to maximize the Battery Life and minimize the heat produced, and conserve energy.
standards which merged. It does not include the old EFI v1,  
or Apple's own non-standard version of EFI.


= Target computer =
== Power Saving using TLP ==


The following guide aims to install Manjaro on a machine with UEFI enabled, Secure boot disabled, and using GUID Partition Table (GPT) disk(s).
TLP can be used for automatic power management.


For multi-boot, the EFI system partition which is already present (or will be created), can usually be shared amongst multiple Linux installs.
From the website of TLP,


= The steps =
<blockquote>TLP brings you the benefits of advanced power management for Linux without the need to understand every technical detail. '''TLP comes with a default configuration already optimized for battery life''', so you may just install and forget it. Nevertheless TLP is highly customizable to fulfil your specific requirements.


== Common ==
All TLP settings are stored in the config file /etc/default/tlp. As the default configuration already provides for optimized battery saving, in many cases there is no immediate need to change it.


* 1. Download your preferred Manjaro version (XFCE, Openbox, Cinnamon, KDE, ...), must be 64-bits.
TLP is a pure command line tool with automated background tasks. ''It does not contain a GUI''.</blockquote>


* 2. Burn the .iso to USB or DVD. See [[Burn_an_ISO_File]] for more details.


* 3. Check your BIOS, UEFI must be ON and Secure boot OFF.
== How to Install TLP ==


* 4. Boot with your USB or DVD & use the rEFInd - Main Menu... to choose which GPU drivers you want to have installed, the open-source or proprietary:
TLP is present in the AUR. It can be installed by using the following command-


  * Boot Manjaro Linux ... (default) -  
  yaourt -S tlp
  This chooses the ''open-source - free'' GPU drivers.
* Boot Manjaro Linux ... (nonfree) -
  This option chooses the '''proprietary''' GPU drivers
  from Nvidia or ATI.


=== Graphical Installer ===
After installing it, it needs to be configured to be run at startup-


{{Tip|Since Manjaro-0.8.9, UEFI support is also provided in the Graphical Installer, so one can simply try the Graphical installer and skip the instructions given below for the CLI installer.}}
systemctl enable tlp
systemctl enable tlp-sleep.service


To use the Graphical Installer select the '''Install Manjaro''' option from the Manjaro Welcome screen or from the desktop.
The above commands will make it autostart at boot time.


For the ESP (EFI system partition) which will store the EFI Grub binary, a 512mb partition of type fat32 can be created in the partitioning step, and mounted to ''/boot/efi''
=== Note ===


If you are dual booting then an EFI partition from a previous install can also be used.
TLP can conflict with laptop-mode-tools, so if you have laptop-mode-tools installed and want to install TLP, then uninstall laptop-mode-tools first!


=== CLI installer ===


* 5-b. Open terminal & enter:
== Alternative to TLP: Laptop-Mode-Tools ==


$ sudo setup
From the Arch Wiki-


* 6. Now, we are in the CLI Installer.  
<blockquote>Laptop Mode Tools is a laptop power saving package for Linux systems. It is the primary way to enable the Laptop Mode feature of the Linux kernel, which lets your hard drive spin down. In addition, it allows you to tweak a number of other power-related settings using a simple configuration file.</blockquote>


* 7. ''Choose 1.'' Set date and time - an easy intuitive configuration.
To install laptop-mode-tools


==== Disk preparation ====
sudo pacman -S laptop-mode-tools


{{Tip|If your hard disk is already partitioned the way you want, then this step can be skipped.}}
Note that laptop-mode-tools and tlp shouldnt be installed together!


* When you ''click 2.'' Partition Hard Drives,
To enable laptop-mode-tools to start at boot automatically
  you get a dialog saying "Do you want to use GUID
  Partition Table (GPT)", '''choose Yes'''.
* Partition your disk(s) as you want (Instructions on
  manually partitioning are beyond the scope of this
  guide, some deatils are available [[Cfdisk_Basic_Partitioning_Scenarios|here]]).
* ''Important Step:'' Create a 50~250MB EFI Partition,
  mine is 100MB (code: ef00)


==== Setting filesystem mount points ====
sudo systemctl enable laptop-mode.service


* After the partitioning is done, go to ''4. Set Filesystem''
laptop-mode-tools also automatically configures some settings for optimising battery life.
  ''Mountpoints.''
* '''Important Step:''' Format the EFI Partition you
  created as '''VFAT''' and mount on /boot/efi


{{Note|If you are re-using your EFI partition (that was created by Windows previously (or any other OS), then there is no need to format. Formatting will wipe the previous bootloader. Only mounting the EFI partition as '''/boot/efi''' is required in that case.}}


==== Installation ====
'''For user configuration, the file to edit is'''
<code>/etc/laptop-mode/laptop-mode.conf</code>
(primary configuration file)


* 9. ''Choose 3.'' Install system and wait...
The individual modules can be configured from the configuration files present in


* 10. Now, go to ''4. Configure System'' and configure it the way you like (username, password, mirrorlist, system-name, ...).
/etc/laptop-mode/conf.d/


* 11. When you are done, go to ''5. Install bootloader.'' Choose EFI_x86_64 > GRUB (2) UEFI x86_64,  ''DON'T select BIOS GRUB.''


* 11.1 It will ask to format the EFI Partition you created earlier as FAT32, yes can be chosen.
== Minimizing Laptop/Desktop temperatures ==
{{Note|Formatting not required if reusing previous EFI partition.}}


* 12. If it gives a error in the final stages saying "efivars kernel module was not properly loaded", don't worry, the system will work fine!
=== For Intel Machines ===


* 13. If the installer asks you about copying grub/efi files to another folder in order to maintain compatibility in some systems, choose Yes.
The intel pstate driver automatically handles CPU frequency scaling according to system load.


* 14. ''Click 6.'' Quit
Note that the Intel Pstate works only with kernels >= 3.9, and kernel 3.11 is recommended.


* 15. Shutdown, remove the DVD or USB, and boot. Your system should appear now!
Supported processor families are Intel Sandy Bridge, Ivy Leage and up.


= Switching from BIOS to UEFI =
The Intel Thermal Daemon (thermald) can be installed to automatically manage the CPU Temperature.


For UEFI install the Disk partition table should be of type '''GPT (Guid Partition Table).'''
Install it with


If you dont want to format your hard disk to GPT, but instead want to migrate from MBR to GPT while trying to save your data, can have a look at
yaourt -S thermald
http://www.rodsbooks.com/gdisk/mbr2gpt.html


After installing it needs to be configured to automatically start at boot:


1) You would need to create an ''ESP (EFI System Partition)''.
sudo systemctl enable thermald


It is a FAT32 partition which has the .efi files for booting, which you can create using Gparted or gdisk. (Size 200-512 MiB).
===For AMD Machines===


You would also need to install/check whether following packages are present-
With Linux Kernel 3.11, AMD introduced Dyanamic Power Management (DPM) for the GPU for the free drivers, which can lead to lower power consumption and better operating temperatures.


1. efibootmgr
To enable it,
2. dosfstools
3. grub


[[Pacman_Overview | (How to install packages)]]
sudo gedit /etc/default/grub


and add/change the line
'''GRUB_CMDLINE_LINUX=""''' to
'''GRUB_CMDLINE_LINUX="radeon.dpm=1"'''


2) Create the ''/boot/efi'' directory
== PowerTOP ==
sudo mkdir /boot/efi


PowerTop a diagnostic tool used to identify and report issues with power consumption and management.
It can be used to check the power consumption.


3.) Mount the EFI partition as ''/boot/efi''
Install it with-
sudo mount /dev/sdXY /boot/efi
X = Alphabet of the drive = a,b,c ...
Y = Partition number of the EFI partition = 1,2,3,4...


Example - ''/dev/sda4''
sudo pacman -S powertop


Run PowerTop to analyze power consumption


4.) Install Grub according to UEFI
  sudo powertop
  sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=manjaro --recheck


5.) Update Grub configuration file.
To save PowerTops output to a file,
sudo update-grub


'''Note-'''
sudo powertop --html
If you get an error like
path '/boot/grub' is not readable by Grub on boot. Installation is impossible. Aborting


Then you will need to [https://wiki.archlinux.org/index.php/Change_Root chroot] as described [[Restore_the_GRUB_Bootloader#Identify_and_Prepare_the_Installed_Partition.28s.29|here]], and then perform Step 5 again.


If you get the following error :  
For more details, see [http://wiki.manjaro.org/index.php?title=PowerTOP_to_Optimise_Laptop_Power_Consumption Powertop : Manjaro Wiki]


EFI variables are not supported on this system.
=Support=


then you could load the '''efivarfs''' module :
Following is a link to this page's forum counterpart where you can post any related feedback: [http://forum.manjaro.org/index.php?topic=6867.0]
sudo modprobe efivarfs




'''See also'''
Credit goes to LiberteCzech for posting about TLP, and to Arup for posting about Thermald, and to the Arch Wiki for their documentation, especially on Laptop-Mode-Tools


[[Restore the GRUB Bootloader]]


[https://forum.manjaro.org/t/using-livecd-v17-0-1-as-grub-to-boot-os-with-broken-bootloader/24916]
'''For some more configuration''', see FadeMind's forum tutuorial [http://forum.manjaro.org/index.php?topic=7373.msg64100#msg64100 '''here''']


= Dual booting with Windows =
=See Also=


{{tip|Some manufactures EFI implementations cause GRUB not to be showed in the Boot Menu, or even if its there it can't be made default.}}
[http://wiki.manjaro.org/index.php?title=PowerTOP_to_Optimise_Laptop_Power_Consumption PowerTop]


[http://linrunner.de/en/tlp/tlp.html TLP]


'''In such cases ''[http://www.rodsbooks.com/refind/index.html rEFInd]''''' can be used.
[https://wiki.archlinux.org/index.php/Laptop_Mode_Tools LaptopModeTools-Arch Wiki]


[[File:Refind.png]]
There are two ways to install rEFInd-
1.Install rEFInd from its website [http://www.rodsbooks.com/refind/installing.html] (detailed) or '''install using pacman'''''(preferred)''-
sudo pacman -S refind-efi
Files will be present in  /usr/share/refind .
2.Or using the instructions on the rEFInd website: [http://www.rodsbooks.com/refind/installing.html]
== Instructions ==
The '''refind-install''' command can be used to automatically install rEFInd (the EFI partition may need to be mounted for this to work). See the [https://wiki.archlinux.org/index.php/REFInd#Installation Arch wiki] for more details.
=== Manual install ===
Inside the refind folder ('''/usr/share/refind'''), copy the files and folders to-
/boot/efi/EFI/Boot/
'''Note-'''
My ESP (EFI System Partition) is mounted at /boot/efi.
You need to copy these files to the Boot folder on your EFI partition, and the Boot folder itself will be present inside the EFI folder on the EFI Partition, so take note of it.
You can check which partition is your ESP using Gparted; find which partition is formatted as fat32 and has size around 200mb-1gb.
Can mount it as /boot/efi by
sudo mount /dev/sdXN /boot/efi
X=a,b,c...
N=1,2,3...
These depend on which partition your ESP is present which can be obtained via Gparted as mentioned earlier.
Now inside the /boot/efi/EFI/Boot/ folder, there should already be a file present-
bootx64.efi
You can '''''rename''''' it as  ''windows.bootx64.efi''
Then you can rename ''refind_x64.efi'' to ''bootx64.efi''
The bootx64.efi files boot by default, hence rEFInd should now boot by default, and detect grubx64.efi(linux-manjaro) and efibootmgfw.efi (windows) automatically.
'''Note'''-
A folder Manjaro (name could be some other also) containing the file grubx64.efi should also be present in /boot/efi/EFI/ folder, which should contain the grubx64.efi file which will be used by rEFInd to boot Grub.
So it could be like-
/boot/efi/EFI/Manjaro/grubx64.efi
rEFInd would use this file for booting Manjaro.
If you do not have this file or folder, try-
sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=Manjaro --recheck
to create '''/boot/efi/EFI/Manjaro/grubx64.efi'''
See also- [http://www.rodsbooks.com/refind/installing.html#naming http://www.rodsbooks.com/refind/installing.html#naming]
=== An alternative: chainloading via GRUB ===
An entry can be added to ''/etc/grub.d/40_custom''
menuentry 'Windows8 (UEFI)' {
insmod ntfs
set root=(hd0,gpt4)
chainloader (${root})/EFI/Microsoft/Boot/bootmgfw.efi
boot
}
In this case (hd0,4) or /dev/sda4 is the EFI System partition where the Windows bootloader is present.
After adding the above entry, running '''sudo update-grub''' updates the GRUB configuration file so that an entry named '''Windows8 (UEFI)''' is added to the GRUB boot menu.
Related Forum thread: [https://forum.manjaro.org/t/detecting-efi-files-and-booting-them-from-grub/38083]
The chainloading will fail on some hardware (Lenovo Ideapad 110) with the "invalid signature" message - the Refind method will still work.
= Extras =
== Using Rufus on Windows to create installation media ==
[http://rufus.akeo.ie/ Rufus] users can use the following settings:
* Click on the DVD icon and load your .iso
* In the menu left of the DVD icon, select DD Image
* Device: "choose your USB" (Attention: choose correctly,
  the device selected here will be formatted!!!)
* Partition scheme: GPT partition scheme for UEFI computer
* File system: FAT32
* Cluster size: "Don't modify"
* Volume label: "Don't modify"
* Click Start, and you are done (takes 2~5 min to complete).
= Feedback =
Questions, suggestions, critics? Please post here: [http://forum.manjaro.org/]
= External Links =
Youtube video: https://www.youtube.com/watch?v=36tDZIXn3-k


[[Category:Contents Page]]
[[Category:Contents Page]]

Revision as of 11:54, 18 October 2013

Power Saving Techniques can be used on Laptops to maximize the Battery Life and minimize the heat produced, and conserve energy.

Power Saving using TLP

TLP can be used for automatic power management.

From the website of TLP,

TLP brings you the benefits of advanced power management for Linux without the need to understand every technical detail. TLP comes with a default configuration already optimized for battery life, so you may just install and forget it. Nevertheless TLP is highly customizable to fulfil your specific requirements.

All TLP settings are stored in the config file /etc/default/tlp. As the default configuration already provides for optimized battery saving, in many cases there is no immediate need to change it.

TLP is a pure command line tool with automated background tasks. It does not contain a GUI.


How to Install TLP

TLP is present in the AUR. It can be installed by using the following command-

yaourt -S tlp

After installing it, it needs to be configured to be run at startup-

systemctl enable tlp
systemctl enable tlp-sleep.service

The above commands will make it autostart at boot time.

Note

TLP can conflict with laptop-mode-tools, so if you have laptop-mode-tools installed and want to install TLP, then uninstall laptop-mode-tools first!


Alternative to TLP: Laptop-Mode-Tools

From the Arch Wiki-

Laptop Mode Tools is a laptop power saving package for Linux systems. It is the primary way to enable the Laptop Mode feature of the Linux kernel, which lets your hard drive spin down. In addition, it allows you to tweak a number of other power-related settings using a simple configuration file.

To install laptop-mode-tools

sudo pacman -S laptop-mode-tools

Note that laptop-mode-tools and tlp shouldnt be installed together!

To enable laptop-mode-tools to start at boot automatically

sudo systemctl enable laptop-mode.service

laptop-mode-tools also automatically configures some settings for optimising battery life.


For user configuration, the file to edit is

/etc/laptop-mode/laptop-mode.conf

(primary configuration file)

The individual modules can be configured from the configuration files present in

/etc/laptop-mode/conf.d/


Minimizing Laptop/Desktop temperatures

For Intel Machines

The intel pstate driver automatically handles CPU frequency scaling according to system load.

Note that the Intel Pstate works only with kernels >= 3.9, and kernel 3.11 is recommended.

Supported processor families are Intel Sandy Bridge, Ivy Leage and up.

The Intel Thermal Daemon (thermald) can be installed to automatically manage the CPU Temperature.

Install it with

yaourt -S thermald

After installing it needs to be configured to automatically start at boot:

sudo systemctl enable thermald

For AMD Machines

With Linux Kernel 3.11, AMD introduced Dyanamic Power Management (DPM) for the GPU for the free drivers, which can lead to lower power consumption and better operating temperatures.

To enable it,

sudo gedit /etc/default/grub

and add/change the line

GRUB_CMDLINE_LINUX="" to
GRUB_CMDLINE_LINUX="radeon.dpm=1"

PowerTOP

PowerTop a diagnostic tool used to identify and report issues with power consumption and management. It can be used to check the power consumption.

Install it with-

sudo pacman -S powertop

Run PowerTop to analyze power consumption

sudo powertop

To save PowerTops output to a file,

sudo powertop --html


For more details, see Powertop : Manjaro Wiki

Support

Following is a link to this page's forum counterpart where you can post any related feedback: [1]


Credit goes to LiberteCzech for posting about TLP, and to Arup for posting about Thermald, and to the Arch Wiki for their documentation, especially on Laptop-Mode-Tools


For some more configuration, see FadeMind's forum tutuorial here

See Also

PowerTop

TLP

LaptopModeTools-Arch Wiki

Cookies help us deliver our services. By using our services, you agree to our use of cookies.