Askannz / optimus-manager

A Linux program to handle GPU switching on Optimus laptops.
MIT License
2.29k stars 167 forks source link

Unable to exit Intel mode. #215

Closed jiv222 closed 3 months ago

jiv222 commented 4 years ago

Describe the bug After reading the documentation here, I followed the guide found on the Arch wiki's page for my device: https://wiki.archlinux.org/index.php/Dell_XPS_15_9570#Use_Optimus_Manager_to_switch After installing optimus-manager and making the recommended changes to /etc/optimus-manager/optimus-manager.conf , I am unable to get out of Intel mode. In particular, this configuration is what I used from the wiki article: [optimus] switching=none pci_power_control=yes pci_remove=yes pci_reset=no

After "changing" to nvidia and manually logging out of DWM, relogging into lightdm does not change the mode from Intel. I tried setting Nvidia as the startup mode, but was met with a blank screen with a cursor before I could reach lightdm. I am also unable to change to the hybrid mode. On a relatively new install, with no other xorg conf files (that I'm aware of).

I've tried using optimus-manager without power-management (using the default conf file), and X was unable to start. Any help would be great, I'd really like to utilize my dGPU.

System info Distro: Arch Linux WM: dwm Display Manager: LightDM Laptop: Dell XPS 15 9570 with i7-8850H and 1050 Ti Kernel: linux 5.5.2-arch1-1 Optimus-Manager Version: Tried on both optimus-manager and optimus-manager-git from the AUR. Nvidia Driver: nvidia 440.59-3

Logs /var/log/optimus-manager/

/var/log/Xorg.0.log https://pastebin.com/GCgyRzpa

Output of journalctl -u lightdm https://pastebin.com/eJryT2ev

Let me know if other logs could be of use. Thanks

Askannz commented 4 years ago

I think there may be two separate issues here. According to the logs, your Nvidia card disappears from the PCI bus when turned off and doesn't come back when switching back to nvidia mode. This is a common issue and unfortunately very model-specific, so I don't know if the wiki configuration is supposed to work or why it doesn't.

But in any case, there must be another issue at play because this shouldn't prevent you from booting into nvidia mode or with power management disabled. Looking at the optimus-manager logs, it seems that you tried this at least once, but the X server for the LightDM greeter failed to start.

Could you run those troubleshooting steps and report any error ?

prime-offload
exec dwm
jiv222 commented 4 years ago

Alright, so I tried the steps above, but the startx command hung, and X failed to start. Tried it with the same .xinitrc after switching startup mode back to intel, and it worked correctly. I believe this Xorg log might be useful. https://pastebin.com/663EiPCi

Also, when running sudo prime-switch, I received similar looking errors related to "drm". Not really sure what that means personally though.

Edit: Looking at the linked file again. I notice it uses /etc/bumblebee/ as the config directory, however, I've uninstalled bumblebee a while ago, so all that remains is the leftover .pacsave files. Not sure if this is related to my issue or with the drm errors, but possibly worth noting.

Askannz commented 4 years ago

Try removing the pacsave files just in case, but it looks like a low level driver/hardware issue. What are the drm errors you get when running prime-switch ?

You should also check dmesg for kernel errors.

nwildner commented 3 months ago

Hello @jiv222

Is this case still relevant to you? It's been 4 years since the last update.

Are you still facing this issue with newer kernel, optimus-manager and nvidia drivers ?