Call for testing: optimus-switch

nvidia
optimus
switch

#23

As someone who is using his script on Gnome, I can say that it works exactly as advertised. I have switched between the two graphics cards multiple times without issue.


#24

Well let’s hope it works as nice with xfce :grin:


#25

Well, I got it working on Deepin…:smirk:


#26

yes, thank you. i would love the feedback. lightdm optimus-switch


#27

Ok. I’ll report back when I get it working


#28

BTW

What will happen to fonts and layouts? When I originally switched from bumblebee to prime, my font visually changed a bit and I had to adjust some stuff to make it look good for me. Will I experience visual changes each time I switch between Intel / Nvidia?

I would primarily use Intel but switch to Nvidia whenever I use an hdmi projector attached to the laptop.


#29

when i switch (obenbox/xfce) i see no difference in appearance. on gnome it works perfectly too. on my kde install the font size is a little off but i think thats because when i switched from bumblebee to prime on kde i went about changing the size of everything the wrong way and created a mess. i think you should be good.

i use openbox primarily, i just had to check inxi to see if im on nvidia or intel.


#30

I just tried your script.

Something doesn’t work on my system. I’ll give more info once I manage to boot it. Doesn’t even want to boot in run level 3 right now.

And I thought this was going to be a boring afternoon


#31

:thinking: if you can get to a tty, please try setting intel mode sudo set-intel.sh and reboot. and check /etc/X11/mhwd.d and /etc/X11/xorg.conf.d . the only gpu related files should be 99-nvidia.conf if in prime mode and 99-intel.conf when using intel

i think further troubleshooting should be done in a new thread or dm so the whinery doesnt turn into a support thread.


#32

sure but I did sudo set-intel.sh before rebooting which might have broke things in the first place.


#33

When in Nvidia mode there are artifacts around the cursor around anything that moves, latte dock, youtube videos and in-game. Notice the firefox logo when I move my cursor over it.Screenshot_20190218_172713


#34

i sent you a direct message so we can troubleshoot. im not sure if manjaro development category can be used for troubleshooting but we can post cause/solution when figured out. it’s likely a configuration left behind from before install but we can figure it out.


#35

Maybe move the topic to #manjaro-development:unstable-branch, so troubleshooting is obvious?
I would suggest troubleshoot in the topic, so others will be informed, or get some assistance …


#36

i wasnt sure so i figured i would summarize instead of clog up the thread. here is the important parts.

@petsam maybe its as you said not necessary to include a /mhwd.d configuration. the switching is working the way it should, it seems the artifact issue is only present when using nvidia prime setup.

i also suggested trying diff compositor options.


#37

Not sure that’s a good idea… It’s mostly troubleshooting and checking configs. The topic would probably overwhelmed with all the code posting.

In my particular case, Nvidia mode works flawlessly while Intel mode doesn’t work at all until I plug a dongle, TV, monitor or projector into the available hdmi port. We’re still trying to figure out how to force default screen in Intel only mode. It’s wierd. It doesn’t really default to the external hdmi port but the lcd only works if something is plugged in the hdmi port.


#38

@tchavei has a different issue, nvidia mode works fine. its intel mode that im thinking just needs the correct xrandr command run at boot to specify the monitor. he gets a black screen in intel but after plugging an hdmi cable, then both the hdmi and laptop monitors work and remain working after hdmi is unplugged.

im reading through man xrandr to figure out how to specify the laptop monitor, then it can be added to the display setup script like it is when using nvidia.

with prime setup its:

xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto

using intel, i dont know how to specify it. any suggestions?
intel-virtual-output?


#39

intel shouldn’t need any (also executing above commands also shouldn’t cause any issues if not using nvidia).

check Xorg.log regarding laptop display (probably lvds?)

or try if forcing display on via cmdline with video=output:e helps temporarily
(also maybe specifying edid, e.g. with drm.edid_firmware=edit/edit.bin [in /usr/lib/firmware/ folder] may help)

https://wiki.archlinux.org/index.php/kernel_mode_setting#Forcing_modes_and_EDID
https://wiki.archlinux.org/index.php/kernel_mode_setting#Forcing_modes


#40

when using intel mode it only has
xrandr --auto
which likely shouldnt be needed either but figured it wouldnt hurt either…?

im checking the links you posted


#41

no, should also not cause issues (but just in case before trying anything different tchavei could comment the command temporarily)

edit:
e.g.:
if I’m using nvidia with modeset=1 module option, my dmesg gets spammed with “wrong/missing edid for VGA-0” (or something similar) messages (which dont cause issues, they just spam dmesg) and I’ve to force the output off via video=output:d (I dont have anything connected to VGA connector)


#42

i found this little nugget at the bottom of the arch wiki interesting.

Disabling modesetting

You may want to disable KMS for various reasons, such as getting a blank screen or a “no signal” error from the display, when using the Catalyst driver, etc. To disable KMS add nomodeset as a kernel parameter. See Kernel parameters for more info.

Along with nomodeset kernel parameter, for Intel graphics card you need to add i915.modeset=0 and for Nvidia graphics card you need to add nouveau.modeset=0 . For Nvidia Optimus dual-graphics system, you need to add all the three kernel parameters (i.e. "nomodeset i915.modeset=0 nouveau.modeset=0" ).

which seems very fitting, considering he’s using the intel driver. i may not need to specify it but maybe he does? add it to modprobe.d perhaps when using intel?

echo "options i915 modeset=0" | sudo tee /etc/modprobe.d/i915.conf

that would be the same as i915.modeset=0 as a kernel parameter, no?