Manjaro Difference between pages "Power Management" and "Configure NVIDIA (non-free) settings and load them on Startup"

Difference between pages "Power Management" and "Configure NVIDIA (non-free) settings and load them on Startup"

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


Power Saving Techniques can be used on Laptops to maximize the Battery Life and minimize the heat produced, and conserve energy.
{note| This tutorial is meant for users who are using the NVIDIA Proprietary (non-free) drivers.}}


= Power Saving using TLP =


TLP can be used for automatic power management, as explained in the following quote from their website:
You can check what drivers you have installed by entering the following command into your terminal:


<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.
inxi -G


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''.'</blockquote>
= Install NVIDIA Drivers =


If you have the Nouveau driver you can install the proprietary NVIDIA driver by using the [[Configure_Graphics_Cards| Manjaro Hardware Detection (MHWD)]] utility. To do so, enter the following command into your terminal:


== How to Install TLP ==
sudo mhwd -a pci nonfree 0300


{{warning|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!}}


Once Complete, reboot your system to complete the process. You can then confirm that the driver has been installed and is working by entering the following command into your terminal:


TLP is available from the Manjaro repositories, can be installed by entering the following command into your terminal:
mhwd -li


sudo pacman -S tlp


''iw'' and  ''smartmontools'' are among the optional dependencies.


=Configure The Resolution/Refresh Rate=


After installation, TLP then needs to be configured to be run automatically when you start up your computer. To do so, enter the following commands into your terminal:
{{warning|The method provided does not currently work for the Cinnamon Edition. As soon as a solution is found, then this article will be updated.}}


systemctl enable tlp
systemctl enable tlp-sleep.service


With these enabled TLP should automatically start every time you boot your computer.
'''1.'''  Open your terminal and enter the following command:


=== TLP Configuration ===
sudo nvidia-settings


See http://linrunner.de/en/tlp/docs/tlp-configuration.html


Also from the Manjaro wiki: [[Optimized_power_settings#Setup_TLP | Optimized Power Settings:Setup TLP]]
'''2.'''  Change resolution and refresh rate in 'X Server Display Configuration' tab.


=== Using with powertop ===
'''3.'''  Hit the 'Save to X Configuration File' button and save to '''/etc/X11/mhwd.d/nvidia.conf'''


See http://linrunner.de/en/tlp/docs/tlp-faq.html#powertop
'''4.'''  Now enter the following command into the terminal to complete the process:


= An Alternative to TLP for Laptop Users =
sudo mhwd-gpu --setgl nvidia --setxorg /etc/X11/mhwd.d/nvidia.conf


{{warning|Again, TLP and laptop-mode-tools '''must not''' be installed together!}}




From the Arch Wiki:
=Configure X Screen settings (OpenGL Settings, Antialiasing, X Server XVideo)=


<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>


'''1.'''  Open your terminal and enter the following command:


To install '''laptop-mode-tools''', enter the following command into your terminal:
nvidia-settings


sudo pacman -S laptop-mode-tools


'''2.''' Change settings in X Server XVideo Settings, OpenGL and Antialiasing, in the 'X Screen' tab.


Once installed, to enable ''laptop-mode-tools'' to start automatically every time you boot your computer, enter the following into your terminal:
'''3.''' Click on 'nvidia-settings configuration' tab and click on the 'Save Current Configuration' button.


sudo systemctl enable laptop-mode.service
'''4.''' Save the .nvidia-settings-rc to the default location specified ('''/home/[your account name]''')


'''5.''' Edit the .xinitrc file. To do so, enter the following into your terminal:


''Laptop-mode-tools'' will automatically configures some settings for you in order to optimise your laptop's battery life.
sudo gedit ~/.xinitrc




== Manually Setting Laptop-Mode-Tools Configuration ==
'''6.''' Once opened, add the following line into the configuration file:


For user configuration, the file to edit is '''/etc/laptop-mode/laptop-mode.conf''' (primary configuration file)
exec nvidia-settings --load-config-only


The individual kernel modules can be configured from the configuration files present in '''/etc/laptop-mode/conf.d/'''


'''7.''' Save and exit.


= Minimizing Laptop/Desktop temperatures =


== For Intel Machines ==
= Troubleshooting: X-Server Failed to Start and Install =


The Intel pstate driver automatically handles CPU frequency scaling according to system load.
Where there has been an error during the installation process, upon rebooting you may see the following error message: '''modprobe: ERROR: could not insert nvidia : No such a device'''


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.
If this happens:


The Intel Thermal Daemon (thermald) can be installed to automatically manage the CPU Temperature.
'''1.''' Remove the NVIDIA driver by entering the following command into your terminal:


Install it with
sudo mhwd -r pci video-nvidia   


sudo pacman -S thermald


After installing it needs to be configured to automatically start at boot:
'''2.''' Reboot your computer


sudo systemctl enable thermald


==For AMD Machines==
'''3.''' Enter the following into your terminal:


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.
sudo gedit /etc/mkinitcpio.conf


To enable it,


sudo gedit /etc/default/grub
'''4.''' delete the word '''nouveau''' from the following line:


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


and regenerate grub.cfg
sudo grub-mkconfig -o /boot/grub/grub.cfg


= PowerTOP =
It should now look like this (i.e. keep the speech marks ("")):


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


Install it with-


sudo pacman -S powertop
'''5.''' Save and close the file.


Run PowerTop to analyze power consumption


sudo powertop
'''6.''' It is now necessary to reconfigure your existing kernel to take into account this change. The syntax of the necessary command to enter into your terminal is:


To save PowerTops output to a file,
sudo mkinitcpio -p [linux kernel version]


sudo powertop --html


For example, if you are currently using Kernel 3.10, you would enter the following:


For more details, see [http://wiki.manjaro.org/index.php?title=PowerTOP_to_Optimise_Laptop_Power_Consumption Powertop : Manjaro Wiki]
sudo mkinitcpio -p linux310


=Support=


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]
For kernel 3.11, you would enter the following:


sudo mkinitcpio -p linux311


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


And so on.


''For more configuration'', see [[Optimized_power_settings]].
'''7.''' Now re-install the NVIDIA driver by entering the following command into your terminal:


=See Also=
sudo mhwd -a pci nonfree 0300


[http://wiki.manjaro.org/index.php?title=PowerTOP_to_Optimise_Laptop_Power_Consumption PowerTop]


[http://linrunner.de/en/tlp/tlp.html TLP]
'''8.''' Reboot your system. Now it should work ;)


[https://wiki.archlinux.org/index.php/Laptop_Mode_Tools LaptopModeTools-Arch Wiki]
=Bumblebee and Steam=
 
Properly using and configuring Bumblebee with Steam is much easier than it seems at first.
 
'''1.''' Install bumblebee for nonfree nvidia. Please run in terminal command in proper order:
 
sudo pacman -S virtualgl lib32-virtualgl lib32-primus primus
 
sudo mhwd -f -i pci video-hybrid-intel-nvidia-bumblebee
 
sudo systemctl enable bumblebeed
 
'''2.''' Reboot system:
 
sudo reboot
 
'''3.''' Next run:
 
optirun -b none nvidia-settings -c :8
 
'''4.''' Verify it is working
 
primusrun glxspheres
and
glxspheres
 
so you can see the difference.
 
'''5a.''' To have all games with Steam run using the NVidia card.
Run Steam with command:
 
primusrun steam
 
'''5b.''' Alternatively, you can run specific games by:
 
Select a game - that you want to run using your discrete Nvidia card - from the Library page of the Steam client, right-click, and select Properties.
Click the SET LAUNCH OPTIONS... button and specify primusrun %command% for the command line.
Save your changes.This method allows you to pick when the discrete NVidia GPU should be used on a per-game basis.
 
 
 
=Feedback and Support=
 
If you have any problems, improvements or see any errors in this tutorial, please post in this Manjaro forum thread: [http://forum.manjaro.org/index.php?topic=4489.0]




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

Revision as of 14:31, 1 January 2014

Introduction

{note| This tutorial is meant for users who are using the NVIDIA Proprietary (non-free) drivers.}}


You can check what drivers you have installed by entering the following command into your terminal:

inxi -G


Install NVIDIA Drivers

If you have the Nouveau driver you can install the proprietary NVIDIA driver by using the Manjaro Hardware Detection (MHWD) utility. To do so, enter the following command into your terminal:

sudo mhwd -a pci nonfree 0300


Once Complete, reboot your system to complete the process. You can then confirm that the driver has been installed and is working by entering the following command into your terminal:

mhwd -li


Configure The Resolution/Refresh Rate

Warning
The method provided does not currently work for the Cinnamon Edition. As soon as a solution is found, then this article will be updated.


1. Open your terminal and enter the following command:

sudo nvidia-settings


2. Change resolution and refresh rate in 'X Server Display Configuration' tab.

3. Hit the 'Save to X Configuration File' button and save to /etc/X11/mhwd.d/nvidia.conf

4. Now enter the following command into the terminal to complete the process:

sudo mhwd-gpu --setgl nvidia --setxorg /etc/X11/mhwd.d/nvidia.conf


Configure X Screen settings (OpenGL Settings, Antialiasing, X Server XVideo)

1. Open your terminal and enter the following command:

nvidia-settings


2. Change settings in X Server XVideo Settings, OpenGL and Antialiasing, in the 'X Screen' tab.

3. Click on 'nvidia-settings configuration' tab and click on the 'Save Current Configuration' button.

4. Save the .nvidia-settings-rc to the default location specified (/home/[your account name])

5. Edit the .xinitrc file. To do so, enter the following into your terminal:

sudo gedit ~/.xinitrc


6. Once opened, add the following line into the configuration file:

exec nvidia-settings --load-config-only


7. Save and exit.


Troubleshooting: X-Server Failed to Start and Install

Where there has been an error during the installation process, upon rebooting you may see the following error message: modprobe: ERROR: could not insert nvidia : No such a device


If this happens:

1. Remove the NVIDIA driver by entering the following command into your terminal:

sudo mhwd -r pci video-nvidia    


2. Reboot your computer


3. Enter the following into your terminal:

sudo gedit /etc/mkinitcpio.conf 


4. delete the word nouveau from the following line:

MODULES=" nouveau" 


It should now look like this (i.e. keep the speech marks ("")):

MODULES="" 


5. Save and close the file.


6. It is now necessary to reconfigure your existing kernel to take into account this change. The syntax of the necessary command to enter into your terminal is:

sudo mkinitcpio -p [linux kernel version]


For example, if you are currently using Kernel 3.10, you would enter the following:

sudo mkinitcpio -p linux310


For kernel 3.11, you would enter the following:

sudo mkinitcpio -p linux311


And so on.

7. Now re-install the NVIDIA driver by entering the following command into your terminal:

sudo mhwd -a pci nonfree 0300


8. Reboot your system. Now it should work ;)

Bumblebee and Steam

Properly using and configuring Bumblebee with Steam is much easier than it seems at first.

1. Install bumblebee for nonfree nvidia. Please run in terminal command in proper order:

sudo pacman -S virtualgl lib32-virtualgl lib32-primus primus
sudo mhwd -f -i pci video-hybrid-intel-nvidia-bumblebee
sudo systemctl enable bumblebeed

2. Reboot system:

sudo reboot

3. Next run:

optirun -b none nvidia-settings -c :8

4. Verify it is working

primusrun glxspheres

and

glxspheres

so you can see the difference.

5a. To have all games with Steam run using the NVidia card. Run Steam with command:

primusrun steam

5b. Alternatively, you can run specific games by:

Select a game - that you want to run using your discrete Nvidia card - from the Library page of the Steam client, right-click, and select Properties. Click the SET LAUNCH OPTIONS... button and specify primusrun %command% for the command line. Save your changes.This method allows you to pick when the discrete NVidia GPU should be used on a per-game basis.


Feedback and Support

If you have any problems, improvements or see any errors in this tutorial, please post in this Manjaro forum thread: [1]

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