After installing optimus-manager GDM restarts a few times before finally switching to Nvidia, resume doesn't work

Hello! Newb here.

Things seem to work ok: sometimes I have GDM restarts a couple times before it finally works (I have to try logging in a few times), or sometimes tty1 is empty/black and I have to switch back and forth a few times until it appears, and lastly resume from suspend doesn't work yet.

But maybe this is because of my /etc/modprobe.d settings? Mine don't look like the ones described in the OP. I have only the file /etc/modprobe.d/mhwd-gpu.conf and it looks like this:

blacklist nouveau
blacklist ttm
blacklist drm_kms_helper
blacklist drm
options nvidia "NVreg_DynamicPowerManagement=0x02"

Can someone provide some insight as to what that does, and should I replace that with

blacklist nouveau
blacklist nvidiafb
blacklist rivafb
options nvidia_drm modeset=1


Just asking, because it looks different than the OP, and perhaps the defaults are already the best option.

I installed optimus-manager which sort of works (GDM restarts a few times before finally switching to Nvidia, resume doesn't work, sometimes tty1 is blank and eventually works after switching tty and coming back a few times).

The optimus-manager tutorial (Guide: Install and configure optimus-manager for hybrid GPU setups (Intel/NVIDIA)) covered only modifying /etc/X11/ files, but did not mention anything about /etc/modprobe.d/ files, so some things are still a little unclear.

Did you switch to gdm-prime?

The official documentation doesn't say anything about that. I think it assumes that this is properly set for Nvidia.

Mine /etc/modprobe.d/mhwd-gpu.conf is:

## Generated by mhwd - Manjaro Hardware Detection
blacklist nouveau
blacklist ttm
blacklist drm_kms_helper
blacklist drm
options nvidia "NVreg_DynamicPowerManagement=0x02"

However, since I use nouveau to switch GPUs, also have access to Nvidia on Intel session via nouveau and see some nouveau error in journalctl, I consider commenting blacklist for nouveau. MHWD is not meant for optimus-manager so if it created this file, the configuration may not be optimal.

EDIT: I commented out blacklist nouveau:

#blacklist nouveau

After reboot, all still works as it should - switching between GPU modes, fine, Steam works OK too.

Now that I think about it more, when we disable mhwd.conf, this mhwd-gpu.conf should have not matter...

Yep, I installed that from AUR with pamac, and it replaced gdm.

Another thing that happens is graphics may be little bit glitchy after I come back from suspend, and resizing a window usually fixes the issue, but otherwise the desktop still works. As an example, the clitches make certain parts of GDM, or of some parts of apps (like VS Code) have colorful noise (like a broken TV). Then when I resize the window it goes away. Another example is terminal rendering in VS Code is totally broken showing only certain characters at random and resizing doesn't help; I need to close the terminals and open new ones.

No issues when on Intel (except for unbearable overall slowness unlike the zippy-smooth Nvidia experience despite the glitches). Intel is so slow that it seems to not just impact graphics but everything (like running build processes and graphics itnerfere with each other, making apps sometimes unresponsive whenever I am rebuilding code in my projects, which doesn't happen while on Nvidia).

Another thing that happens when I come back from Suspend while on Nvidia is that GDM is sometimes unresponsive for a minute or two, and will freeze for moments of time, then have a spurt of speed, then freeze again. While I am entering my password, it will input a few characters fine, then freeze, and after a few moments when it unfreezes it will repeat my last key strokes many times thus messing up what I have typed. This freezing and unfrezzing goes on for a minute or two.

It doesn't happen on Intel. But after I log in, then the freezing is gone for the most part (though I've experienced it a couple times in the desktop). Maybe it has to do with the fact that I only have 8GB of RAM, and have not yet filled the 128GB capacity with new SODIMMs yet, and is switching from swap or something? I've no idea yet.

One thing I haven't tried yet is trying different "switching methods" in optimus-manager. The options are "Bbswitch", "Nouveau", "ACPI Call", and "None"; I currently have "None" selected. I also see a "PCI reset" option; no idea what that is yet.

Yep, that is identical to mine that MHWD created. I have a feeling I should not try to use nouveau, as I have the nvidia 440xx prime driver installed. (Right?)

I guess if I want to configure this stuff to be non-MHWD managed, then I'll need to learn what that all means.

What mhwd.conf? After installing my system, I only see one file in there, /etc/modprod.d/mhwd-gpu.conf.

I suppose I will need to play around with the config options. I'm afraid to break the system, but I guess if I back everything up I should be fine by simply restoring the files.

This is a common Nvidia cache bug that is around for a long time. I sometimes see it too on Nvidia.

Maybe it's worth to switch to lightdm? I'm not sure if lightdm supports wayland but I suspect at this point it doesn't matter much.
I've seen GDM causing all sorts of troubles during GPU switching and gdm-prime is not protecting from it, because GDM is just badly designed from the start. Since I'm using Plasma, I have SDDM and it works well.

This is confusing for me too, but from what I've seen, Nouveau is not just a Nvidia free driver, it also allows for managing power state of Nvidia card, so you still can use Nouveau as a switching method but use closed source Nvidia drivers. Also, because Nouveau is a part of kernel, it loads and is accessible all the time, but because of configs, may not be used. This is probably why on Intel modesetting, I can still start Nvidia with Nouveau, because those free drivers talk to each other and don't have artificial constrains as proprietary ones have.

That looks like a hardware related problem. I don't see any difference between Intel and Nvidia aside gaming of course. Or you have some bad config or issue on Intel that causes it? Hard to say. Check out if you don't have any CPU or Intel GPU power used on idle.

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

Forum kindly sponsored by