1
votes

I would like to use two xservers each running on a separate graphics card,in fact I'm using two monitors with two different graphic cards installed on my computer,like this :

root@ziomario-Z87-HD3:/home/ziomario# lspci -nn | grep VGA

00:02.0 VGA compatible controller [0300]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller [8086:0412] (rev 06)

01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GK106 [GeForce GTX 660] [10de:11c0] (rev a1)

root@ziomario-Z87-HD3:/home/ziomario# lspci -nn | grep NVIDIA

01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GK106 [GeForce GTX 660] [10de:11c0] (rev a1)

01:00.1 Audio device [0403]: NVIDIA Corporation GK106 HDMI Audio Controller [10de:0e0b] (rev a1)

I'm reading this article.

and I have changed some command because there are differences between what he says to do and my situation. This is what I did :

Installed NVidia driver as root user with this command :

./NVIDIA-Linux-x86_64-340.32.run –accept-license –no-backup –no-x-check –no-questions –ui=none –no-x-check –no-distro-scripts –utility-prefix=/nvidia –installer-prefix=/nvidia –opengl-prefix=/nvidia –opengl-libdir=glx

made a libglx.so link in the /nvidia/glx directory for NVidia :

ln -s /usr/lib/xorg/modules/extensions/libglx.so.295.59 libglx.so

As root, created the folder /etc/ld.conf.d (it didn't exist before) with the file inside : /etc/ld.conf.d/nvidia with two lines pointing to the new library directories:

/nvidia/lib
/nvidia/glx

Ran this command as root to make the above paths active.

ldconfig

created the file /etc/X11/xorg.conf with the command

nvidia-xconfig

Used the ModulePath option to direct the nvidia xserver to the correct Glx. Added this to /etc/X11/xorg.conf in existing Files section as follows:

this is my xorg.conf file :

Section "ServerLayout"

Identifier     "Layout0"
Screen      0  "Screen0"
InputDevice    "Keyboard0" "CoreKeyboard"
InputDevice    "Mouse0" "CorePointer" EndSection

Section "ServerLayout"

Identifier     "Layout1"
Screen      0  "Screen1" 0 0
Option         "Xinerama" "0" EndSection

Section "Files"

modulepath "/nvidia/glx,/nvidia/lib,/usr/lib/xorg/modules" 

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         "kbd" EndSection

Section "Monitor"

Identifier     "Monitor0"
VendorName     "Unknown"
ModelName      "Unknown"
HorizSync       28.0 - 33.0
VertRefresh     43.0 - 72.0
Option         "DPMS" EndSection

Section "Monitor"

Identifier     "Monitor1"
VendorName     "Unknown"
Option         "DPMS" EndSection

Section "Device"

Identifier     "Device0"
Driver         "nvidia"
VendorName     "NVIDIA Corporation" EndSection

Section "Device"

Identifier     "Device1"
Driver         "intel"
BusID          "PCI:0:2:0"
Option         "AccelMethod" "uxa" EndSection

Section "Screen"

Identifier     "Screen0"
Device         "Device0"
Monitor        "Monitor0"
DefaultDepth    24
SubSection     "Display"
    Depth       24
EndSubSection EndSection

Section "Screen"

Identifier     "Screen1"
Device         "Device1"
Monitor        "Monitor1"
DefaultDepth    24
SubSection     "Display"
Depth       24
EndSubSection EndSection

configured user LD_LIBRARY_PATH environment in the files (this can be set universally in /etc/profile and /etc/bash.bashrc configuration files instead): ~/.profile ~/.bashrc and,~/.xsession file by adding the following lines:

if [ echo $DISPLAY |grep -c ":1" -eq 1 ]; then export LD_LIBRARY_PATH=/nvidia/glx

fi

Reinstalled xorg packages with Glx so that damage from the previous NVidia install is corrected :

apt-get --reinstall install glx-alternative-mesa xserver-xorg-core libgl1-mesa-glx libgl1-mesa-dri

Restarted Gdm3

/etc/init.d/gdm3 restart

it didn't work. The monitor attached with the NVIDIA graphic card is working correctly but the other one,where is attached the INTEL graphic card is off...any suggest ?

3

3 Answers

1
votes

Do you get a blank screen or a blank screen with a mouse pointer? I have almost the same hardware and use 2 xorg files, one for each seat and lightdm as desktop manager. The problem appears when I enable on seat1 (intel) the options

Section "ServerFlags" Option "AutoAddDevices" "false" Option "AutoEnableDevices" "false" EndSection

I need these options to limit mouses and keyboards on their respective seats.

And check this out in your xorg.conf:

Screen      0  "Screen1" 0 0

Are you sure the first "0" is ok?

1
votes

EDIT: I posted a complete howto here HOWTO: Intel and Nvidia accelerated on a 2 seat machine

I use multiseat with lightdm (gdm3 didnt give me many options) on nvidia and intel, my intel is still NOT accelerated (but I think this is not the case as I had the same problem and it was caused by faulty configuration).

Here is my configuration:

/etc/lightdm/lightdm.conf

[LightDM]
[SeatDefaults]
xserver-allow-tcp=false
greeter-session=lightdm-greeter
greeter-hide-users=true
session-wrapper=/etc/X11/Xsession
autologin-user=john
[XDMCPServer]
[VNCServer]
[Seat:0]                          ###nvidia
xserver-command=/usr/bin/X :0
xserver-config=xorg_seat0.conf
autologin-user=john
[Seat:1]                          ###intel
xserver-command=/usr/bin/X :1 -sharevts
xserver-config=xorg_seat1.conf
autologin-user=desk

/etc/X11/xorg_seat0.conf

Section "ServerFlags"
    Option "AllowMouseOpenFail" "on"
    Option "AllowEmptyInput" "on"
    Option "ZapWarning" "on"
    Option "HandleSpecialKeys" "off"
    Option "DRI2" "on"
    Option "Xinerama" "off"
EndSection

Section "InputClass"
    Identifier    "Disable cable keyboard"
    MatchProduct  "AT Translated Set 2 keyboard"
    Option        "Ignore" "on"
EndSection

Section "InputClass"
    Identifier    "Disable cable mouse"
    MatchProduct  "Microsoft Microsoft 3-Button Mouse with IntelliEye(TM)"
    Option        "Ignore" "on"
EndSection

Section "ServerLayout"
    Identifier     "Seat0"
    Screen      0  "Screen0" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
    Option         "Xinerama" "0"
EndSection

Section "Files"
EndSection

Section "InputDevice"
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/input/by-id/usb-Logitech_USB_Receiver-mouse"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
    Option         "GrabDevice" "on"
EndSection

Section "InputDevice"
    Identifier     "Keyboard0"
    Driver         "kbd"
    Option         "Device" "/dev/input/by-id/usb-Logitech_USB_Receiver-event-kbd"
    Option         "GrabDevice" "on"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "LG"
    ModelName      "LG Electronics LG TV"
    HorizSync       30.0 - 83.0
    VertRefresh     58.0 - 62.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GTS 250"
    Option         "NoLogo" "1"
    BusId          "PCI:1:0:0"
    Option         "ProbeAllGpus" "false"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "DFP-1"
    Option         "metamodes" "nvidia-auto-select +0+0"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

/etc/X11/xorg_seat1.conf

Section "ServerFlags"
    Option "AllowMouseOpenFail" "on"
    Option "AllowEmptyInput" "on"
    Option "ZapWarning" "on"
    Option "HandleSpecialKeys" "off"
    Option "DRI2" "on"
    Option "Xinerama" "off"
EndSection

Section "InputClass"
    Identifier   "Disable Logitech wireless keyboard and mouse"
    MatchProduct "Logitech USB Receiver"
    Option       "Ignore" "on"
EndSection

Section "ServerLayout"
    Identifier     "Seat1"
    Screen      0  "Screen1" 0 0
    InputDevice    "Keyboard1" "CoreKeyboard"
    InputDevice    "Mouse1" "CorePointer"
EndSection

Section "InputDevice"
    Identifier     "Mouse1"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/input/by-id/usb-Microsoft_Microsoft_3-Button_Mouse_with_IntelliEye_TM_-event-mouse"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
    Option         "GrabDevice" "on"
EndSection

Section "InputDevice"
    Identifier     "Keyboard1"
    Driver         "kbd"
    Option         "Device" "/dev/input/by-path/platform-i8042-serio-0-event-kbd"
    Option         "GrabDevice" "on"
EndSection

Section "Monitor"
    Identifier     "Monitor1"
    VendorName     "LG"
    ModelName      "LG Electronics W2042"
    HorizSync       30.0 - 83.0
    VertRefresh     56.0 - 75.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device1"
    Driver         "intel"
    VendorName     "Intel Corporation"
    BoardName      "Intel 82G31"
    BusID          "PCI:0:2:0"
    Screen         0
EndSection

Section "Screen"
    Identifier     "Screen1"
    Device         "Device1"
    Monitor        "Monitor1"
    DefaultDepth    24
    Option         "Stereo" "0"
    SubSection     "Display"
        Depth       24
    Modes       "1680x1050"
    EndSubSection
EndSection

To find the /dev/input/by-path/ use

ls -la /dev/input/by-path

To find the /dev/input/by-id/ use

ls -la /dev/input/by-id

(It is preferable to use /dev/input/by-id/... unless you have a ps2 keyboard or mouse. Then use the /dev/input/by-path...)

To find the MatchProduct values of your keyboard and mouse use xinput on a "living" xsession, not on a bare console.

sudo apt-get install xinput
xinput

The next hours I'll try to accelerate my intel card as you described, so I'll come up with more info :)

1
votes

This might be a http://unix.stackexchange.com question...

Depending on what you're trying to accomplish, having 2 x-servers running would solve driving one monitor with one GPU and driving the other monitor with the other GPU but would also create another set of problems: you will not be able to move applications between one and the other monitor, etc, ...

Both cards need a common frame buffer to drive a common desktop to have certain applications run one one card or the other and that is what the bumblebee project is doing for you. Both NVidia proprietary drivers and the bumblebee binaries are located in the install the xorg.edgers PPA.

As the xorg.edgers group ask not to give installation instructions directly without linking to their page, this is the best I can do for now...

If you don't know what a PPA is or need some guidance about rolling forward and backward of driver versions after reading their page, leave a comment below.

Fair warning: I'm an Ubuntu mongrel user, not a pure-breed Debian one, but they're close enough that their solutions might still interbreed. ;-)