You are not logged in.
Hardware possibly involved with problem:
NVIDIA GTX 970 (wired to monitor via HDMI)
Intel 4th Gen Graphics (wired to monitor via DVI)
Single Monitor
Drivers/packages possibly involved:
intel, i915
nvidia
mesa-libgl
What I am trying to do:
I have created two xorg.conf files "intel.conf" and "nvidia.conf" and I am trying to start two X servers using different config files. First I start X server using intel.conf
xinit /bin/i3 -- :0 -xf86config intel.conf vt1
It starts fine. Tested that with glxinfo and glxgears.
Problem:
If I start second X server within the X server that I just started, the system completely hangs.
xinit /bin/i3 -- :1 -xf86config nvidia.conf vt2
If I run the same command from console after manually switching (CTRL+ALT+F2), it runs absolutely fine. I tested glxinfo, glxgears and nvidia-settings. They all work.
I have only five lines in both config files:
1. Device Section
2. Identifier
3. Driver
4. BusID
5. End Section
Is this behavior supposed or I am doing something wrong? Help would be greatly appreciated. Please let me know, if any output/config file contents are required. I will post immediately.
Last edited by lonewolf (2016-03-12 10:50:32)
Offline
If I start second X server within the X server that I just started, the system completely hangs.
xinit /bin/i3 -- :1 -xf86config nvidia.conf vt2
If I run the same command from console after manually switching (CTRL+ALT+F2), it runs absolutely fine.
Everything is working as intended. The issue is not launching X from within X (although that does sound odd too), the problem is you can't start X on a different tty. You can confirm this from loging in to tty1 and not starting X there but try to start even a single X session on vt2 from tty1 and it will fail.
There are a few ways around this if its what you really want to do. Some approaches might require working with xorg.wrap, but I can't provide much input on those and I suspect they'd be more complicated than needed. Others would be to write a script that does a chvt then starts x on the new vt.
EDIT: actually chvt may not help. If you don't use tty2 for anything else, you could just set up the second X session to start from your shell profile when logged in on tty2. Then set up an autologin service for tty2, but do not enable it, just start it as desired. So when you "systemctl start autologin@tty2" tty2 will be logged into, the shell profile will be sourced, and a second X session will start.
Of course if you want these two X sessions running all the time, you could just enable to autologin service and not worry about needing to start it - then you'd just switch back and forth between the two with Ctrl-Alf-F{1,2}
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I just tried to make this work. I don't have any kind of xorg.conf files except Xwrapper.config.
bstaletic@ferenginar st % cat /etc/X11/Xwrapper.config
needs_root_rights=yes
allowed_users=anybodyThe first line is there because of not using systemd and openrc needs some tinkering to work with non root xorg. Try without that line, or try with "auto" as the rvalue. Second line would be mandatory as you're starting xorg from /dev/pts/* not /dev/tty*.
Offline
I just tried to make this work. I don't have any kind of xorg.conf files except Xwrapper.config.
bstaletic@ferenginar st % cat /etc/X11/Xwrapper.config needs_root_rights=yes allowed_users=anybodyThe first line is there because of not using systemd and openrc needs some tinkering to work with non root xorg. Try without that line, or try with "auto" as the rvalue. Second line would be mandatory as you're starting xorg from /dev/pts/* not /dev/tty*.
thanks for replying, i already have the second line (except the first root line). if i didn't had that second line, i wouldn't be able to start X from within X itself, system hang situation is the next step. in the absence of that line, X will refuse to start saying, "only console users are allowed to run"
Offline
lonewolf wrote:If I start second X server within the X server that I just started, the system completely hangs.
xinit /bin/i3 -- :1 -xf86config nvidia.conf vt2
If I run the same command from console after manually switching (CTRL+ALT+F2), it runs absolutely fine.
Everything is working as intended. The issue is not launching X from within X (although that does sound odd too), the problem is you can't start X on a different tty. You can confirm this from loging in to tty1 and not starting X there but try to start even a single X session on vt2 from tty1 and it will fail.
There are a few ways around this if its what you really want to do. Some approaches might require working with xorg.wrap, but I can't provide much input on those and I suspect they'd be more complicated than needed. Others would be to write a script that does a chvt then starts x on the new vt.
EDIT: actually chvt may not help. If you don't use tty2 for anything else, you could just set up the second X session to start from your shell profile when logged in on tty2. Then set up an autologin service for tty2, but do not enable it, just start it as desired. So when you "systemctl start autologin@tty2" tty2 will be logged into, the shell profile will be sourced, and a second X session will start.
Of course if you want these two X sessions running all the time, you could just enable to autologin service and not worry about needing to start it - then you'd just switch back and forth between the two with Ctrl-Alf-F{1,2}
i actually tried already that "chvt" and "openvt". if i try to switch tty using chvt command from tty itself, they switch fine. but if i run chvt command from X session, it throws an error.
"Couldn't get a file descriptor referring to console"
I am in no hurry or rush. I will keep monitoring this thread as I fully appreciate the help and time.
I am currently going through manuals of tty and openvt, maybe I could figure something out.
Offline