I am running Arch (not using any display manager) on a optimus laptop and decided to use optimus-manager to manage my NVIDIA card and the iGPU.
According to this guide, I have installed the optimus-manager package from AUR and set dynamic_power_management=fine in the config file to enable Runtime D3 power management (link).
So my question is where do I add these two run commands, in .bash_profile or .xinitrc? And how do I run the second command as root? for e.g.- add sudo ./usr/bin/prime-switch in the file, then how am I supposed to supply my password?
You actually may need to install an extension for this as you are using gnome in addition to the other stuff mentioned above. But think you may want to install regular optimus-manager since you are not on kde, qt based DE.
optimus-manager --switch nvidia
to switch to the Nvidia GPU
optimus-manager --switch integrated
to switch to the integrated GPU and power the Nvidia GPU off
optimus-manager --switch hybrid
to switch to the iGPU but leave the Nvidia GPU available for on-demand offloading, similar to how Optimus works on Windows.
I am still a noob to Manjaro, so I am just following video tutorials and go through Arch wiki when I really have no choice. Previous nvidia drivers installation was successful, like a year ago, and I didnt have such struggles.
Thanks in advance to anyone who replies to this post. I hope I have given the info you need about my system, if not, I will provide some more details.
Manjaro ships with a default configuration for SDDM (the default login manager for KDE) which overrides some keys needed by optimus-manager. To use optimus-manager, you need to edit the file /etc/sddm.conf and simply put a # before the line starting with DisplayCommandand the one starting with DisplayStopCommand.
I'm trying to be able to use my Nvidia GPU for certain applications while keeping the integrated Intel one for running everything else. I had tried this by installing optimus-manager & optimus-manager-qt, but was still having problems.
Seems like this is a common problem, but I'm especially confused since so new to trying anything with GPU switching or hardware configuration in general. Would definitely appreciate any help or input that anybody might have!
I've done this -- and despite the GPU being an RTX3070 Max-Q running nvidia-all drivers and tkg kernels, the power hit when not plugged in is barely noticeable back to when I had Optimus turned on.
Granted, with the Intel disabled or not, the battery life, playing a full-maxed out, modern game, is still just under 2 to 3 hours (huge difference between playing say Cyberpunk 2077, and playing a 2D roguelike).
Using basic applications/desktop-only, YMMV. I used to have a It also has a sizeable battery. My inxi if you are curious. And if you are still curious, be sure to disable the Intel Integrated G(shit)PU by going to the chipset menu of your BIOS and it will say something like:
Are there any issues to be concerned with by trying @cwantenoise 's suggestion about disabling the intel card in the BIOS? If not, how do I check to see which card is active? I guess, if not using optimus-manager, is there no way to do outright global GPU switching while booted into the OS?
As we have previously reported here, optimus-manager, the GPU manager for laptop setups was going silent because the main developer didn't have the time or resources to keep that project running on Github. Looks like it's coming back!
After I got notified that a long-standing bug I'm participating in related to PCI ID generation missing the Domain ID on Xorg configuration generation was closed as fixed, I've noticed that a bunch of other stale Pull Requests got merged recently too.
Referring back to the main discussion thread, "The state of optimus-manager", to my surprise someone nicknamed es20490446e is doing all the hard work to get the software active again and asking people to deliberately tag him on pull requests so he can better handle them because he is not (yet) the owner of the software.
It's nice to have such piece of software back into active state. I've switched back to envycontrol recently because of optimus-manager being abandoned and crashing a lot on newer kernels but, since this software is more feature rich and also supports some of my VFIO (GPU pass-through) stuff, I would definitively give it a try again when it gets in a better shape again.
My understanding is the Fedora 33 and above uses Prime render offloaded by default when using an Nvidia GPU with drivers from RPM Fusion. This process should be set up by default when I install the drivers from RPM Fusion and would allow me to easily switch between the different GPUs by either launching them with
prime-run
from the terminal or right-click and select launch with dGPU from the app context menu in Gnome. Is this correct? Will additional PGU driver setup not be necessary? And will I be able to launch an app with the dGPU by right-clicking it?
Additionally, the Prime render offloader constantly powers both the low-powered iGPU and the power-hungry dGPU, which may reduce battery life. On Ubuntu or Arch, I often had the option to completely power-off the Nvidia dGPU, followed by a re-login, to save battery life even further(or only use the dGPU for better performance). Is such a feature available for Fedora as well?
Yep, but disabled and powered off are two entirely different things for items that are integrated into the motherboard. A system that has the dual gpu config can AFAIK only have one of the gpus active for one task. The one that is not in use is (pick your choice): disabled, idle, unused, inactive, etc. Regardless of software, and even if the driver is not loaded, the inactive gpu is still drawing standby power since the motherboard is powered.
optimus-manager provides a workaround to this problem by allowing you to run your whole desktop session on the Nvidia GPU, while the Intel/AMD GPU only acts as a "relay" between the Nvidia GPU and your screen.
Optimus works very fine on Linux. After downloading the propitiatory driver, restart your laptop, open the Nvidia X application and in the PRIME profiles option, set your GPU mode to Nvidia On Demand. Restart one final time and you're done. You are running in optimus mode now.
Also, when you have Prime Offload enabled (that's what optimus on Linux is called), and you want to run an application that doesn't automatically use offload, you can launch it with your GPU with this command:
Enter in sudo -i, then enter your password. The terminal will open as Root.
Enter in nautilus and the File Manager will open with Elevated Privileges.
Navigate to /var/lib/dpkg/info and open the nvidia-340.postinst file in a text editor.
My main daily laptop is a Thinkpad P52 which contains an Nvidia/Intel graphics setup. I have written before about how I have the drivers setup for mobile and docked use cases. I use the Optimus Manager program to allow me to switch between graphics cards and this works well especially as I am mainly at a desk these days.
The solution I found was to create a file in /etc/optimus-manager called optimus-manager.conf. Obviously, if you have one then the change I am about to describe should be added the existing file. Once you open your optimus-maager.conf file you need to add the following
In this post I am sharing how to use optimus-manager to shift between Integrated and NVIDIA GPU on Arch Linux with i3 as the tiling windows manager and no display manager.
(That is you start your Xserver using the startx command).
Basically, we are checking if prime-offload exists then, run it at the start of XServer. Technically, not exactly at start but, before we run our compositor and i3 instance.
And then, we are checking if prime-switch exists then, run it after the i3 instance has ended.
Since NVIDIA does not load kernel mode setting by default, enabling it isrequired to make Wayland compositors function properly. To enable it, the NVIDIAdriver modules need to be added to the initramfs.
If you face problems with Discord windows not displaying or screen sharing notworking in Zoom, first try running them in Native Wayland (more details below).Otherwise, remove or comment the lineenv = __GLX_VENDOR_LIBRARY_NAME,nvidia.
On a hybrid graphics device (a laptop withboth an Intel and an Nvidia GPU), you will need to remove the optimus-managerpackage if installed (disabling the service does not work). You also need tochange your BIOS settings from hybrid graphics to discrete graphics.
To do this easily for Spotify, Arch Linux has a spotify-launcher packagesin their official repos. You should use that instead of the spotifypackage in the AUR. Then, enable the Wayland backend in/etc/spotify-launcher.conf by uncommenting this line:
Install the latest versions of xorg-xwayland, wayland-protocols and Nvidia driver.Ensure xorg-xwayland is at least version 24.1, wayland-protocols is at least version 1.34 and Nvidia driver is at least version 555.These enable explicit sync on the Nvidia driver and should avoid flickering.
If your GPU is no longer supported by the 555 driver, install older Nvidia drivers which do not exhibit this issue. Thelast ones which would work will be the 535xx series of drivers. Thesecan be installed on Arch via these AUR packages
I'm Using Ubuntu 12.04.1 LTS on my Optimus-enabled Asus K55v notebook. This means it features two video cards; an integrated Intel one (1GB shared memory), and a discrete Nvidia Geforce 610M. Regarding this, I have a few related questions:
In the end I found out that the Nvidia GPU performs actually worse through bumblebee than with the integraded Intel GPU enabled with DRI_PRIME=1 setting. I will try again when/if there is a better solution in future.
c80f0f1006