Call for testing: optimus-switch



not sure but nomodeset may cause other issues (e.g. nvidia uses this nvidia-modeset module not sure if this would affect this). I think I’ve also read recommendations not using nomodeset (in various places). But maybe this is the way to go for tchavei.

thats the issue with the whole optimus-on-linux-thing:
too much fiddling around


Then it maybe better to create Github issues. Dealing with different issues on the same topic is too confusing.
Each setup is different, with different problems…
It should be simpler if we had logs…


an update to @usersuser 's issue. (artifacts around cursor when using prime mode)

seems to of been something to do with sddm/kde starting too quickly, but only on nvidia prime mode. fixed with adding a short sleep to sddm.service .

@usersuser , thanks for your participation in testing optimus-switch… :+1:


Very nicely done on tracking down that bug. I’m glad to see you are getting participation and positive feedback on your project. :+1:


I am following the instructions on and I ran across the following -

  • check mhwd -li to see what video drivers are installed, for this to work, you need only
  • video-nvidia installed,

I have the following output -

[reik@reik-msi ~]$ mhwd -li
> Installed PCI configs:
                  NAME               VERSION          FREEDRIVER           TYPE
           video-linux            2018.05.04                true            PCI
video-hybrid-intel-nvidia-bumblebee            2018.08.09               false            PCI

Warning: No installed USB configs!

I removed video-linux.
When trying to remove video-hybrid-intel-nvidia-bumblebee I was unable to because of conflicts with cuda, nvtop and python-pycuda.
I removed cuda, nvtop, python-pycuda, python-tensorflow-opt-cuda, python-pytorch-cuda, opencv-cuda and cudnn and was able to remove video-hybrid-intel-nvidia-bumblebee.
I installed video-nvidia.

I ran -

sudo pacman -S linux-headers acpi_call-dkms xf86-video-intel git (I chose linux419-headers)
sudo modprobe acpi_call
git clone
sudo chmod +x ~/optimus-switch/
cd ~/optimus-switch
sudo ./

After reboot I get a flashing screen and I am unable to even boot into tty.

Removing optimus-manager broke system
  • did you remove optimus-manager the way i mentioned in your other thread? it’s the way optimus-manager must be removed. (disable optimus-manager services/s , then run cleanup), and then uninstall.
  • also uninstall anything bbswitch?
  • im not sure if all those packages get pulled back in by video-nvidia, for future reference you can force the removal of drivers with mhwd.

  • check the following directories, the only video/gpu related .conf files will be named either
    99-nvidia.conf (when nvidia mode) or 99-intel.conf (when intel mode). any others should not be there and can be removed. after removal run the set-nvidia or set-intel script again and reboot.
    /etc/X11/ (should have no gpu .conf files)
    (check contents of these 2 and make sure no related/needed modules are blacklisted, optimus-switch handles blacklisting gpu modules on its own)

  • if you still need further troubleshooting, lets use the thread you created previously to do that since this is a development thread, im watching both so i’ll know if you post and i can respond.

Optimus-manager alternative

just wanted to post another summary of another install of optimus-switch


First of all thank you for your work!

I have only one issue after setting up everything.

I am using an external monitor connecting to the nvidia card trough minidisplay port.
As far as I know there is no way to make that screen work when I’m in intel-only mode since the nvidia card is deactivated. I’m fine with this and it was an expected behaviour.

That being said, when I activate the nvidia card and reboot, the external monitor works perfectly.
Here is the catch. The laptop monitor is blank. It probably has something to do with the fact that the laptop monitor was set to disabled (trough KDE - system settings-display and monitor, external monitor is set to primary) since I don’t need it when the external monitor is connected, the lid is closed anyway.

It seems, it stays disabled when the monitor is not connected tough.

This is what Xrandr says:

the laptop screen is eDP-1-1

What I tried:

Enabling the laptop screen when the external monitor is connected trough system setting - display and monitor. I get the following error message:

"Sorry, your configuration could not be applied.

Common reasons are that the overall screen size is too big, or you enabled more displays than supported by your GPU."

nomode settings kernel flags - xrandr can’t see eDP-1-1 anymore

-Forcing the monitor on trough xrandr. While it kinda works it’s more like a wonky workaround.
I manually have to add mode-s and can’t seem to set the laptop screen refresh rate to 120hz, which was working fine before. Also it only works if the monitor is connected


xrandr: eDP-1-1 is not disconnected but has no modes

you can add a mode with xrandr. let me take a look how that would go.

so right now your laptop display eDP-1-1 does not work at all in nvidia mode? or only after disconnecting from the external monitor?


As I mentioned I can turn on the laptop screen via xrandr if I manually add a mode while the monitor is connected to the laptop. I haven’t tried it when it was not connected.

If I boot the laptop without the monitor, it boots to a blank screen. I still have access to tty-s tough. If I boot the laptop without the monitor, then connecting it after boot, it works just fine, while the laptop screen stays blank.


-xrandr after manually adding mode

Right now the screen is mirrored on both displays.


Sorry to intrude, and excuse my ignorance.

What about restarting the display manager from the tty.?


can you try and do a boot without the external display connected to make sure the screen turns on like it should and also post the output of xrandr but not as an image, post the output with 3 backtics ``` above and below the output so its formatted properly

i think this would probably work but i think adding both monitors to the xorg configuration in
/etc/switch/nvidia/nvidia-xorg.conf would be a more permanent option so they are both identified


You know me, I always think about a service solution. I’ve been spending too much time testing services. I’ve got systemd on the brain. :brain:


can you try and do a boot without the external display connected to make sure the screen turns on like it should and also post the output of xrandr but not as an image, post the output with 3 backtics ``` above and below the output so its formatted properly

If I boot without the monitor connected I only have access to tty. Executing xrandr in tty2 will trigger “Can’t open display”.

If I connect the external monitor at this point, it’s recognized and working fine. TTY 2 is stuck on the laptop screen.

What about restarting the display manager from the tty.?

Excuse my ignorance. How would one properly do that in case its SDDM?


ive found them to be more and more useful lately, in this case though i think defining each monitor and the appropriate modeline for each should do it, right now by default the nvidia xorg configuration is only setup for 1 monitor which is normal

sudo systemctl restart display-manager

should do it for you.


can you post output of:
grep -v ^# /etc/X11/xorg.conf.d/*.conf
grep -v ^# /etc/X11/mhwd.d/*.conf
also, what are the specs on your laptop screen? 1920x1080 120hz?


You are of course right, that is the proper way to go about it.

I will take my leave, so as not to confuse matters.


Sorry to intrude, and excuse my ignorance.
What about restarting the display manager from the tty.?

Just did this. Doesn’t seem to change anything. I mean it restarts, but still can only access ttys.


hey, im figuring it out as i go myself, i dont have a dual monitor setup so this is not something i ever setup but IIRC needs each monitor defined in a xorg conf for it to work properly