Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
multiple gpu multiple xserver?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
dasPaul
Apprentice
Apprentice


Joined: 14 Feb 2012
Posts: 222
Location: Dresden

PostPosted: Tue Apr 23, 2019 8:18 am    Post subject: multiple gpu multiple xserver? Reply with quote

Hi

As I have two gpu's in my gentoo machine (primary Intel IGPU, secondary GTX1070) I just asked
myself if it is possible to start one xserver with my intel gpu and do web browsing there and then
start another xserver from the console with my nvidia gpu used that supports 4K resolution and do
4k stuff in that xserver. Is that possible?
_________________
-=human without Windows®=-
sorry for my bad english!
Back to top
View user's profile Send private message
dasPaul
Apprentice
Apprentice


Joined: 14 Feb 2012
Posts: 222
Location: Dresden

PostPosted: Tue Apr 23, 2019 8:22 am    Post subject: Reply with quote

Just to be clear, I don't want to share one xserver between two gpu's. I want two independent xserver with independent gpus attached to them...
_________________
-=human without Windows®=-
sorry for my bad english!
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 45805
Location: 56N 3W

PostPosted: Tue Apr 23, 2019 9:15 am    Post subject: Reply with quote

dasPaul,

Maybe. If you have an Optimus graphics system then no, as only the Intel GPU can refresh the display.
Optimus is two GPUs arranged to be one and a half graphics systems.

Optimus is always Intel + nVidia.

If you can use either GPU alone, you have two separate real graphics systems. This is a requirement for what you want to do.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
dasPaul
Apprentice
Apprentice


Joined: 14 Feb 2012
Posts: 222
Location: Dresden

PostPosted: Wed Apr 24, 2019 5:31 am    Post subject: Reply with quote

No, I don't have this Optimus stuff. The Intel IGPU is the internal gpu of the I7-6700k. The Nvidia is a "real" big PCI-E card and not this optimus/laptop rubbish :wink:

But if that works, how would I tell the startx command which GPU to use? I do not really understand the internals how/on what X decides what gpu it will use.

I know I can define multiple gpus in my xorg.conf but how does startx then decide "oh I take the primary gpu for the first xserver and the second for the next..."?
_________________
-=human without Windows®=-
sorry for my bad english!
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5487

PostPosted: Wed Apr 24, 2019 1:15 pm    Post subject: Reply with quote

dasPaul wrote:
No, I don't have this Optimus stuff. The Intel IGPU is the internal gpu of the I7-6700k. The Nvidia is a "real" big PCI-E card and not this optimus/laptop rubbish :wink:

But if that works, how would I tell the startx command which GPU to use? I do not really understand the internals how/on what X decides what gpu it will use.

I know I can define multiple gpus in my xorg.conf but how does startx then decide "oh I take the primary gpu for the first xserver and the second for the next..."?


yes, it is called multiseat, there is a wiki entry about it.
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7711
Location: Saint Amant, Acadiana

PostPosted: Wed Apr 24, 2019 1:30 pm    Post subject: Reply with quote

For sake of truth, multiseat is something else. Multiseat uses separate inputs so multiple users can use the same PC simultaneously.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 4704
Location: Dallas area

PostPosted: Wed Apr 24, 2019 2:29 pm    Post subject: Reply with quote

dasPaul wrote:
No, I don't have this Optimus stuff. The Intel IGPU is the internal gpu of the I7-6700k. The Nvidia is a "real" big PCI-E card and not this optimus/laptop rubbish :wink:

But if that works, how would I tell the startx command which GPU to use? I do not really understand the internals how/on what X decides what gpu it will use.

I know I can define multiple gpus in my xorg.conf but how does startx then decide "oh I take the primary gpu for the first xserver and the second for the next..."?


You can do things a couple of different ways, start one xserver on tty 7 and the other on tty8, you can have separate xorg.conf files.
You'd probably also want another xinitrc file for the second server.
Look at -config* options "man Xorg"

I once upon a time had my system set up with both an nvidia (main card) and a radeon card with one xserver and (potentially multiple screens)
I had it set up to start a few different ways, just nvidia, nvidia and radeon as separate screens, and nvidia and radeon as one screen.
It's been a while since I did it, and don't use it that way anymore but IIRC, it goes something like this in xorg.conf

Code:
Section "ServerLayout"
    Identifier     "nvid"
    Screen      0  "Screen0"     0 0
EndSection

Section "ServerLayout"
    Identifier     "rad1"
    Screen      0  "Screen1"     0 0
EndSection

Section "ServerLayout"
    Identifier     "rad2"
    Screen      0  "Screen0"     0 0
    Screen      1  "Screen1"     RightOf  "Screen0"
EndSection

... all other stuff if wanted or needed.

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nouveau"
   <other options>
    Option          "DRI" "3"
    Option         "ZaphodHeads" "HDMI-1"
    Screen         0
EndSection

Section "Monitor"
    Identifier    "Monitor0"
    DisplaySize   598 336
    ModelName     "27mp35"
EndSection

Section "Screen"
    Identifier     "Screen1"
    Device         "Device1"
    Monitor        "Monitor1"
EndSection

Section "Device"
    Identifier     "Device1"
    Driver         "radeon"
    <other options>
    Option         "ZaphodHeads" "HDMI-1"
    Screen         0
EndSection

Section "Monitor"
    Identifier    "Monitor1"
    DisplaySize   476 268
    ModelName     "22mp47"
EndSection


and a couple of aliases

Code:
alias startxr1='startx -- /home/don/.xserverrc -layout rad1'
alias startxr2='startx /home/don/.xinitrc 1 -- /home/don/.xserverrc -layout rad2'

Regular startx started nvidia only.

A few things of note:
I had nvidia on at boot, and radeon blacklisted, as I didn't care about console dualing.
If I wanted the second screen I loaded the radeon modules and did whatever I wanted.
I suppose I could have had both cards on and used the layout options for just nvidia (but not tested, just a guess, would need another alias and possibly another selection or two in xorg.conf layout area)

You would also need to (possibly) specify another xinitrc file -- man startx, xinit, Xorg and possibly Xserver for more details

I used one .xinitrc, but I was also using openbox and had this at the end of .xinitrc
Code:
if [ -z "$1" ]
 then
  exec /usr/bin/openbox --startup "sh /home/don/.config/openbox/autostart"
 else
  exec /usr/bin/openbox --startup "sh /home/don/.config/openbox/autostart 1"
fi


Edit to add:
Other options such as multple input kbd/mouse for each server/screen, I didn't set up,
I somehow changed focus between screens so only needed one kbd/mouse (been too long, don't remember)
But a lot of stuff is doable inside xorg.conf, if you work at it enough.

ETA2: I just realized that you originally asked about multiple servers, that would be the tty7/tty8 scenario, I would set up separate xorg.conf files in that case
that would simplify kbd/mouse, but you might only see one xserver/screen at a time depending on which has focus.

Link with more info https://nouveau.freedesktop.org/wiki/MultiMonitorDesktop/

Just ran across this also https://www.linuxquestions.org/questions/linux-desktop-74/multiple-x-servers-multiple-graphics-adapters-single-seat-kind-of-tutorial-864646/
_________________
PRIME x570-pro, 3700x, RX 550 & 560 - 5.8 zen kernel
Acer E5-575 (laptop), i3-7100u - i965 - 5.5 zen kernel
---both---
gcc 9.3.0, profile 17.1 (no-pie & modified) amd64-no-multilib, eudev, openrc, openbox, palemoon


Last edited by Anon-E-moose on Wed Apr 24, 2019 2:56 pm; edited 2 times in total
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5487

PostPosted: Wed Apr 24, 2019 2:41 pm    Post subject: Reply with quote

Jaglover wrote:
For sake of truth, multiseat is something else. Multiseat uses separate inputs so multiple users can use the same PC simultaneously.

multiseat/2 then
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
dasPaul
Apprentice
Apprentice


Joined: 14 Feb 2012
Posts: 222
Location: Dresden

PostPosted: Wed Apr 24, 2019 2:56 pm    Post subject: Reply with quote

Anon-E-moose thanks! Ill try your suggestions soon.
_________________
-=human without Windows®=-
sorry for my bad english!
Back to top
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 4704
Location: Dallas area

PostPosted: Wed Apr 24, 2019 3:15 pm    Post subject: Reply with quote

Since I have extra kbd/mice laying around if I were going to do multiple cards/screens again I'd change it slightly (easier)
I'd take some ideas from multiseat and add to multi screen layout.

multiseat info
https://wiki.archlinux.org/index.php/Xorg_multiseat
http://www.linuxtoys.org/multiseat/multiseat.html

Basically tie one kbd/mouse to each screen/layout, if done right they are basically separate critters, sharing one server, otherwise it gets tricky to share the one kbd/mouse between them.
_________________
PRIME x570-pro, 3700x, RX 550 & 560 - 5.8 zen kernel
Acer E5-575 (laptop), i3-7100u - i965 - 5.5 zen kernel
---both---
gcc 9.3.0, profile 17.1 (no-pie & modified) amd64-no-multilib, eudev, openrc, openbox, palemoon
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7711
Location: Saint Amant, Acadiana

PostPosted: Wed Apr 24, 2019 3:32 pm    Post subject: Reply with quote

x11-misc/synergy

This allows you to control multiple x screens with one mouse and keyboard.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5487

PostPosted: Wed Apr 24, 2019 3:48 pm    Post subject: Reply with quote

Anon-E-moose wrote:
Since I have extra kbd/mice laying around if I were going to do multiple cards/screens again I'd change it slightly (easier)
I'd take some ideas from multiseat and add to multi screen layout.

multiseat info
https://wiki.archlinux.org/index.php/Xorg_multiseat
http://www.linuxtoys.org/multiseat/multiseat.html

Basically tie one kbd/mouse to each screen/layout, if done right they are basically separate critters, sharing one server, otherwise it gets tricky to share the one kbd/mouse between them.

what about the most obvious? https://wiki.gentoo.org/wiki/Multiseat
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7711
Location: Saint Amant, Acadiana

PostPosted: Wed Apr 24, 2019 3:54 pm    Post subject: Reply with quote

DaggyStyle wrote:
what about the most obvious? https://wiki.gentoo.org/wiki/Multiseat


Nono, too easy, you are supposed to suffer. Per aspera ad astra.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 4704
Location: Dallas area

PostPosted: Wed Apr 24, 2019 4:10 pm    Post subject: Reply with quote

Missed that one Daggy :oops:

Now there just needs to be a convenient gui to set it all up properly :lol: (auto setup would be nicer, but that's a future dream)

Not everyone has a multi-monitor machine, but they're far from unique one of a kind nowadays.

Edit to add: It would be much easier for what the OP wanted if all wm/desktops supported workspace per monitor, then it would just be an easy xorg.conf setup (though it violates EWMH specifications)
There are a few wm's that will allow invididual monitor/screen/workspace setups, xmonad, i3, awesome (hearsay on 1st 3) and wingo (designed this way)
_________________
PRIME x570-pro, 3700x, RX 550 & 560 - 5.8 zen kernel
Acer E5-575 (laptop), i3-7100u - i965 - 5.5 zen kernel
---both---
gcc 9.3.0, profile 17.1 (no-pie & modified) amd64-no-multilib, eudev, openrc, openbox, palemoon
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum