Askannz / optimus-manager

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

No secondary monitor on hybrid mode #196

Closed michaldybczak closed 4 years ago

michaldybczak commented 4 years ago

I recently switched to nvidia-440xx series on Manjaro and it's working great. Hybrid mode really uses NVIDIA for Vulkan games or with specified command to launch nvidia for given program. All as it should. Also, the switch from bumblebee based hybrid MHWD setup was a breeze.

Basically, I went to MHWD GUI utility, uninstalled bumblebee intel-nvidia non-free hybrid setup and installed none free intel-nvidia PRIME hybrid setup, then disabled symlink to mhwd conf that regenerated itself (other graphical configs stayed as they were - disabled). Rebooted and all is fine, except one thing.

In hybrid mode there is no secondary monitor detection. The thing is, I use Intel modesetting, otherwise there is no secondary monitor in Intel mode where system doesn't detect secondary monitor but the monitor detects "something" and shows just a black screen.

I went to /etc/optimus-manager/ to see the hybrid setup options but there is nothing for hybrid mode. I have no idea what to do now.

EDIT: My config in hybrid mode looks like that:

Section "ServerLayout"
    Identifier "layout"
    Screen 0 "intel"
    Inactive "nvidia"
    Option "AllowNVIDIAGPUScreens"
EndSection

Section "Device"
    Identifier "intel"
    Driver "modesetting"
    BusID "PCI:0:2:0"
    Option "DRI" "3"
EndSection

Section "Screen"
    Identifier "intel"
    Device "intel"
EndSection

Section "Device"
    Identifier "nvidia"
    Driver "nvidia"
    BusID "PCI:1:0:0"
    Option "Coolbits" "28"
    Option "TripleBuffer" "true"
EndSection

Section "Screen"
    Identifier "nvidia"
    Device "nvidia"
EndSection

Section "ServerFlags"
    Option "IgnoreABI" "1"
EndSection

I'm not fully understanding it but I suspect that this section and line is the culprit here:


Section "ServerLayout"
    Screen 0 "intel"

Maybe I'm assuming wrong but does it specify that there is only one monitor (0) and nothing more, and doesn't give any room for more monitors?

How to modify hybrid conf?

EDIT 2: I asked about the secondary monitor on PRIME Offload setup and was informed that:

The NVIDIA driver currently only supports the Source Output capability. It cannot be used as an output sink.

As far as I remember it means that a way to use external monitors connected to NVIDIA card hasn't been implemented [yet]. They may or may not add support for that, and no further comments on that matter were provided by Nvidia staff.

https://forum.manjaro.org/t/prime-offload-conf-for-multimonitors/118952

EDIT 3: https://devtalk.nvidia.com/default/topic/1066207/linux/support-external-displays-in-render-offload-mode-/

So maybe in the future this will be available.

michaldybczak commented 4 years ago

Since this is not an optimus-manager issue but an upstream current limitation, I'm closing this issue.

WhyDoWeWonder commented 3 years ago

Apparently Ingvix has gotten this working in #303, I'm not sure how they did it but you could give it a shot now and see if it works.