I've been setting up arch linux for a few days - mostly it's been easy to make progress but I'm having a real problem with multihead support.

I have a Thinkpad X1 extreme with an Intel and NVIDIA video chip and hybrid graphics

I've installed:

  • xf86-video-intel
  • xf86-video-vesa
  • bumblebee
  • bbswitch
  • lightdm
  • i3wm

This is the xorg conf I'm using:

Section "ServerLayout"
    Identifier  "Layout0"
    Screen      0 "Screen0" 0 0
    Screen      1 "Screen1" Above "Screen0"
    InputDevice "Mouse0" "CorePointer"
    InputDevice "Keyboard0" "CoreKeyboard"
EndSection

Section "Module"
    Load           "dbe"
    Load           "extmod"
    Load           "type1"
    Load           "freetype"
    Load           "glx"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "keyboard"
EndSection
Section "Device"
    Identifier  "intelgpu0"
    Driver      "intel"
    Screen      0
    Option      "XvMC" "true"
    Option      "UseEvents" "true"
    Option      "AccelMethod" "UXA"
    BusID       "PCI:00:02:0"
EndSection

Section "Device"
    Identifier  "intelgpu1"
    Driver      "intel"
    Screen      1
    Option      "XvMC" "true"
    Option      "UseEvents" "true"
    Option      "AccelMethod" "UXA"
    BusID       "PCI:00:02:0"
EndSection

Section "Device"
    Identifier  "nvidiagpu0"
    Driver      "nvidia"
    BusID       "PCI:01:00:0"
EndSection

Section "Monitor"
    Identifier  "Monitor0"
    Option      "Enable" "true"
EndSection

Section "Monitor"
    Identifier  "Monitor1"
    Option      "Enable" "true"
EndSection

Section "Screen"
    Identifier  "Screen0"
    Device      "intelgpu0"
    Monitor     "Monitor0"
    DefaultDepth    24
    Option      "TwinView" "0"
    SubSection "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier  "Screen1"
    Device      "intelgpu1"
    Monitor     "Monitor1"
    DefaultDepth    24
    Option      "TwinView" "0"
    SubSection "Display"
        Depth       24
    EndSubSection
EndSection

This is the lspci -v output of the two video devices:

00:02.0 VGA compatible controller: Intel Corporation Device 3e9b (prog-if 00 [VGA controller])
    Subsystem: Lenovo Device 2267
    Flags: bus master, fast devsel, latency 0, IRQ 171
    Memory at 404a000000 (64-bit, non-prefetchable) [size=16M]
    Memory at 80000000 (64-bit, prefetchable) [size=256M]
    I/O ports at 6000 [size=64]
    [virtual] Expansion ROM at 000c0000 [disabled] [size=128K]
    Capabilities: <access denied>
    Kernel driver in use: i915
    Kernel modules: i915

01:00.0 VGA compatible controller: NVIDIA Corporation GP107M [GeForce GTX 1050 Ti Mobile] (rev a1) (prog-if 00 [VGA controller])
    Subsystem: Lenovo GP107M [GeForce GTX 1050 Ti Mobile]
    Flags: bus master, fast devsel, latency 0, IRQ 16
    Memory at bf000000 (32-bit, non-prefetchable) [size=16M]
    Memory at 60000000 (64-bit, prefetchable) [size=256M]
    Memory at 70000000 (64-bit, prefetchable) [size=32M]
    I/O ports at 5000 [size=128]
    Expansion ROM at c0000000 [disabled] [size=512K]
    Capabilities: <access denied>
    Kernel driver in use: nvidia
    Kernel modules: nouveau, nvidia_drm, nvidia

When I boot, X seems to pick up the layout and screens alright (previously I had a hard time getting it to read past the first screen section):

[     2.312] (==) Using config directory: "/etc/X11/xorg.conf.d"
[     2.312] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[     2.314] (==) ServerLayout "Layout0"
[     2.314] (**) |-->Screen "Screen0" (0)
[     2.314] (**) |   |-->Monitor "Monitor0"
[     2.315] (**) |   |-->Device "intelgpu0"
[     2.315] (**) |-->Screen "Screen1" (1)
[     2.315] (**) |   |-->Monitor "Monitor1"
[     2.315] (**) |   |-->Device "intelgpu1"
[     2.315] (**) |-->Input Device "Mouse0"
[     2.315] (**) |-->Input Device "Keyboard0"
[     2.315] (==) Automatically adding devices
[     2.315] (==) Automatically enabling devices
[     2.315] (==) Automatically adding GPU devices
[     2.315] (==) Automatically binding GPU devices

(pastebin of the whole Xorg.0.log)

and bbswitch seems to recognize and manage both video devices, albeit with some kind of problem:

[    2.272033] bbswitch: loading out-of-tree module taints kernel.
[    2.272053] bbswitch: module verification failed: signature and/or required key missing - tainting kernel
[    2.272220] bbswitch: version 0.8
[    2.272238] bbswitch: Found integrated VGA device 0000:00:02.0: \_SB_.PCI0.GFX0
[    2.272243] bbswitch: Found discrete VGA device 0000:01:00.0: \_SB_.PCI0.PEG0.PEGP
[    2.272435] bbswitch: detected an Optimus _DSM function
[    2.272526] bbswitch: Succesfully loaded. Discrete card 0000:01:00.0 is on
[    2.276310] bbswitch: disabling discrete graphics

(pastebin of the entire output of dmesg)

but still, xrandr and xrandr --listproviders only show 1 screen and 1 provider:

$ xrandr
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 8192 x 8192
eDP1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 344mm x 194mm
   1920x1080     60.03*+  59.96    59.93    47.99  
   1680x1050     59.95    59.88  
   ...

$ xrandr --listproviders
Providers: number : 1
Provider 0: id: 0x43 cap: 0xb, Source Output, Sink Output, Sink Offload crtcs: 3 outputs: 1 associated providers: 0 name:Intel

Sorry about the long question but I'm not sure what I'm missing - I can't use xrandr to turn on or move around displays because the output just isn't available after boot (whether a monitor is plugged in or not)

New contributor
Carson Myers is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
  • xrandr lists outputs not gpus. Is it actually possible to have dual monitors on your laptop beside mirror? – jdwolf Sep 27 at 20:33
  • Right, but I would expect there to be other outputs since both GPUs were detected - it's possible, it works with Windows and the computer is brand new – Carson Myers 2 days ago

I got a solution to this:

I removed my xorg conf files so they wouldn't interfere, and then xrandr started showing a virtual output on screen 0.

I ran intel-virtual-output which caused the screens to flicker, and xrandr to display a lot more virtual outputs, one of which (VIRTUAL3) was connected.

After that I could set its mode and the display turned on and showed a workspace.

The resolution is very wrong and I'm having trouble creating a mode with the correct resolution, but that's another problem.

New contributor
Carson Myers is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
  • This confirms what I suspected which is that your integrated GPU has no real output. It can only copy in memory over to the discrete GPU which is why xrandr only sees one output. After using xrandr --setprovideroutputsource radeon Intel PRIME should work but I'm not so sure about dual monitor without a lot of extra fussing. – jdwolf yesterday

Your Answer

Carson Myers is a new contributor. Be nice, and check out our Code of Conduct.
 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.