Skip to content

FAQ, common issues, troubleshooting

nwildner edited this page Jul 3, 2024 · 14 revisions

General troubleshooting advice

In case of trouble, check the following logs :

  • optimus-manager logs inside the folder /var/log/optimus-manager/

  • optimus-manager service log : view the log with the command journalctl -u optimus-manager.service. Add -b0 if you want to see the logs for the current boot, -b-1 for the previous boot, etc. Add --no-pager if you need to copy-paste.

  • Display manager service log : journalctl -u <name>.service where <name> can be gdm (for Gnome), sddm (for KDE) or lightdm (for Xfce).

  • Xorg log at /var/log/Xorg.xxx.log or ~/.local/share/xorg/Xorg.xxx.log.

  • Kernel logs : journalctl -k

The Arch wiki can also be a great resource for troubleshooting. Check the following pages : NVIDIA, NVDIA Optimus, Bumblebee (even if optimus-manager does not use Bumblebee, some advices related to power switching can still be applicable)

FAQ

Help, optimus-manager is preventing my system from booting, therefore I can't disable it

Edit your bootloader entry at boot time and add the parameter systemd.mask=optimus-manager.service to the kernel command line. This will allow you to boot normally but with optimus-manager disabled.

Alternatively, you can also use systemd.unit=multi-user.target. This will boot you in a TTY, where you can log in and remove the optimus-manager package.

Also, please consider opening a GitHub issue about the problem.

How can I check which GPU my X session is running on ?

Run optimus-manager --print-mode. Alternatively, you can run glxinfo | grep "OpenGL renderer" to get the name of the current GPU.

When I switch GPUs, my system completely locks up (I cannot even switch to a TTY with Ctrl+Alt+Fx)

It is very likely your laptop is plagued by one of the numerous ACPI issues associated with Optimus laptops on Linux, and caused by manufacturers having their own implementations. The symptoms are often similar : a complete system lockup if you try to run any program that uses the Nvidia GPU while it is powered off. Unfortunately there is no universal fix, but the solution often involves adding a kernel parameter to your boot options. You can find more information on this GitHub issue, where people have been reporting solutions for specific laptop models (but please do not report optimus-manager issues there). Check this Arch Wiki page to learn how to set a kernel parameter at boot.

You can also try different values for the options switching and pci_power_control in the optimus-manager configuration file (section [optimus]).

GPU switching works but my system locks up if I am in Intel mode and start any of the following programs : VLC, lspci, anything that polls the PCI devices

This is due to ACPI problems, see the previous question.

I do not want optimus-manager to log me out automatically

Set the option auto_logout to no in the config file (section [optimus]). When that option is set, GPU switching takes effect the next time you log out then log in into your session.

My Vulkan applications/Steam Play/DXVK games do not work in Nvidia mode

If you have Vulkan drivers installed for both your Intel and Nvidia GPUs, it can happen that applications try to use the Intel GPU even though your desktop is switched to the Nvidia one. This causes a crash since the Intel GPU is not actually available. To work around this, set the environment variable VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json before starting your application.

I think my Nvidia GPU stays powered on even in Intel mode (my battery drains too fast)

The default PCI power management does not work for some laptop models. Try switching the power switching backend to bbswitch (option switching, Section [optimus]). Note that it might cause system lockups on some laptop models, refer to the related FAQ item above.

Also remember to check journalctl -k for errors related to nouveau or PCI power management.

When I try to switch GPUs, I am not automatically logged out

Auto-logging-out is supported for the following desktop environments and window managers: Gnome, KDE Plasma, Xfce, Deepin, i3, Openbox, AwesomeWM, and bspwm. If you use another one, you have to manually log out of your session for the GPU switch to take effect.

If you use one of those environments and that feature still does not work, consider opening a bug report.

My display manager is not SDDM, LightDM nor SDDM

In that case you must manually configure your display manager so that :

  • It uses Xorg (no Wayland)
  • It runs the script /usr/bin/prime-offload just after starting its display server for the login screen
  • It runs the script /usr/bin/prime-switch as root after the current user has logged out.

I do not use a display manager (I use startx or xinit)

Just like above, you must make sure to run /usr/bin/prime-offload (as normal user) just after the X server is started, and /usr/bin/prime-switch (as root) after it has stopped.

After trying to switch GPUs, I am stuck with a black screen, or a black screen with a blinking cursor, or a TTY login screen

First, make sure your system is not completely locked up and you can still switch between TTYs with Ctrl+Alt+F1,F2,etc. If you cannot, refer to that question.

Try switching back and forth between TTYs, then back to TTY 1 or TTY 7 (for some reason, GDM can fail to auto-restart the X server of the login screen until you have done that). If that does not work, it could mean that the X server failed to restart.

To troubleshoot the issue, check logs. In addition to the optimus-manager logs, you can also check the Xorg logs for more information. Those logs are usually at /var/log/Xorg.0.log or ~/.local/share/xorg/Xorg.0.log (they may have a different number than 0). If you managed to return to a graphical session, be sure to include the log from the server that failed and not the running one (the logs from the previous attempt end with the .old extension).

Some fixes you can try :

  • Setting the power switching backend to bbswitch in the configuration file (section [optimus], parameter switching)
  • Setting modeset to no in the [intel] and [nvidia] sections
  • Changing the driver name in [intel] from modesetting to intel
  • Changing the DRI versions in [intel] from 3 to 2

After switching GPUs, I experience poor CPU performance or heavy stuttering, or my external video outputs do not work

If the problem occurs after switching to Nvidia, try setting modeset to no in the [nvidia] section of the configuration file.

If the problem occurs after switching to Intel, try setting modeset to no in the [intel] section of the configuration file, or you can also try disabling nouveau by setting the switching option in the [optimus] section to bbswitch. Note that those two fixes may prevent you from using your video outputs (such as HDMI) in Intel mode.

When I switch to Nvidia, the built-in screen of the laptop stays black but I can still input my password or use monitors plugged to a video output

It seems that Prime is not properly configured. Please open a GitHub issue with logs attached, and include as much details about your login manager as you can.

Is optimus-manager compatible with the default Nvidia control panel, or GPU tweaking tools such as GWE or BlueGoliathFX ?

Yes, as long as you run them while you are in Nvidia mode. In fact, optimus-manager enables the "Coolbits" option by default so that overclocking options are unlocked. However, it's important that you do not use any option that could write a new configuration file to /etc/X11/xorg.conf or into the folder /etc/X11/xorg.conf.d/. In particular, do not use the Save to X Configuration file button in the Nvidia control panel.

Overclocking and fan control stay locked in hybrid mode, even though Coolbits are set

This is a known limitation of hybrid mode, for now. You need to use Nvidia mode to set those parameters or, depending on the Login manager being used, add the needs_root_rights = yes line to the file /etc/X11/Xwrapper.config as explained in this case

Also, please take a look at the following case for setting static Nvidia GPU clocks via coolbits and X (pre-Turing GPUs), and manipulaing /etc/optimus-manager/xorg/nvidia-mode/nvidia-gpu.conf for such feature.

Could this tool work on distributions other than Archlinux or its derivatives ?

It is unecessary on Ubuntu-based distributions (such as Ubuntu itself, PopOS, Mint...) because Canonical has developed their own solution called nvidia-prime (which optimus-manager borrows heavily from).

Porting optimus-manager to other distributions could probably be done, though.

Clone this wiki locally