[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
howtos:hardware:nvidia_optimus [2015/04/24 06:03 (UTC)] – tommyc | howtos:hardware:nvidia_optimus [2020/12/24 22:57 (UTC)] (current) – Add section on new official Optimus support with proprietary driver; update intro and sources accordingly poprocks | ||
---|---|---|---|
Line 1: | Line 1: | ||
<!-- Reviewed 20130114 by hazel --> | <!-- Reviewed 20130114 by hazel --> | ||
====== Nvidia Optimus ====== | ====== Nvidia Optimus ====== | ||
- | Some newer laptops nowadays come with what is known as " | ||
- | Despite this disappointment, there is an open source project called Bumblebee that aims to fix this problem. | + | Some laptops come with what is known as " |
+ | |||
+ | Historically, there has been an open-source project called Bumblebee that has aimed to fix this problem. Bumblebee | ||
< | < | ||
Line 13: | Line 14: | ||
</ | </ | ||
- | ==== X11 and Other Programs without Bumblebee | + | ==== Note: The Intel Driver is Often Sufficient |
- | You do NOT need to use Bumblebee in order to use X11, KDE, Compiz-Fusion, | + | |
- | If you still wish to use Bumblebee to switch between the nVidia GPU and the Intel GPU, read on. We just wanted to clarify that Intel' | + | You do //not// need to use Optimus via Bumblebee or the nvidia proprietary driver in order to use modern applications and desktop environments under X11. The Intel graphics often provide sufficient 2D and 3D acceleration for those programs to work smoothly without having to use the nVidia GPU. If you still wish to use Bumblebee to switch between the nVidia GPU and the Intel GPU, read on. We just wanted to clarify that Intel' |
==== Installing Bumblebee ==== | ==== Installing Bumblebee ==== | ||
Line 237: | Line 237: | ||
Module=nouveau | Module=nouveau | ||
</ | </ | ||
+ | |||
+ | ==== Official Optimus Support with the nVidia Proprietary Driver ==== | ||
+ | ---- | ||
+ | === Note === | ||
+ | |||
+ | This will //not// work with Slackware 14.2 or any stable version of Slackware, as at the time of writing. Slackware Current is required. | ||
+ | |||
+ | === Dependencies/ | ||
+ | |||
+ | **//From main -current tree://** | ||
+ | |||
+ | * '' | ||
+ | |||
+ | Do not try this with older versions - it will //not// work. Certain specific git commits are required to have been added to xorg-server; | ||
+ | |||
+ | * '' | ||
+ | |||
+ | Patrick Volkerding recently changed ' | ||
+ | |||
+ | The one with the package-name ' | ||
+ | |||
+ | **//From SlackBuilds.org:// | ||
+ | |||
+ | * '' | ||
+ | |||
+ | Build normally. I got a gcc mismatch error as I am using a kernel that is quite old. I was able to override it successfully by adding the environment variable spouted out by the nvidia installer during the build process when it failed the first time. YMMV. For best results, build nvidia-kernel using the same version of gcc that was used to build the kernel itself. | ||
+ | |||
+ | * '' | ||
+ | |||
+ | Be sure to build with '' | ||
+ | |||
+ | === Next Steps === | ||
+ | |||
+ | Once you have the packages listed above installed, I would recommend rebooting. | ||
+ | |||
+ | I would also recommend changing your runlevel to 3 if it is currently 4. | ||
+ | |||
+ | Once you have rebooted into runlevel 3, ensure that the '' | ||
+ | |||
+ | < | ||
+ | $ lsmod |grep nvidia_drm | ||
+ | </ | ||
+ | |||
+ | As root, add the following to ''/ | ||
+ | |||
+ | < | ||
+ | # cat << EOF > / | ||
+ | Section " | ||
+ | Identifier " | ||
+ | Option " | ||
+ | Screen 0 " | ||
+ | EndSection | ||
+ | |||
+ | Section " | ||
+ | Identifier " | ||
+ | Driver " | ||
+ | EndSection | ||
+ | |||
+ | Section " | ||
+ | Identifier " | ||
+ | Device " | ||
+ | EndSection | ||
+ | |||
+ | Section " | ||
+ | Identifier " | ||
+ | Driver " | ||
+ | EndSection | ||
+ | EOF | ||
+ | </ | ||
+ | |||
+ | Note that the official nVidia documentation seems to indicate you only need the following: | ||
+ | |||
+ | < | ||
+ | Section " | ||
+ | Identifier " | ||
+ | Option " | ||
+ | EndSection | ||
+ | </ | ||
+ | |||
+ | However, for me this has //not// worked. YMMV. It is possible that, in the future, a more minimal configuration will in fact work. It is suggested that this be monitored at this time. As is often the case with Xorg configuration, | ||
+ | |||
+ | Next, launch your xserver. | ||
+ | |||
+ | If GPU screen creation was successful, the log file ''/ | ||
+ | |||
+ | If that is the case, the following command: | ||
+ | |||
+ | < | ||
+ | $ __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia glxinfo |grep ' | ||
+ | </ | ||
+ | |||
+ | should display: | ||
+ | |||
+ | < | ||
+ | OpenGL vendor string: NVIDIA Corporation | ||
+ | </ | ||
+ | |||
+ | and the following command: | ||
+ | |||
+ | < | ||
+ | $ glxinfo |grep ' | ||
+ | </ | ||
+ | |||
+ | should display your integrated GPU's vendor as opposed to NVIDIA (e.g., Intel). | ||
+ | |||
+ | You can then test using something like: | ||
+ | |||
+ | < | ||
+ | $ __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia glxgears | ||
+ | </ | ||
+ | |||
+ | You can now launch any program using your Nvidia dGPU by utilizing those two environment variables and prepending them to the program command you are running. I would refrain from using the GUI tools that come with nvidia-driver. | ||
+ | |||
+ | As per usual, YMMV. | ||
+ | |||
+ | === Known Issues === | ||
+ | |||
+ | BrokenCog on IRC has reported that this setup may not work with external monitors. | ||
+ | |||
+ | Again, as indicated above, we are working as a community to find out what the abolute minimum manual xorg.conf settings are in order to just get Optimus working. As per usual with xorg settings nowadays, the less you can get away with manually specifying, the better. The xorg server works best when it can just do its own autoconfig to the largest extent possible, in my experience. | ||
+ | |||
+ | Do //not// try to run applications by setting '' | ||
==== FAQ That Google Might not Answer ==== | ==== FAQ That Google Might not Answer ==== | ||
Line 274: | Line 396: | ||
* New SlackBuilds: | * New SlackBuilds: | ||
* Originally written by [[wiki: | * Originally written by [[wiki: | ||
+ | * Section on official Optimus support by the nvidia proprietary driver contributed by [[wiki: | ||
<!-- Please do not modify anything below, except adding new tags.--> | <!-- Please do not modify anything below, except adding new tags.--> | ||
{{tag> | {{tag> | ||
+ |