You are not logged in.

#1 2020-03-03 00:28:18

no-cheating
Member
From: Poland
Registered: 2016-04-26
Posts: 61

Running hybrid graphics with multiple monitors on ThinkPad P52

The problem

I have been using Arch for around 5 years, but I'm a total noob in setting it up on laptops, and to laptops in general (my whole life I've owned only desktop computers).

I have ThinkPad P52 laptop. I set up Arch with Xorg and i3 just fine, but the problems started when I tried to connect external monitors to it. Generally the laptop will be used for working in 3 different monitor combinations:

  1. 2 external monitors + laptop display (at the office)

  2. 1 external monitor + laptop display (at home)

  3. Only laptop display (on the run)

#3 works out of the box. Now I'm trying to set it up for #1 and I cannot make it work. By default - without adding any extra configuration - when I connect 2 external monitors (one through HDMI, another through DisplayPort), they are not detected at all. By reading Arch documentation on Graphics in P52 I understood it's because HDMI and DisplayPort ports are wired only to Nvidia GPU, and probably my current setup uses intel driver by default.

Questions

I read Arch documentation on Multihead, Bumblebee, the mentioned documentation on ThinkPad P52, and Bumblebee wiki article on multi monitor setup, but I still struggle to understand with certainty:

  1. Is it possible to have hybrid graphics setup with both external monitors and internal laptop display running at the same time, in which I'd be able to move windows in i3 between external monitors and internal display?

  2. If it's not possible, is the only way to make this kind of setup work is using dedicated graphics all the time?

  3. How to set this up? I never grok Xorg configuration and this bites me now. I'd appreciate help, or link to some clear documentation.

My configuration

Graphics mode in BIOS is set to Hybrid Graphics.

$ lspci -k | grep -A 2 -E "(VGA|3D)"
00:02.0 VGA compatible controller: Intel Corporation Device 3e94
	Subsystem: Lenovo Device 225f
	Kernel driver in use: i915
--
01:00.0 VGA compatible controller: NVIDIA Corporation GP107GLM [Quadro P2000 Mobile] (rev a1)
	Subsystem: Lenovo GP107GLM [Quadro P2000 Mobile]
	Kernel driver in use: nvidia

Run when 2 external monitors are connected by HDMI and DisplayPort:

$ xrandr --listmonitors
Monitors: 1
 0: +*eDP1 1920/340x1080/190+0+0  eDP1

Last edited by no-cheating (2020-03-03 00:28:47)

Offline

#2 2020-03-03 09:24:55

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,425

Re: Running hybrid graphics with multiple monitors on ThinkPad P52

1. It is possible
2. But yes that is the implication  to make it possible, the dedicated card must be used in some form

If you want to be able to do this without interrupting the existing work/session (as in go from external monitors to intel only with nvidia being disabled when you switch) you must opt for bumblebee with the method described in https://wiki.archlinux.org/index.php/Bu … VIDIA_chip which might - from what I've heard - have performance implications.

If you can live with the session being closed down and restarted you might want to opt for something like optimus-manager (or some of the other options on that page) but you'd have to actively remember to run the corresponding command to disable/enable the dedicated card.

Last edited by V1del (2020-03-03 09:25:55)

Offline

#3 2020-03-03 15:31:43

no-cheating
Member
From: Poland
Registered: 2016-04-26
Posts: 61

Re: Running hybrid graphics with multiple monitors on ThinkPad P52

I should have added that I don't really need NVIDIA GPU's power on Linux, as I don't use Linux for any GPU heavy things. On Linux I do all my programming/development work and I also use it as my daily OS to surf the internet, check emails etc. But when I want play some games, which is the only GPU heavy activity I'm doing, I switch to Windows.

I could probably do totally fine with only internal Intel GPU. But that's not possible, as like you said, it's not possible to connect external monitors until NVIDIA GPU is also active. Still the bottom line is that my NVIDIA GPU's use on Linux might be limited only to that - allowing me to connect external screens. For example if I decide to do Bumblebee, I will likely never use optirun. So the performance is not my biggest priority I guess. I'd gladly trade that for longer battery life for example.

V1del wrote:

1. It is possible
2. But yes that is the implication  to make it possible, the dedicated card must be used in some form

If you want to be able to do this without interrupting the existing work/session (as in go from external monitors to intel only with nvidia being disabled when you switch) you must opt for bumblebee with the method described in https://wiki.archlinux.org/index.php/Bu … VIDIA_chip which might - from what I've heard - have performance implications.

If you can live with the session being closed down and restarted you might want to opt for something like optimus-manager (or some of the other options on that page) but you'd have to actively remember to run the corresponding command to disable/enable the dedicated card.

You mentioned Bumblebee and optimus-manager, and said that only Bumblebee would allow me to switch graphics without closing the session. What about PRIME? Doesn't that one also allow to switch the graphics without losing the session? Is Bumblebee really my only option?

Last edited by no-cheating (2020-03-03 15:42:35)

Offline

#4 2020-03-03 15:37:39

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,425

Re: Running hybrid graphics with multiple monitors on ThinkPad P52

Well optirun is what is used by bumblebee to indicate it must enable the dedicated graphics card from it's disabled state. so at the very least you will need to use the

optirun intel-virtual-outputs

option after connecting external screens

Offline

#5 2020-03-03 15:41:02

no-cheating
Member
From: Poland
Registered: 2016-04-26
Posts: 61

Re: Running hybrid graphics with multiple monitors on ThinkPad P52

V1del wrote:

Well optirun is what is used by bumblebee to indicate it must enable the dedicated graphics card from it's disabled state. so at the very least you will need to use the

optirun intel-virtual-outputs

option after connecting external screens

I understand. When I said I won't need to use optirun at all, I just meant that I don't really have a need to run any of my personal programs on more powerful dedicated GPU. (At least not on Linux).

Last edited by no-cheating (2020-03-04 16:46:39)

Offline

#6 2020-03-04 16:46:53

no-cheating
Member
From: Poland
Registered: 2016-04-26
Posts: 61

Re: Running hybrid graphics with multiple monitors on ThinkPad P52

I managed to make Sway (Wayland) work yesterday and on Sway multiple screens are a breeze. I connect them and they work out of the box:

$ swaymsg -t get_outputs
Output eDP-1 'Chimei Innolux Corporation 0x15E8 0x00000000' (focused)
  Current mode: 1920x1080 @ 60.007999 Hz
  Position: 3840,0
  Scale factor: 1.000000
  Scale filter: nearest
  Subpixel hinting: unknown
  Transform: normal
  Workspace: 2:programming
  Max render time: off
  Available modes:
    1920x1080 @ 60.007999 Hz

Output HDMI-A-1 'Dell Inc. DELL P2217H 668VC84L6Y3L'
  Current mode: 1920x1080 @ 60.000000 Hz
  Position: 1920,0
  Scale factor: 1.000000
  Scale filter: nearest
  Subpixel hinting: unknown
  Transform: normal
  Workspace: 3:communication
  Max render time: off
  Available modes:
    720x400 @ 70.082001 Hz
    640x480 @ 59.939999 Hz
    640x480 @ 60.000000 Hz
    640x480 @ 75.000000 Hz
    720x480 @ 59.939999 Hz
    720x480 @ 60.000000 Hz
    720x576 @ 50.000000 Hz
    800x600 @ 60.317001 Hz
    800x600 @ 75.000000 Hz
    1024x768 @ 60.004002 Hz
    1024x768 @ 75.028999 Hz
    1280x720 @ 50.000000 Hz
    1280x720 @ 59.939999 Hz
    1280x720 @ 60.000000 Hz
    1152x864 @ 75.000000 Hz
    1280x1024 @ 60.020000 Hz
    1280x1024 @ 75.025002 Hz
    1600x900 @ 60.000000 Hz
    1920x1080 @ 50.000000 Hz
    1920x1080 @ 59.939999 Hz
    1920x1080 @ 60.000000 Hz

Output DP-2 'Dell Inc. DELL P2217H 668VC67R24DB'
  Current mode: 1920x1080 @ 60.000000 Hz
  Position: 0,0
  Scale factor: 1.000000
  Scale filter: nearest
  Subpixel hinting: unknown
  Transform: normal
  Workspace: 4
  Max render time: off
  Available modes:
    720x480 @ 59.939999 Hz
    720x480 @ 60.000000 Hz
    720x576 @ 50.000000 Hz
    800x600 @ 60.317001 Hz
    800x600 @ 75.000000 Hz
    1024x768 @ 60.004002 Hz
    1024x768 @ 75.028999 Hz
    1280x720 @ 50.000000 Hz
    1280x720 @ 59.939999 Hz
    1280x720 @ 60.000000 Hz
    1152x864 @ 75.000000 Hz
    1280x1024 @ 60.020000 Hz
    1280x1024 @ 75.025002 Hz
    1600x900 @ 60.000000 Hz
    1920x1080 @ 50.000000 Hz
    1920x1080 @ 59.939999 Hz
    1920x1080 @ 60.000000 Hz

Then I just set up the layout adding this to my Sway config and everything works super fine:

output eDP-1 pos 0 0 res 1920x1080
output HDMI-A-1 pos 1920 -823 res 1920x1080
output DP-2 pos 3840 -823 res 1920x1080

Still Sway works with NVIDIA GPU-s only on nouveau drivers and that's causing me other problems. I've been working on those for a long time and though I've made some progress it's still not working perfectly. What's a good place to ask for help with nouveau?

I'd prefer to stay on Sway instead of Xorg, as other than poor NVIDIA support everything seems to be much more straightforward than on Xorg.

Last edited by no-cheating (2020-03-04 17:01:46)

Offline

Board footer

Powered by FluxBB