bayasdev / envycontrol

Easy GPU switching for Nvidia Optimus laptops under Linux
MIT License
1.22k stars 62 forks source link

Cannot switch to hybrid mode #46

Closed dextertd closed 2 years ago

dextertd commented 2 years ago

Hi. Firstly I want to thank all contributors for their efforts in this repo. We are all suffering under the shared weight of Nvidia proprietary drivers...

I am having limited success in switching between modes with envycontrol. A bit of context: I'm using a Thinkpad and I tested first with its UEFI mode set to "hybrid mode" then with "discrete mode".

After installing envycontrol a query tells me I'm in hybrid mode. I am able to use the laptop and external monitors at this point, although it's laggy and unusable.

Switching: UEFI mode - hybrid

hybrid -> nvidia

Switching from hybrid to nvidia is successful and I can use external monitors perfectly.

nvidia -> hybrid

Switching back to hybrid is not successful. Whilst booting up it gets completely stuck on a black screen with text "... clean... files". To recover I can get to TTY2 with Ctrl+Alt+F2 and then switch back to nvidia and reboot.

nvidia -> integrated

envycontrol does not allow switching from nvidia to integrated (although I'm not sure why).

However, if I switch to hybrid, then via TTY2 switch to integrated, that boots up just fine. Switching from there to nvidia is also successful.

integrated -> hybrid

Switching from integrated to hybrid doesn't work but I can recover via TTY2.

Switching: UEFI mode - discrete

I then restored using timeshift to before envycontrol was installed, then reboot and changed the Thinkpad UEFI to discrete mode. envycontrol tells me I'm in hybrid mode even though I am definitely using the Nvidia GPU as external monitors work perfectly.

hybrid -> integrated

This fails. When booting back up there is a black screen and no way to use TTY2. Had to use livemedia to timeshift restore.

hybrid -> nvidia

$ sudo envycontrol -s nvidia
Error: could not find Intel or AMD iGPU

hybrid -> hybrid

Works. envycontrol thinks it's switching to hybrid but it's actually using the Nvidia GPU.

Conclusion

So I cannot access hybrid mode after using envycontrol, which doesn't really matter as performs poorly. But I can switch between nvidia and integrated, even if it's not easy. Any combination of the switch options doesn't make any difference in any case.

It is interesting envycontrol says I start in hybrid but can never return, although it's only truly starting in hybrid when using UEFI hybrid, whereas it misreports as hybrid when using UEFI discrete.


Note that /etc/X11/xorg.conf doesn't exist and /etc/X11/xorg.conf.d only has

00-keyboard.conf  30-touchpad.conf  90-mhwd.conf

Posting this on my journey to tame Nvidia hardware... Things are not looking optimistic.

DaVikingMan commented 2 years ago

Which gpu are you using?

dextertd commented 2 years ago

3050 ti. But I have since returned this laptop having found no way to fix the issue. So I'll close this issue.

robertpro commented 1 year ago

@DaVikingMan I'm experiencing exactly the same issue with the same video card, I'm also able to help debug the issue, please let me know how I can help and if I should create another issue or you want to re-open this.