I'm trying to run
startx -- :1 vt1 on a tty with a standard user (named stduser), which is already natively logged on Debian 10 with XFCE as per this answer: https://unix.stackexchange.com/a/85384
The display then also seems to flickers, but this ultimately fails:
(==) Log file: "/var/log/Xorg.1.log" (==) Using config directory: "/etc/X11/xorg.conf.d" (==) Using system config directory "/usr/share/X11/xorg.conf.d" xinit: connection to X server lost
/var/log/Xorg.1.log, everything looks fine until those lines:
[ 3585.25] (++) using VT number 1 [ 3585.25] (II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration [ 3585.26] (II) xfree86: Adding drm device (/dev/dri/card0) [ 3585.26] (EE) /dev/dri/card0: failed to set DRM interface version 1.4: Permission denied
Which seems to fit and confirms a software issue, since
sudo startx -- :1 vt1 does perfectly works. But that's not what I want since I can't run some software while being logged as root.
And this is where I'm stuck, since most clues are related to PCs that have Optimus (Intel iGPU + Nvidia GPU).
- I only have an Intel HD Graphics from around a decade ago (nothing fancy like Intel Iris and their eDRAM/L4 cache/HBM nor any AMD, Nvidia and bad old Intel GMA GPU).
- The desktop manager is
/home/stduser/.profileis set to export
XAUTHORITY=/home/stduser/.Xauthorityto the environment variables.
- This fix was also applied, since some display/session issues got solved (but that still didn't helped): Why can't I run GUI apps from 'root': "No protocol specified"?
startx -- :1 vt1perfectly works on AntiX (lightweight systemd-less Debian).
So the question is: How do I sucessfully start another X session with the same standard user ?
Update 1: Applying xhienne hints
X :1seems works "better", but only shows a black screen.
xinit -- :1worked even "better", showed a window-less xterm over the black screen and I can now move the mouse cursor.
But, the same error still occurs, with a few more interesting lines in
/var/log/Xorg.1.log (updated, see above), which seems to be related to
Update 2: It is indeed mostly a systemd issue, as usual.
You need to do these:
Enable Early KMS by appending
i915(e.g your GPU driver, if it does support Early KMS) to the
/etc/initramfs-tools/modulesfile and one endline character (a simple empty new line). Save it, then use
update-initramfs -uto update your initramfs.
/etc/modprobe.d/i915-kms.conffile, then just add
options i915 modeset=1to it and the usual endline character, save your changes.
Reboot your PC.
Now, running the following commands gives: (updates coming, testing now).
But, as a rule of thumbs: When something fails on Debian, do try AntiX and see if that was a systemd issue.
Update 2.1: For some reason,
i915 modeset=1 wasn't applied after some reboots even after the
update-initramfs -u. So I pulled out the nuke:
update-initramfs -u -k all, then
General settingstab >
kernal parametersbox to add
i915.modesetting=1and saved the edits,
- choose a kernel to boot, pressed
eto edit the kernel parameters,
- and put
i915.modeset=1again (made sure that it will be there), then
- press F10 to boot.
- Checked that
1, which is true.