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

According to /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).

Some details:

  • 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 lightdm.
  • /home/stduser/.profile is set to export DISPLAY=:0.0 and XAUTHORITY=/home/stduser/.Xauthority to 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 vt1 perfectly 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 :1 seems works "better", but only shows a black screen.
  • xinit -- :1 worked 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 systemd-logind.

Update 2: It is indeed mostly a systemd issue, as usual.

You need to do these:

  1. Enable Early KMS by appending i915 (e.g your GPU driver, if it does support Early KMS) to the /etc/initramfs-tools/modules file and one endline character (a simple empty new line). Save it, then use update-initramfs -u to update your initramfs.

  2. Create an /etc/modprobe.d/i915-kms.conf file, then just add options i915 modeset=1 to it and the usual endline character, save your changes.

  3. 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
  • use grub-customizer > General settings tab > kernal parameters box to add i915.modesetting=1 and saved the edits,
  • reboot,
  • choose a kernel to boot, pressed e to edit the kernel parameters,
  • and put i915.modeset=1 again (made sure that it will be there), then
  • press F10 to boot.
  • Checked that cat /sys/module/i915/parameters/modeset returned 1, which is true.
  • 1
    It's weird that you request for a second display (:1) and that logs go to Xorg.0.log rather than Xorg.1.log. startx is a high-level script, you may want to start experimenting with X :1, then xinit -- :1 and finally, when everything works, startx -- :1. Just ensure that you have enabled the kill-key (Ctrl+Alt+Backspace) and/or the VT-switch key (Ctrl+Alt+Fn) in your conf. To simplify things, don't specify a specific term like vt1 (which may be used) and make your experiments from a terminal your user has opened (openvt or Ctrl+Alt+Fn + login).
    – xhienne
    Feb 17, 2021 at 10:17
  • You're right, just the force of habits. ;) I made the edits about that.
    – X.LINK
    Feb 17, 2021 at 12:06
  • @xhienne: Just tried what you said: X : 1 worked better (black screen) and xinit -- :1 even better (got a window-less xterm over a black screen and nothing else, but I can move the mouse's cursor), but that's all. Looking at the logs still shows the same issue: /dev/dri/card0: failed to set DRM interface version 1.4: Permission denied. I've added few more log lines before that error, it may be related to systemd-logind.
    – X.LINK
    Feb 17, 2021 at 21:45
  • 1
    That means Xorg works. Maybe it lacks graphic acceleration, but it works => /dev/dri/card0 not being accessible is not a fatal issue. Now, in the xinit termnal, you can start your usual window manager (xfce), and then apps, etc. PS: xinit doesn't work better; your black screen is your X server (Xorg) devoid of any apps; xinit starts Xorg plus a terminal, that's all (and startx starts a full desktop session)
    – xhienne
    Feb 17, 2021 at 21:59

1 Answer 1


You may have found a slightly different route to hit this known bug: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1021

Basically, the first process to open the device automatically gets the DRM "master" capability given to it automatically, so it gets to do things like drmSetInterfaceVersion() and drmGetBusId() (the latter has the former as a pre-requisite) without being root. But any other process trying to do the same needs to already have either the DRM master capability or CAP_SYS_ADMIN (and normally CAP_SYS_ADMIN is equivalent to being root). This is something the author of the X server hardware probing routine did not expect.

The bug resulted in two fixes:

But it looks like those fixes have not hit Debian 10 (at least not yet). For your case, the first fix would be the important one.

Arguably, there might be a place for a third fix: the fact that the actual bus ID is not available without doing drmSetInterfaceVersion() first might be something that needs fixing.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .