Difference between revisions of "Lenovo IdeaPad Y580"

From ArchWiki
Jump to: navigation, search
m (Added info for using display manager)
Line 7: Line 7:
===NVIDIA graphics===
===NVIDIA graphics===
Since the NVIDIA card must have some form of Optimus to be used, the graphics configuration can be complicated. The current Arch Linux kernel and proprietary NVIDIA driver support Optimus, but configuration is somewhat involved. There are three options:
* Use the proprietary NVIDIA driver
* Use the open-source nouveau driver
* Use Bumblebee, which is designed as a third-party Optimus-like solution
Each option has its advantages. Bumblebee allows power-saving methods like graphics-card switching, so if you don't want to constantly be running the NVIDIA card, follow the guides for [[Bumblebee]] on the wiki. The proprietary NVIDIA driver typically has better performance than the open-source driver as of September 2013, but typically has more bugs and compatibility issues. The nouveau driver is reverse-engineered due to Nvidia's lack of hardware documentation, and therefore does not perform as well as the proprietary driver, but is simpler to use and less prone to bugs. More information can be found on the wiki's article on [[NVIDIA Optimus]].
===Using nouveau===
The Intel card cannot be disabled in BIOS, so Optimus must be configured in order to access the NVIDIA graphics. See the wiki page on [[Optimus]] for an in-depth description of the process.
To use the nouveau drivers, install the {{Pkg|xf86-video-nouveau}}, {{Pkg|xf86-video-intel}}, and {{Pkg|xorg-xrandr}} packages. After rebooting, X should automatically detect the drivers and start. To use the nvidia card, you must first issue {{ic|xrandr --setprovideroffloadsink nouveau Intel}}, which specifies offloading of graphical processing to the NVIDIA device. To run a program using the NVIDIA device, you must specify {{ic|DRI_PRIME<nowiki>=1</nowiki>}} before issuing the command, i.e. {{ic|DRI_PRIME<nowiki>=1</nowiki> glxgears}}. To make sure the NVIDIA card is being accessed, install the {{Pkg|mesa-demos}} package and issue {{ic|DRI_PRIME<nowiki>=1</nowiki> glxinfo | grep "OpenGL vendor string"}}. There should be a line that says {{ic|OpenGL vendor string: nouveau}}.
If you don't want to issue {{ic|xrandr --setprovideroffloadsink nouveau Intel}} every time you start X, you can add it to the beginning of your {{ic|~/.xinitrc}}. You can also add {{ic|export DRI_PRIME<nowiki>=</nowiki>1}} to your {{ic|~/.bashrc}} if you want to use the NVIDIA device for all programs.
===Using nvidia===
To use the proprietary NVIDIA drivers, install the {{Pkg|xf86-video-modesetting}}, {{Pkg|nvidia}}, and {{Pkg|xorg-xrandr}} packages.
The next step is to change {{ic|/etc/X11/xorg.conf}} appropriately. First, you must determine the PCI address of the NVIDIA card. Using {{ic|lspci}}, check the NVIDIA entry:
{{ic|lspci <nowiki>|</nowiki> grep NVIDIA}}
The first number you see, which should be formatted something like {{ic|##:##.#}}, is the PCI address. In {{ic|/etc/X11/xorg.conf}}, however, the format must be modified so each number is one digit separated by colons (i.e. 01:00.0 would be written as 1:0:0).
Now edit {{ic|/etc/X11/xorg.conf}}:
{{hc|# nano /etc/X11/xorg.conf|
Section "ServerLayout"
        Identifier "layout"
        Screen 0 "nvidia"
        Inactive "intel"
Section "Device"
        Identifier "nvidia"
        Driver "nvidia"
        BusID "PCI:''PCI_address''"
Section "Screen"
        Identifier "nvidia"
        Device "nvidia"
        Option "UseDisplayDevice" "none"
Section "Device"
        Identifier "intel"
        Driver "modesetting"
Section "Screen"
        Identifier "intel"
        Device "intel"
The final step is to modify your {{ic|~/.xinitrc}} file to run two {{ic|xrandr}} commands. Add the following two lines at the beginning of your {{ic|.xinitrc}}:
{{hc|$ nano ~/.xinitrc|
xrandr --setprovideroutputsource modesetting NVIDIA-0 &
xrandr --auto &}}
Now reboot, and X should run using the {{ic|startx}} command (assuming you have an appropriate window manager or session specified in {{ic|~/.xinitrc}}). If you get a black screen after starting X, kill it and try starting X again (it may take several tries).
If you use a display manager instead of manually starting X, you will need to specify the {{ic|xrandr}} commands in their startup scripts. The wiki page for [[Xrandr]] specifies the location of the scripts for GDM and KDM.

Revision as of 02:53, 21 October 2013

Intel graphics

This machine has two video cards, an Intel HD 4000 integrated chip and a discrete Nvidia GTX 660M.

If you only wish to use the Intel chip, for improved battery life, lower temperatures, or less complexity, you can simply install xf86-video-intel and use the Intel driver. This will leave the NVIDIA card disabled, but it will still use power. To completely disable the NVIDIA card, enter the Y580's BIOS and on the "Configuration" tab, change "Graphic Device" from "Switchable Graphic" to "UMA Graphic". If these options are not there, you may need to update the BIOS.

NVIDIA graphics

The Intel card cannot be disabled in BIOS, so Optimus must be configured in order to access the NVIDIA graphics. See the wiki page on Optimus for an in-depth description of the process.