5

Got a strange problem on Ubuntu 20. I'm trying to get hw accelerated xrdp Xorg session. Computer video is Mesa DRI Intel(R) HD Graphics 4600 (HSW GT2). I fetched compiled and installed devel branch of xrdp (Glamour branch was merged in).

Then I tried to login but cinnamon show warning about software rendering. I looked into xorg log and found this:

[  3987.463] (II) xfree86: Adding drm device (/dev/dri/card0)
[  3987.463] (EE) systemd-logind: failed to take device /dev/dri/card0: Operation not permitted

/dev/dri/card0 is owned by root, have video group and group rw acl. xrdp-sesman starts Xorg session from user with uid 1000 using command:

/usr/lib/xorg/Xorg :10 -auth .Xauthority -config xrdp/xorg.conf -noreset -nolisten tcp -logfile .xorgxrdp.%s.log

I tried:

  • Run this command from root - it can access dri/card0 without any problem
  • Add user 1000 to groups video, audio, plugdev - didn't help (I run id command, check groups and then try to start xorg from console using command above)
  • Change permissions to 777 on folder /dev/dri (chmod -R 777 /dev/dri)
  • Change owner of /dev/dri to user 1000

So. I now just have no idea what I'm doing wrong and how to solve this...

P.S. Finally i got hw acceleration for xrdp. The xorgxrdp module should be compiled with --enable-glamor option (./configure --enable-glamor). After recompilation cinnamon stop complaining about software rendering and became much faster.

But xorg log still have

failed to take device /dev/dri/card0: Operation not permitted

record.

Gilles Quénot
  • 31,569
  • 7
  • 64
  • 82
Alexandr Shutko
  • 151
  • 1
  • 5
  • I don't have the answer to your question however /dev/dri/cardxyz MUST remain crw/-rw/--- This has very good security reasons and as it has rw for group, adding user to the appropriate group does prevent the need to have it ew for user. Irrespective of the problem, I would revert your chmod 777 immediatly. – MC68020 Aug 14 '20 at 08:22
  • Card0 permissions and owner was restored after reboot so this is not a problem – Alexandr Shutko Aug 14 '20 at 09:01
  • @AlexandrShutko did you get any further with this? I think I'm in the same situation, but it only happens after a reboot and it get fixed if I `sudo systemctl restart xrdp` but then another Xorg instance is started (`:11`) while the original one (`:10`) stays there, running but not really used. – cYrus Feb 18 '21 at 14:05
  • No. I have single copy started and working without any trouble – Alexandr Shutko Feb 19 '21 at 13:02
  • So, looks like a warning and not a fatal error? Related https://github.com/neutrinolabs/xrdp/issues/2588 – Gilles Quénot Mar 16 '23 at 05:02
  • Yes. It is warning and not fatal. – Alexandr Shutko Apr 03 '23 at 03:52

0 Answers0