[Optimus Manager] Switching to Nvidia leads to Blank Screen

I didn’t want to uninstall video-linux, because if all fails, I can simply remove 450xx and still manage to boot into a display… Do you think having it is really a problem?

I have this

$ pacman -Qqs nvidia
lib32-libvdpau
lib32-nvidia-450xx-utils
libvdpau
libxnvctrl
linux54-nvidia-450xx
linux58-nvidia-450xx
mhwd-nvidia-340xx
mhwd-nvidia-390xx
mhwd-nvidia-418xx
mhwd-nvidia-430xx
mhwd-nvidia-435xx
mhwd-nvidia-440xx
mhwd-nvidia-450xx
nvidia-450xx-utils
nvidia-prime

There is something weird,why it install the linux414-nvidia-450xx? it never install the linux58-nvidia-450xx for the kernel 5.8,are you sure you boot it up in the correct kernel? you can check what kernel you are with uname -a, and yes you still have the nouveau drivers apparently.

I don’t think it will cause a problem because the modesetting driver for intel is still installed,but i prefer you have a usb with manjaro just in case,playing with video drivers can be a little dangerous :confused:

That was an ignorant mistake I made, when it asked to install bbswitch I just pressed enter without looking and I just installed the default one out of the options which happened to be 414.

Yes I’m running a 5.8 kernel

>>> uname -r                                                                 
5.8.6-1-MANJARO

Yeah, I’ll try doing that with a second opinion :sweat_smile:. I’ve already created a new thread here.

Yeap, that is OK. I also have the same conf with the same lines. I use noveau for switching. I believe, this conf is only for regular mhwd configurations, but optimus-manager requires disabling other graphical confs, including the main mhwd confs, so the other ones, are inactive. If you want, you can disable it (by adding .bak ending to the name) and see if it changes anything. For optimus-manager configuration this shouldn’t do anything as far I know.

I have no idea why people installing it. It’s causing only issues. video-linux mhwd configuration is not needed with Intel-Nvidia combo. Get rid of it, because it’s a potential source of the conflicts. I can’t say if this is the direct cause but if it isn’t, it’s making harder to detect the cause of the issue.

About apparmor, I have no idea. You may try to disable it and see if it helps.

Usually the issues during the switch happen on DM layer, so various confs may be involved here. See your DM logs during the switch. Check if there is something hinting on the root of the problem.

1 Like

Thanks, I’ll try removing video-linux, and apparmor, also I’m a beginner and I don’t know where I should look for to get DM logs…

Don’t remove apparmor. Just disable its service to check if that makes any difference. If not, enable it again:

To disable on boot:

sudo systemctl disable apparmor.service

To stop now:

sudo systemctl stop apparmor.service

Then you can reverse it using start and enable commands, similar like above.

Apparmor discussion is irrelevant here imho.

Regarding your issues:

  1. List your kernels:
    mhwd-kernel -li
  2. Install nvidia modules for your kernels:
    sudo pacman -S [yourkernel]-nvidia-450xx
  3. Install bbswitch for your kernels:
    sudo pacman -S [yourkernel]-bbswitch
  4. List your mhwd configs:
    mhwd -li
    You should have video-modesetting AND video-hybrid-intel-nvidia-450xx-prime only. Everything else must be removed:
    sudo mhwd -r [someconfig]
    Then install what’s necessary:
    sudo mhwd -i -f pci video-hybrid-intel-nvidia-450xx-prime
  5. Disable optimus-manager:
    systemctl disable optimus-manager.service
    At this point you can reboot and your system should be running fine.
  6. Open Pamac app and search for -bbswith. Find all modules you installed for kernel you didn’t have and remove them. Make sure to not uninstall bbswitch modules for kernels you have now.
  7. Open your browser and navigate to optimus-manager github page, click on Wiki link. Read. Setup it if you want. A small tip: don’t use nouveau for switching, well, practically for anything. It’s a source of numerous issues on cards like 1050. Consider blacklisting it. There are 2 switching methods you can try: bbswitch or none.

And please don’t even try to copypaste commands from this post, think before you do something. This thread is so big because you used the reversed order, hence this warning.

5 Likes

I use a Nvidia Geforce 940MX in my notebook. I simply type prime-run COMMAND to run anything i want with my nvidia graphic card, and it’s the same on steam (you can type prime-run %command%)

I don’t know if u can try that to reach your goal, but you can try :slight_smile:

I also use the same driver that you video-hybrid-intel-nvidia-440xx-prime and i also have video-linux activated for nvidia graphic card

For my HD Graphics 620, i have activated video-linux, video-modesetting and video-vesa

Thanks for leaving a detailed explanation! Luckily I managed to get it working, from the other post I wrote, with the help from @michaldybczak. Now I’m able switch without using bbswitch, I’m just using the None mode and it works. I’m adding a summary of what I did(of course all credits go to the people who helped me):

  • Uninstalled all the drivers configurations, and reinstalled video-modesetting and video-hybrid-intel-nvidia-450xx-prime using the command sudo mhwd -a pci nonfree 0300.
  • And then simply followed this guide again.
  • [For gdm users], Install libgdm-prime(probably this did the trick not sure).
  • Added a kernel boot parameter using this post: How to Choose the Proper ACPI Kernel Argument (Not sure if this affected anything but it’s worth giving a shot I suppose).

And that’s it. I rebooted my system and I could login in with no issues using the intel driver.

However, switching using nouveau didn’t seem to work, it just led to the company logo, however I logged into a tty session, Ctrl + Alt + F6 in my case, and switched back to the main tty (Ctrl + Alt + F1), and I could see the login screen again. Voila, it works. Yes it’s a workaround, but I’m happy it works.

Later I tried switching using the None option and I can confirm that it works for me. I could now delete bbswitch without any login issues. So bye bbswitch.

I don’t know either, I haven’t tried stopping/disabling it, but it works.

Yes this was all my fault, if only I had installed the correct version for bbswitch, I probably wouldn’t have faced these issues. Lessons learnt, I won’t do this again. Thanks! :slight_smile:

@XRaTiX, @bogdancovaciu thanks for the valuable inputs, I’m ever so grateful for this community that can tolerate noobs like myself, and lend a helping hand.

5 Likes

Yup, prime-run works perfectly fine, but my goal was to connect my TV to my laptop via HDMI, for which I had to make a switch to Nvidia entirely, or use the Hybrid mode.

Anyways, it’s all sorted now. Thankz :slight_smile:

1 Like

If you set Intel to modesetting, the secondary screen will also work in Intel mode, but then you lost the ability to use Nvidia. It all depends how you use your laptop: are plugged in to AC most of time, how often do you use secondary screen, how often do you need Nvidia, etc.
Anyway, Intel modesetting, hybrid and Nvidia mode now support multimonitor setups.

1 Like

I have tried switching to Intel Only, but my monitor glitches out now and then, I mean I could’ve just lived with it, it’s not that bad, but why waste a dGPU :smirk:

Yes! I’m usually at home all day now and I have an AC supply, so I don’t have to worry about my battery dying.

A lot! The only reason I hesitated switching to Linux was because I didn’t want to waste time with Driver issues(but hey here I am, thanks to you and others that helped me). Now I can ditch Windows forverrr!

1 Like

Lol don’t do that until u have a successful case of severe borking and restoring of Manjaro from a backup or repairing with live system / rescue shell means. Gates’ crapware could be of help in case of urgent Zoom conference or whatnot.

1 Like

Haha, it was a hyperbole :sweat_smile:

In that case hybrid mode may be the best, assuming your secondary monitor works well. In that mode desktop also uses Intel but you can use Nvidia if you wish. The energy usage is higher than on pure Intel, but lower than on pure Nvidia.

Anyway, you can test it easily, since you can switch to any mode you like and set any mode as default. Optimus-manager is just convenient. However, if you are fine with hybrid mode 100% of time, then optimus-manager is not needed, since the default setup through mhwd is a hybrid one. However, on laptop it’s good to have options, just in case :slight_smile:.

1 Like

Okay, I didn’t notice this earlier but running my TV only(as a single display) in Hybrid Mode, is very laggy. With Nvidia only it works super fine. Is that how it’s supposed to be?

There is no lag when I mirror the displays, but the lag is killing me when I switch to single display. Opening nvidia-settings in hybrid mode throws this error in the console:

ERROR: nvidia-settings could not find the registry key file. This file should
       have been installed along with this driver at
       /usr/share/nvidia/nvidia-application-profiles-key-documentation. The
       application profiles will continue to work, but values cannot be
       prepopulated or validated, and will not be listed in the help text.
       Please see the README for possible values and descriptions.

The GUI application still loads though.

In hybrid mode the default GPU is Intel. Nvidia-settings is designed to work in Nvidia mode only. Additionally, you should not use it with optimus-manager! The reason for it is, that optimus managers uses own configs in different location for each driver mode, so the usual configs must be disabled so they wouldn’t interfere. When you save settings with nvidia-settings, it writes them to the usual config, if not present, it creates a new one, which is conflicting with optimus-manager. So if you did this, check your graphical configs according to tutorial once again and disable them.

You can still manipulate Nvidia config but manually and you must know which one is from optimus-manager.

Please, read the optimus-manager documentation, especially Configuration:

As to the lag on the other monitor, I can’t help much. Each monitor is different and reacts differently to software and settings. Laptop monitors are somehow standardized. When you attach different screen, it is most likely that it will have different refresh frequencies tied to different resolutions.
You must also know that rendering additional screen is using more resources than one screen. You can see this when running a game. With secondary screen, FPS count drastically drops.

I don’t know how GPUs are handling multiple screens, but from what I see, they cause issues. For example, on my laptop all is fine and I don’t have any screen tearing, while on secondary screen is huge, so I basically can’t run any videos there. Maybe it’s because it tries to use the same frequency that is meant for laptop screen? I don’t know. Use xrandr utility (or arandr for GUI, but commandline is more powerful, see some articles about xrandr) to check your monitor properties and what settings are being used. Maybe if you tweak them for secondary screen, lag will be gone?

Multiple monitors is a headache. Especially when you try to use TV, which is way worse and less recognizable by drivers, so things may not work as expected, because many TVs were never meant to be used on computer.

It is possible that for such setups something must be added to driver configs but since in hybrid mode you use Intel modesetting (probably), you need to tweak configs for Intel modesetting, not Nvidia ones. If you switch to Nvidia mode, Nvidia probably is better suited for such situations, hence the better behavior.

1 Like

Thats a know bug and nvidia is currently working for a solution

The all new OutputSink feature aka reverse PRIME - Linux - NVIDIA Developer Forums

Reverse Prime Display = Single Display to the monitor

My workaround is to set mirror display and lower the brighness to the min on the laptop monitor,that way you sort of mimic the external display because the min brightness turn off the laptop monitor in KDE,I don’t know if GNOME can do that though.

Yup, I found a simple command in the forum:

echo 0 | sudo  tee /sys/class/backlight/intel_backlight/brightness

Just made a alias to this script, now I can run it anytime. Wrote another alias script to set brightness back too :stuck_out_tongue:

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.