You are not logged in.

#1 2014-09-07 11:26:13

Tjuh
Member
Registered: 2013-11-14
Posts: 18

Starting games in a seperate X server

I'm trying to start  games in a seperate X server so I followed the instructions in the systemd/user wiki to setup X to start as systemd user service, but I'm running into an error with the final command; systemctl --user start xorg@0.socket

tjuh ~ $ systemctl --user start xorg@0.socket
Failed to start xorg@0.socket: Unit xorg@0.socket failed to load: No such file or directory.

But the xorg@.socket and xorg@.service files are placed in the right directory. Why isn't it working?

EDIT: Ok, it seems I had those 2 files in the wrong directory. Fixed it now, however that command still does not work:

tjuh ~ $ systemctl --user start xorg@0.socket
Job for xorg@0.socket failed. See 'systemctl status xorg@0.socket' and 'journalctl -xn' for details.
tjuh ~ $ systemctl status xorg@0.socket
● xorg@0.socket
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)

Last edited by Tjuh (2014-09-07 13:12:14)

Offline

#2 2014-09-07 13:34:42

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Starting games in a seperate X server

Offline

#3 2014-09-07 13:44:56

Tjuh
Member
Registered: 2013-11-14
Posts: 18

Re: Starting games in a seperate X server

Yes ofc, that was the first wiki page I checked, however when I try to run that command for Heroes of Newerth for example, I get some weird xorg permission warning:

tjuh ~/Games/HoN $ xinit hon.sh -- :1 vt$XDG_VTNR

/usr/bin/Xorg.wrap: Only console users are allowed to run the X server
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error

So I googled for "/usr/bin/Xorg.wrap: Only console users are allowed to run the X server" and I got redirected to the systemd/user wiki. I had to create the file /etc/X11/Xwrapper with content as specified in the systemd/user wiki to bypass that warning.

However when I try to run that command again, xorg crashes in a weird way that I'm unable to ctr-alt-delete/reboot or shutdown, Had to manually hold the shutdown button, so I could reboot back into my system.

Last edited by Tjuh (2014-09-08 08:48:42)

Offline

#4 2014-09-08 12:53:14

Tjuh
Member
Registered: 2013-11-14
Posts: 18

Re: Starting games in a seperate X server

This is the xorg log file when it crashed:

[  7101.702] 
X.Org X Server 1.16.0
Release Date: 2014-07-16
[  7101.702] X Protocol Version 11, Revision 0
[  7101.702] Build Operating System: Linux 3.15.5-2-ARCH x86_64 
[  7101.702] Current Operating System: Linux Arch64 3.16.2-1-ck #1 SMP PREEMPT Sat Sep 6 08:10:38 EDT 2014 x86_64
[  7101.702] Kernel command line: initrd=\initramfs-linux-ck.img root=/dev/sda1 rw elevator=bfq nmi_watchdog=0
[  7101.702] Build Date: 31 July 2014  11:53:19AM
[  7101.702]  
[  7101.702] Current version of pixman: 0.32.6
[  7101.702] 	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
[  7101.702] Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[  7101.702] (==) Log file: "/var/log/Xorg.2.log", Time: Sun Sep  7 22:46:45 2014
[  7101.702] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[  7101.724] (==) No Layout section.  Using the first Screen section.
[  7101.724] (==) No screen section available. Using defaults.
[  7101.724] (**) |-->Screen "Default Screen Section" (0)
[  7101.724] (**) |   |-->Monitor "<default monitor>"
[  7101.724] (==) No monitor specified for screen "Default Screen Section".
	Using a default monitor configuration.
[  7101.724] (==) Automatically adding devices
[  7101.724] (==) Automatically enabling devices
[  7101.724] (==) Automatically adding GPU devices
[  7101.724] (WW) The directory "/usr/share/fonts/OTF/" does not exist.
[  7101.724] 	Entry deleted from font path.
[  7101.724] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/100dpi/".
[  7101.724] 	Entry deleted from font path.
[  7101.724] 	(Run 'mkfontdir' on "/usr/share/fonts/100dpi/").
[  7101.724] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/75dpi/".
[  7101.724] 	Entry deleted from font path.
[  7101.724] 	(Run 'mkfontdir' on "/usr/share/fonts/75dpi/").
[  7101.724] (==) FontPath set to:
	/usr/share/fonts/misc/,
	/usr/share/fonts/TTF/,
	/usr/share/fonts/Type1/
[  7101.724] (==) ModulePath set to "/usr/lib/xorg/modules"
[  7101.724] (II) The server relies on udev to provide the list of input devices.
	If no devices become available, reconfigure udev or disable AutoAddDevices.
[  7101.724] (II) Loader magic: 0x818d80
[  7101.724] (II) Module ABI versions:
[  7101.724] 	X.Org ANSI C Emulation: 0.4
[  7101.724] 	X.Org Video Driver: 18.0
[  7101.724] 	X.Org XInput driver : 21.0
[  7101.724] 	X.Org Server Extension : 8.0
[  7101.725] (EE) systemd-logind: TakeControl failed: Device or resource busy
[  7101.725] (II) xfree86: Adding drm device (/dev/dri/card0)
[  7101.725] (EE) /dev/dri/card0: failed to set DRM interface version 1.4: Permission denied
[  7101.726] (--) PCI:*(0:0:2:0) 8086:0416:1462:10e9 rev 6, Mem @ 0xf7800000/4194304, 0xe0000000/268435456, I/O @ 0x0000f000/64
[  7101.726] (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
[  7101.726] (II) LoadModule: "glx"
[  7101.726] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[  7101.741] (II) Module glx: vendor="X.Org Foundation"
[  7101.741] 	compiled for 1.16.0, module version = 1.0.0
[  7101.741] 	ABI class: X.Org Server Extension, version 8.0
[  7101.741] (==) AIGLX enabled
[  7101.741] (==) Matched intel as autoconfigured driver 0
[  7101.741] (==) Matched modesetting as autoconfigured driver 1
[  7101.741] (==) Matched fbdev as autoconfigured driver 2
[  7101.741] (==) Matched vesa as autoconfigured driver 3
[  7101.741] (==) Assigned the driver to the xf86ConfigLayout
[  7101.741] (II) LoadModule: "intel"
[  7101.741] (II) Loading /usr/lib/xorg/modules/drivers/intel_drv.so
[  7101.758] (II) Module intel: vendor="X.Org Foundation"
[  7101.758] 	compiled for 1.16.0, module version = 2.99.914
[  7101.758] 	Module class: X.Org Video Driver
[  7101.758] 	ABI class: X.Org Video Driver, version 18.0
[  7101.758] (II) LoadModule: "modesetting"
[  7101.758] (WW) Warning, couldn't open module modesetting
[  7101.758] (II) UnloadModule: "modesetting"
[  7101.758] (II) Unloading modesetting
[  7101.758] (EE) Failed to load module "modesetting" (module does not exist, 0)
[  7101.758] (II) LoadModule: "fbdev"
[  7101.758] (WW) Warning, couldn't open module fbdev
[  7101.758] (II) UnloadModule: "fbdev"
[  7101.758] (II) Unloading fbdev
[  7101.758] (EE) Failed to load module "fbdev" (module does not exist, 0)
[  7101.758] (II) LoadModule: "vesa"
[  7101.758] (WW) Warning, couldn't open module vesa
[  7101.758] (II) UnloadModule: "vesa"
[  7101.758] (II) Unloading vesa
[  7101.758] (EE) Failed to load module "vesa" (module does not exist, 0)
[  7101.758] (II) intel: Driver for Intel(R) Integrated Graphics Chipsets:
	i810, i810-dc100, i810e, i815, i830M, 845G, 854, 852GM/855GM, 865G,
	915G, E7221 (i915), 915GM, 945G, 945GM, 945GME, Pineview GM,
	Pineview G, 965G, G35, 965Q, 946GZ, 965GM, 965GME/GLE, G33, Q35, Q33,
	GM45, 4 Series, G45/G43, Q45/Q43, G41, B43
[  7101.758] (II) intel: Driver for Intel(R) HD Graphics: 2000-6000
[  7101.758] (II) intel: Driver for Intel(R) Iris(TM) Graphics: 5100, 6100
[  7101.758] (II) intel: Driver for Intel(R) Iris(TM) Pro Graphics: 5200, 6200, P6300
[  7101.758] (++) using VT number 1

[  7101.758] (II) intel(0): Using Kernel Mode Setting driver: i915, version 1.6.0 20080730
[  7104.016] (EE) intel(0): [drm] failed to set drm interface version: Permission denied [13].
[  7104.016] (EE) intel(0): Failed to claim DRM device.
[  7104.016] (EE) 
[  7104.016] (EE) Backtrace:
[  7104.045] (EE) 0: /usr/bin/Xorg.bin (xorg_backtrace+0x56) [0x593966]
[  7104.045] (EE) 1: /usr/bin/Xorg.bin (0x400000+0x197b69) [0x597b69]
[  7104.045] (EE) 2: /usr/lib/libc.so.6 (0x7f6114ee9000+0x33df0) [0x7f6114f1cdf0]
[  7104.045] (EE) 3: /usr/lib/xorg/modules/drivers/intel_drv.so (0x7f6110117000+0x6f320) [0x7f6110186320]
[  7104.045] (EE) 4: /usr/bin/Xorg.bin (xf86DeleteScreen+0x5a) [0x480c3a]
[  7104.046] (EE) 5: /usr/bin/Xorg.bin (InitOutput+0xaf7) [0x47a2b7]
[  7104.046] (EE) 6: /usr/bin/Xorg.bin (0x400000+0x3b67a) [0x43b67a]
[  7104.046] (EE) 7: /usr/lib/libc.so.6 (__libc_start_main+0xf0) [0x7f6114f09000]
[  7104.046] (EE) 8: /usr/bin/Xorg.bin (0x400000+0x25d0e) [0x425d0e]
[  7104.046] (EE) 
[  7104.046] (EE) Segmentation fault at address 0x7f61102ed7a6
[  7104.046] (EE) 
Fatal server error:
[  7104.046] (EE) Caught signal 11 (Segmentation fault). Server aborting
[  7104.046] (EE) 
[  7104.046] (EE) 
Please consult the The X.Org Foundation support 
	 at http://wiki.x.org
 for help. 
[  7104.046] (EE) Please also check the log file at "/var/log/Xorg.2.log" for additional information.
[  7104.046] (EE) 
[  7104.065] (EE) Server terminated with error (1). Closing log file.

Offline

#5 2014-09-08 13:33:45

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,457

Re: Starting games in a seperate X server

Exactly the same, my tty7 becomes a nice blinking cursor, but system is still alive, somehow.

-EDIT
A simple

# X :1

...started from a tty by root, produces a nice black screen and i cannot switch Vts anymore (no other X servers are running).
Thie time there are no crash in the log, just is impossible to switch ttys nd get away from the black screen.
Xorg.wrap does the same.
Even tried with:

$ cat /etc/X11/Xwrapper.config
allowed_users = anybody
needs_root_rights = yes

No luck.

Last edited by kokoko3k (2014-09-08 13:54:24)


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#6 2014-09-08 21:55:25

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Starting games in a seperate X server

Tjuh wrote:

Yes ofc, that was the first wiki page I checked, however when I try to run that command for Heroes of Newerth for example, I get some weird xorg permission warning:

tjuh ~/Games/HoN $ xinit hon.sh -- :1 vt$XDG_VTNR

/usr/bin/Xorg.wrap: Only console users are allowed to run the X server
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error

Were you trying to run this from inside of X or from the tty?

Offline

#7 2014-09-09 07:02:12

Tjuh
Member
Registered: 2013-11-14
Posts: 18

Re: Starting games in a seperate X server

That command was run from a terminal inside X yes.

Offline

#8 2014-09-09 10:58:32

Tjuh
Member
Registered: 2013-11-14
Posts: 18

Re: Starting games in a seperate X server

If I run this command for example:

sudo xinit -- /home/tjuh/Games/HoN/hon.sh  :1

The game does start, however the configuration settings which are stored in /home/tjuh/.Heroes of Newerth/ are not being read. Same goes for any other game I tried, I have to manually setup the game every time I start it with xinit.

Offline

#9 2015-12-17 17:18:32

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,457

Re: Starting games in a seperate X server

Stil struggling to make this works.
while

xinit appname -- :1

works, if i try to switch to the previous vt, my system locks; cannot switch terminals via ctrl-alt-fx anymore.
Killing the newly created Xserver by connecting via ssh, or exiting "appname", works and returns to the previous tty.

Does switching while having two Xservers open works for you?

-edit
this script from the wiki: https://wiki.archlinux.org/index.php/Ru … _X_display
has the same effect; starting (say) openbox and quitting it just works; but starting it ant try to go back to the previous x server locks the machine.

Last edited by kokoko3k (2015-12-17 17:33:09)


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#10 2015-12-29 01:13:56

smudge
Member
Registered: 2011-03-20
Posts: 158

Re: Starting games in a seperate X server

Hi kokoko3k,

Switching between 2 xservers does work correctly but only if you've logged into 2 vts. No display manager here so, login on vt1, startx, Ctrl+Alt+F2 (vt2), login, startx again. Switching should work fine. AFAICT that's the way systemd and xorg want it, one login and X per vt. In other words, they've broken the old way smile

Disclaimer: my understanding of all this is poor smile

Offline

#11 2015-12-31 03:40:32

tedbell
Member
Registered: 2012-08-04
Posts: 167

Re: Starting games in a seperate X server

I use this script.

X :3 -ac -terminate &
export DISPLAY=:3
#cd "<path to game if using wine>"
<command>

I am able to switch from my wm session and the game fine.

Last edited by tedbell (2015-12-31 03:41:24)

Offline

Board footer

Powered by FluxBB