Estou configurando o arch linux por alguns dias - na maioria das vezes, é fácil progredir, mas estou tendo um problema real com o suporte a multiheads.
Eu tenho um Thinkpad X1 extreme com um chip de vídeo Intel e NVIDIA e gráficos híbridos
Eu instalei:
- xf86-video-intel
- xf86-video-vesa
- bumblebee
- bbswitch
- lightdm
- i3wm
Este é o xorg conf que estou usando:
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
Esta é a saída lspci -v dos dois dispositivos de vídeo:
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
Quando eu inicializo, o X parece pegar o layout e as telas bem (anteriormente eu tive dificuldade em fazê-lo ler além da primeira seção da tela):
[ 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 de todo o Xorg.0.log )
e bbswitch parece reconhecer e gerenciar os dois dispositivos de vídeo, embora com algum tipo de problema:
[ 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 de toda a saída do dmesg )
mas ainda assim, xrandr
e xrandr --listproviders
mostram apenas 1 tela e 1 provedor:
$ 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
Eu não posso usar o xrandr para ligar ou mover telas porque a saída não está disponível após a inicialização (se um monitor está conectado ou não)