Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

connect to rdp but black screen #2379

Closed
rapirent opened this issue Sep 23, 2022 · 12 comments
Closed

connect to rdp but black screen #2379

rapirent opened this issue Sep 23, 2022 · 12 comments

Comments

@rapirent
Copy link

rapirent commented Sep 23, 2022

I ran xorgxrdp and xrdp in my archlinux (kernel: 5.18.9-arch1-1) as a RDP server
but I can't connect to the RDP server from my mac with Microsoft remote desktop (an RDP client in macOS), and it also failed when I tried to use xfreerdp to connect to the xrdp server itself.

(precisely it did connect to the xrdp server but showed all black screen)

I typed in xfreerdp /v:[ip address of my rdp server] /u:tony /p:[mypassword] /size:800x600 /sound:latency:100 and xfreerdp (also the microsoft remote desktop) show that

connecting to sesman on 127.0.0.1:3350
sesman connect ok
sending login info to session manager. Please wait...
login successful for user tony on display 10
started connecting
connection problem, giving up
some problem
Error connecting to user session

I use no display manager but only window manager (dwm)

the attachments are my settings for xrdp, xrdp-sesman, xorg, start-script, syslog

there are other info i think would be helpful...

$ /usr/bin/xrdp --version
xrdp 0.9.19
  A Remote Desktop Protocol Server.
  Copyright (C) 2004-2020 Jay Sorg, Neutrino Labs, and all contributors.
  See https://github.com/neutrinolabs/xrdp for more information.

  Configure options:
      --prefix=/usr
      --sysconfdir=/etc
      --localstatedir=/var
      --sbindir=/usr/bin
      --with-systemdsystemunitdir=/usr/lib/systemd/system
      --enable-jpeg
      --enable-tjpeg
      --enable-fuse
      --enable-fdkaac
      --enable-opus
      --enable-rfxcodec
      --enable-mp3lame
      --enable-pixman
      --enable-painter
      --enable-vsock
      --enable-ipv6
      --enable-pam-config=arch
      --enable-rdpsndaudin
      --with-imlib2
      CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection
      LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now

  Compiled with OpenSSL 1.1.1p  21 Jun 2022
$ sudo ss -ltnp
State            Recv-Q           Send-Q                           Local Address:Port                       Peer Address:Port           Process
LISTEN           0                2                           [::ffff:127.0.0.1]:3350                                  *:*               users:(("xrdp-sesman",pid=1909,fd=11))
LISTEN           0                2                                            *:3389                                  *:*               users:(("xrdp",pid=1911,fd=11))
$ ls /tmp/.X11-unix/X* /tmp/.X*-lock
/tmp/.X0-lock  /tmp/.X11-unix/X0

any suggestion is helpful...
thank for your patient for reading my issue
xrdp-sesman-xfreerdp.log
xrdp-xfreerdp.log
xrdp-sesman.log
xrdp.log
xrdpini.txt
sesmanini.txt
xrdpinitrc.txt
xrdp.log
xrdp-sesman.log
xrdp-xfreerdp.log
xrdp-sesman-xfreerdp.log
startwm.txt

@rapirent rapirent changed the title can't connect to xrdp connect to rdp but black screen Sep 23, 2022
@matt335672
Copy link
Member

Thanks for the logs @rapirent

From xrdp-sesman.log, it looks like the X server isn't starting.

You should also have a file /home/tony/.xorgxrdp.10.log. Can you check that you have, and if you do, can you post it here as well?

Thanks.

@rapirent
Copy link
Author

oh...so that I should start x server first, I just supposed xrdp will open a x for me

thank you!

@rapirent
Copy link
Author

rapirent commented Sep 26, 2022

I can now have a screen with rdp client, but only for xvnc, I can't use xorg option to login rdp successful...
Could you please help me to figure out the problem?
I believe xvnc is using the :11, and there is the .xorgxrdp.11.log in my $HOME

$ ps aux | grep X
root        6040  0.0  0.0   4168  1320 tty1     S+   09:59   0:00 xinit /root/.xinitrc -- /etc/X11/xinit/xserverrc :0 vt1 -keeptty -auth /tmp/serverauth.EtaNreKq6j
root        6041  0.1  0.1 2348392 161992 tty1   S<l  09:59   0:00 /usr/lib/Xorg -nolisten tcp :0 vt1 -keeptty -auth /tmp/serverauth.EtaNreKq6j
tony        6819  0.0  0.0 236724 127916 ?       S    10:01   0:00 Xvnc :11 -auth .Xauthority -geometry 1920x1080 -depth 32 -rfbauth /home/tony/.vnc/sesman_passwd-tony@tony-arch:11 -bs -nolisten tcp -localhost -dpi 96
tony        7072  0.0  0.0   6680  2552 pts/2    S+   10:05   0:00 grep --color=auto X

if I try to xorg option to open a xrdp session, it will create .xorgxrdp.12.log
and the sesman's syslog shows that

Sep 26 10:07:08 tony-arch xrdp-sesman[7319]: [DEBUG] Did not find a running X server at /tmp/.X12-lock
Sep 26 10:07:08 tony-arch xrdp-sesman[7318]: [DEBUG] Did not find a running X server at /tmp/.X12-lock
Sep 26 10:07:08 tony-arch xrdp-sesman[7319]: [DEBUG] Did not find a running X server at /tmp/.X11-unix/X12
Sep 26 10:07:08 tony-arch xrdp-sesman[7318]: [DEBUG] Did not find a running X server at /tmp/.X11-unix/X12
Sep 26 10:07:08 tony-arch xrdp-sesman[7319]: [DEBUG] Did not find a running X server at /tmp/.X12-lock
Sep 26 10:07:08 tony-arch xrdp-sesman[7318]: [DEBUG] Did not find a running X server at /tmp/.X12-lock
Sep 26 10:07:08 tony-arch xrdp-sesman[7318]: [WARN ] Timed out waiting for X server on display 12 to startup
Sep 26 10:07:08 tony-arch xrdp-sesman[7318]: [INFO ] Session started successfully for user tony on display 12
Sep 26 10:07:08 tony-arch xrdp-sesman[7356]: [INFO ] Starting the xrdp channel server for display 12
Sep 26 10:07:08 tony-arch xrdp-sesman[7318]: [INFO ] Session in progress on display 12, waiting until the window manager (pid 7319) exits to>
Sep 26 10:07:08 tony-arch xrdp-sesman[7356]: [DEBUG] Calling exec (excutable: /usr/bin/xrdp-chansrv, arguments: /usr/bin/xrdp-chansrv)
Sep 26 10:07:08 tony-arch xrdp-sesman[7318]: [DEBUG] waiting for pid 7319 to exit
Sep 26 10:07:08 tony-arch xrdp-sesman[7319]: [DEBUG] Did not find a running X server at /tmp/.X11-unix/X12
Sep 26 10:07:08 tony-arch xrdp-sesman[7319]: [DEBUG] Did not find a running X server at /tmp/.X12-lock
Sep 26 10:07:08 tony-arch xrdp-sesman[7319]: [WARN ] Timed out waiting for X server on display 12 to startup
Sep 26 10:07:08 tony-arch xrdp-sesman[7319]: [DEBUG] Did not find a running X server at /tmp/.X11-unix/X12
Sep 26 10:07:08 tony-arch xrdp-sesman[7319]: [DEBUG] Did not find a running X server at /tmp/.X12-lock
Sep 26 10:07:08 tony-arch xrdp-sesman[7319]: [ERROR] There is no X server active on display 12
Sep 26 10:07:08 tony-arch xrdp-sesman[7319]: [ERROR] A fatal error has occured attempting to start the window manager on display 12, abortin>
Sep 26 10:07:08 tony-arch xrdp-sesman[7318]: [WARN ] Window manager (pid 7319, display 12) exited quickly (0 secs). This could indicate a wi>
Sep 26 10:07:08 tony-arch xrdp-sesman[7318]: [INFO ] Calling auth_stop_session and auth_end from pid 7318

the content of the .xorgxrdp.12.log is

$ cat .xorgxrdp.12.log
[[244356.029]
X.Org X Server 1.21.1.3
X Protocol Version 11, Revision 0
[244356.029] Current Operating System: Linux tony-arch 5.18.9-arch1-1 #1 SMP PREEMPT_DYNAMIC Sat, 02 Jul 2022 21:03:06 +0000 x86_64
[244356.029] Kernel command line: BOOT_IMAGE=/vmlinuz-linux root=UUID=362716ed-45b1-4997-b6b6-3db909374510 rw loglevel=3 quiet
[244356.029]
[244356.029] Current version of pixman: 0.40.0
[244356.029] 	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
[244356.029] Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[244356.029] (++) Log file: ".xorgxrdp.12.log", Time: Mon Sep 26 10:06:58 2022
[244356.029] (++) Using config file: "/etc/X11/xrdp/xorg.conf"
[244356.029] (==) Using config directory: "/etc/X11/xorg.conf.d"
[244356.029] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[244356.029] (**) Option "defaultserverlayout" "X11 Server"
[244356.029] (**) ServerLayout "X11 Server"
[244356.029] (**) |-->Screen "Screen (xrdpdev)" (0)
[244356.029] (**) |   |-->Monitor "Monitor"
[244356.029] (**) |   |-->Device "Video Card (xrdpdev)"
[244356.029] (**) |   |-->GPUDevice "Intel Graphics"
[244356.029] (**) |   |-->GPUDevice "Intel"
[244356.029] (**) |-->Input Device "xrdpMouse"
[244356.029] (**) |-->Input Device "xrdpKeyboard"
[244356.029] (**) Option "DontVTSwitch" "on"
[244356.029] (**) Option "AutoAddDevices" "off"
[244356.029] (**) Not automatically adding devices
[244356.029] (==) Automatically enabling devices
[244356.029] (==) Automatically adding GPU devices
[244356.029] (==) Automatically binding GPU devices
[244356.029] (==) Max clients allowed: 256, resource mask: 0x1fffff
[244356.029] (WW) The directory "/usr/share/fonts/misc" does not exist.
[244356.029] 	Entry deleted from font path.
[244356.029] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/TTF".
[244356.029] 	Entry deleted from font path.
[244356.029] 	(Run 'mkfontdir' on "/usr/share/fonts/TTF").
[244356.029] (WW) The directory "/usr/share/fonts/OTF" does not exist.
[244356.029] 	Entry deleted from font path.
[244356.029] (WW) The directory "/usr/share/fonts/Type1" does not exist.
[244356.029] 	Entry deleted from font path.
[244356.029] (WW) The directory "/usr/share/fonts/100dpi" does not exist.
[244356.029] 	Entry deleted from font path.
[244356.029] (WW) The directory "/usr/share/fonts/75dpi" does not exist.
[244356.029] 	Entry deleted from font path.
[244356.029] (==) FontPath set to:

[244356.029] (==) ModulePath set to "/usr/lib/xorg/modules"
[244356.029] (II) Module ABI versions:
[244356.029] 	X.Org ANSI C Emulation: 0.4
[244356.029] 	X.Org Video Driver: 25.2
[244356.029] 	X.Org XInput driver : 24.4
[244356.029] 	X.Org Server Extension : 10.0
[244356.029] (--) using VT number 2

[244356.029] (II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration
[244356.030] (II) xfree86: Adding drm device (/dev/dri/card0)
[244356.030] (II) Platform probe for /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0
[244356.030] (II) xfree86: Adding drm device (/dev/dri/card1)
[244356.030] (II) Platform probe for /sys/devices/pci0000:00/0000:00:01.1/0000:02:00.0/drm/card1
[244356.030] (II) xfree86: Adding drm device (/dev/dri/card2)
[244356.030] (II) Platform probe for /sys/devices/pci0000:00/0000:00:02.0/drm/card2
[244356.031] (**) OutputClass "nvidia" ModulePath extended to "/usr/lib/nvidia/xorg,/usr/lib/xorg/modules,/usr/lib/xorg/modules"
[244356.031] (**) OutputClass "nvidia" ModulePath extended to "/usr/lib/nvidia/xorg,/usr/lib/xorg/modules,/usr/lib/nvidia/xorg,/usr/lib/xorg/modules,/usr/lib/xorg/modules"
[244356.031] (--) PCI:*(0@0:2:0) 8086:3e98:1043:8782 rev 2, Mem @ 0x6032000000/16777216, 0x4000000000/268435456, I/O @ 0x00006000/64, BIOS @ 0x????????/131072
[244356.031] (--) PCI: (1@0:0:0) 10de:1c31:10de:131b rev 161, Mem @ 0x72000000/16777216, 0x6020000000/268435456, 0x6030000000/33554432, I/O @ 0x00005000/128, BIOS @ 0x????????/524288
[244356.031] (--) PCI: (2@0:0:0) 10de:1c31:10de:131b rev 161, Mem @ 0x70000000/16777216, 0x6000000000/268435456, 0x6010000000/33554432, I/O @ 0x00004000/128, BIOS @ 0x????????/524288
[244356.031] (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
[244356.031] (II) "glx" will be loaded. This was enabled by default and also specified in the config file.
[244356.031] (II) LoadModule: "dbe"
[244356.031] (II) Module "dbe" already built-in
[244356.031] (II) LoadModule: "ddc"
[244356.031] (II) Module "ddc" already built-in
[244356.031] (II) LoadModule: "extmod"
[244356.031] (II) Module "extmod" already built-in
[244356.031] (II) LoadModule: "glx"
[244356.031] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[244356.032] (II) Module glx: vendor="X.Org Foundation"
[244356.032] 	compiled for 1.21.1.3, module version = 1.0.0
[244356.032] 	ABI class: X.Org Server Extension, version 10.0
[244356.032] (II) LoadModule: "int10"
[244356.032] (II) Loading /usr/lib/xorg/modules/libint10.so
[244356.032] (II) Module int10: vendor="X.Org Foundation"
[244356.032] 	compiled for 1.21.1.3, module version = 1.0.0
[244356.032] 	ABI class: X.Org Video Driver, version 25.2
[244356.032] (II) LoadModule: "record"
[244356.032] (II) Module "record" already built-in
[244356.032] (II) LoadModule: "vbe"
[244356.032] (II) Loading /usr/lib/xorg/modules/libint10.so
[244356.032] (II) Module int10: vendor="X.Org Foundation"
[244356.032] 	compiled for 1.21.1.3, module version = 1.0.0
[244356.032] 	ABI class: X.Org Video Driver, version 25.2
[244356.032] (II) LoadModule: "xorgxrdp"
[244356.032] (II) Loading /usr/lib/xorg/modules/libxorgxrdp.so
[244356.032] (II) Module XORGXRDP: vendor="X.Org Foundation"
[244356.032] 	compiled for 1.21.1.4, module version = 0.9.19
[244356.032] 	ABI class: X.Org Video Driver, version 25.2
[244356.032] xorgxrdpSetup:
[244356.032] (II) LoadModule: "fb"
[244356.032] (II) Module "fb" already built-in
[244356.032] (II) LoadModule: "xrdpdev"
[244356.032] (II) Loading /usr/lib/xorg/modules/drivers/xrdpdev_drv.so
[244356.032] (II) Module XRDPDEV: vendor="X.Org Foundation"
[244356.032] 	compiled for 1.21.1.4, module version = 0.9.19
[244356.032] 	ABI class: X.Org Video Driver, version 25.2
[244356.032] xrdpdevSetup:
[244356.032] (II) LoadModule: "intel"
[244356.032] (WW) Warning, couldn't open module intel
[244356.032] (EE) Failed to load module "intel" (module does not exist, 0)
[244356.032] (II) LoadModule: "modesetting"
[244356.032] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[244356.033] (II) Module modesetting: vendor="X.Org Foundation"
[244356.033] 	compiled for 1.21.1.3, module version = 1.21.1
[244356.033] 	Module class: X.Org Video Driver
[244356.033] 	ABI class: X.Org Video Driver, version 25.2
[244356.033] (II) LoadModule: "xrdpmouse"
[244356.033] (II) Loading /usr/lib/xorg/modules/input/xrdpmouse_drv.so
[244356.033] (II) Module XRDPMOUSE: vendor="X.Org Foundation"
[244356.033] 	compiled for 1.21.1.4, module version = 0.9.19
[244356.033] 	Module class: X.Org XInput Driver
[244356.033] 	ABI class: X.Org XInput driver, version 24.4
[244356.033] rdpmousePlug:
[244356.033] (II) LoadModule: "xrdpkeyb"
[244356.033] (II) Loading /usr/lib/xorg/modules/input/xrdpkeyb_drv.so
[244356.033] (II) Module XRDPKEYB: vendor="X.Org Foundation"
[244356.033] 	compiled for 1.21.1.4, module version = 0.9.19
[244356.033] 	Module class: X.Org XInput Driver
[244356.033] 	ABI class: X.Org XInput driver, version 24.4
[244356.033] rdpkeybPlug:
[244356.033] rdpIdentify:
[244356.033] (II) XRDPDEV: driver for xrdp: XRDPDEV
[244356.033] rdpDriverFunc: op 10
[244356.033] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[244356.033] (EE)
Fatal server error:
[244356.033] (EE) xf86OpenConsole: Cannot open virtual console 2 (Permission denied)
[244356.033] (EE)
[244356.033] (EE)
Please consult the The X.Org Foundation support
	 at http://wiki.x.org
 for help.
[244356.033] (EE) Please also check the log file at ".xorgxrdp.12.log" for additional information.
[244356.033] (EE)
[244356.033] (WW) xf86CloseConsole: KDSETMODE failed: Bad file descriptor
[244356.033] (WW) xf86CloseConsole: VT_GETMODE failed: Bad file descriptor
[244356.033] (EE) Server terminated with error (1). Closing log file.

@akarl10
Copy link
Contributor

akarl10 commented Oct 2, 2022

I had a similar issue lately. Something is loading the "modesetting" driver.
I fixed that by removing the package that did that (don't remember exactly, but for me clearly not required)

I think as a workaround adding GPUDevice "" to the Section "Screen" and adding
and AutoAddGPU "off" to Section "ServerFlags"
worked too (both parameters in /etc/X11/xrdp/xorg.conf

@matt335672
Copy link
Member

Thanks @akarl10 - that could be it. We've seen something similar in #2253.

@rapirent - could you possibly try adding the line in bold below to your /etc/X11/xrdp/xorg.conf:-

Section "ServerFlags"
    # This line prevents "ServerLayout" sections in xorg.conf.d files
    # overriding the "X11 Server" layout (xrdp #1784)
    Option "DefaultServerLayout" "X11 Server"
    Option "DontVTSwitch" "on"
    Option "AutoAddDevices" "off"
    Option "AutoAddGPU" "off"
EndSection

If that doesn't work, please post the contents of the latest ~/.xorgxrdp.*.log here.

@akarl10
Copy link
Contributor

akarl10 commented Oct 11, 2022

I would like to add something: On a other system (intel gpu) I added something to /etc/X11/xorg.conf.d/ to force the modesetting driver for my gpu on the physical display (something similar/quite the same is on https://wiki.archlinux.org/title/intel_graphics)

Section "Device"
    Identifier "card0"
     Driver "modesetting"
     Option      "DRI"    "3"
     Option      "AccelMethod"    "glamor"
EndSection

The only way to make this driver not load was GPUDevice "" in addition to the options "AutoAddGPU" "off".
I think the reason is that if a device section exists somewhere, it is not considered a AutoAdd case for Xorg.
However I am not a Xorg expert and don't know if there is a better way to do the above, but probably others are hit by the same "issue" if they did follow the archlinux wiki (probably @rapirent did this because Intel Graphics is specifically mentioned in the log output)

@matt335672
Copy link
Member

Hi @akarl10

As you say, the xorg.conf rules are pretty complex, and I certainly don't fully understand them.

It would be great to hear back from @rapirent or @mustafa58 before we put a PR together. I'll give them a few days to comment.

@phongtnit
Copy link

phongtnit commented Oct 22, 2022

I had the same XRDP issue on Ubuntu 20.04.5 LTS with default conguration, after I entered my user & pass, I saw a black screen and the error popup "...login successful for display 11...connection problem, giving up, .... some problem" as the image Imgur

My /var/log/xrdp.log

[20221022-16:27:29] [DEBUG] Closed socket 19 (AF_UNIX)
[20221022-16:27:32] [DEBUG] Closed socket 19 (AF_UNIX)
[20221022-16:27:36] [DEBUG] Closed socket 19 (AF_UNIX)
[20221022-16:27:39] [DEBUG] Closed socket 19 (AF_UNIX)
[20221022-16:27:43] [DEBUG] Closed socket 19 (AF_UNIX)
[20221022-16:27:46] [DEBUG] Closed socket 19 (AF_UNIX)
[20221022-16:27:50] [DEBUG] Closed socket 19 (AF_UNIX)
[20221022-16:27:53] [DEBUG] Closed socket 19 (AF_UNIX)
[20221022-16:27:57] [DEBUG] Closed socket 19 (AF_UNIX)
[20221022-16:28:00] [DEBUG] Closed socket 19 (AF_UNIX)
[20221022-16:28:04] [DEBUG] xrdp_wm_log_msg: connection problem, giving up
[20221022-16:28:04] [DEBUG] Closed socket 19 (AF_UNIX)
[20221022-16:28:04] [DEBUG] xrdp_wm_log_msg: some problem
[20221022-16:28:04] [DEBUG] xrdp_mm_module_cleanup
[20221022-16:28:04] [DEBUG] Closed socket 18 (AF_INET6 ::1 port 43874)
[20221022-16:33:13] [DEBUG] Closed socket 12 (AF_INET6 ::ffff:x.x.x.200 port 3389)
[20221022-16:33:13] [DEBUG] xrdp_mm_module_cleanup
xrdp --version
xrdp 0.9.12
  A Remote Desktop Protocol Server.
  Copyright (C) 2004-2018 Jay Sorg, Neutrino Labs, and all contributors.
  See https://github.com/neutrinolabs/xrdp for more information.

  Configure options:
      --enable-ipv6
      --enable-jpeg
      --enable-fuse
      --enable-rfxcodec
      --enable-opus
      --enable-painter
      --enable-vsock
      --build=x86_64-linux-gnu
      --prefix=/usr
      --includedir=${prefix}/include
      --mandir=${prefix}/share/man
      --infodir=${prefix}/share/info
      --sysconfdir=/etc
      --localstatedir=/var
      --disable-silent-rules
      --libdir=${prefix}/lib/x86_64-linux-gnu
      --libexecdir=${prefix}/lib/x86_64-linux-gnu
      --disable-maintainer-mode
      --disable-dependency-tracking
      --with-socketdir=/run/xrdp/sockdir
      build_alias=x86_64-linux-gnu
      CFLAGS=-g -O2 -fdebug-prefix-map=/build/xrdp-GJgww4/xrdp-0.9.12=. -fstack-protector-strong -Wformat -Werror=format-security 
      LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,--as-needed
      CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2 
      PKG_CONFIG_PATH=/build/xrdp-GJgww4/xrdp-0.9.12/pkgconfig

  Compiled with OpenSSL 1.1.1f  31 Mar 2020
ps aux | grep X
root        1466  0.0  0.0 250864 58172 tty1     Sl+  16:18   0:01 /usr/lib/xorg/Xorg vt1 -displayfd 3 -auth /run/user/125/gdm/Xauthority -background none -noreset -keeptty -verbose 3
root        2719  0.0  0.1 258208 65804 tty2     Ssl+ 16:20   0:01 /usr/lib/xorg/Xorg :10 -auth .Xauthority -config xrdp/xorg.conf -noreset -nolisten tcp -logfile .xorgxrdp.%s.log
chuyenq+    3549  0.0  0.0   8504  2384 pts/0    S+   16:55   0:00 grep --color=auto X

My .xorgxrdp.11.log

[  1414.825] 
X.Org X Server 1.20.13
X Protocol Version 11, Revision 0
[  1414.825] Build Operating System: linux Ubuntu
[  1414.825] Current Operating System: Linux Ubuntu-2004-200 5.4.0-131-generic #147-Ubuntu SMP Fri Oct 14 17:07:22 UTC 2022 x86_64
[  1414.825] Kernel command line: BOOT_IMAGE=/vmlinuz-5.4.0-131-generic root=UUID=317438e2-d01c-4ba5-acf0-c1dea15f29ee ro nomodeset consoleblank=0
[  1414.825] Build Date: 06 July 2022  01:53:24PM
[  1414.825] xorg-server 2:1.20.13-1ubuntu1~20.04.3 (For technical support please see http://www.ubuntu.com/support) 
[  1414.825] Current version of pixman: 0.38.4
[  1414.825] 	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
[  1414.825] Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[  1414.825] (++) Log file: ".xorgxrdp.11.log", Time: Sat Oct 22 16:41:22 2022
[  1414.825] (EE) Unable to locate/open config file: "xrdp/xorg.conf"
[  1414.825] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[  1414.825] (==) No Layout section.  Using the first Screen section.
[  1414.825] (==) No screen section available. Using defaults.
[  1414.825] (**) |-->Screen "Default Screen Section" (0)
[  1414.825] (**) |   |-->Monitor "<default monitor>"
[  1414.825] (==) No monitor specified for screen "Default Screen Section".
	Using a default monitor configuration.
[  1414.825] (==) Automatically adding devices
[  1414.825] (==) Automatically enabling devices
[  1414.825] (==) Automatically adding GPU devices
[  1414.825] (==) Automatically binding GPU devices
[  1414.825] (==) Max clients allowed: 256, resource mask: 0x1fffff
[  1414.825] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[  1414.825] 	Entry deleted from font path.
[  1414.825] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist.
[  1414.825] 	Entry deleted from font path.
[  1414.825] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.
[  1414.825] 	Entry deleted from font path.
[  1414.825] (WW) The directory "/usr/share/fonts/X11/100dpi" does not exist.
[  1414.825] 	Entry deleted from font path.
[  1414.825] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.
[  1414.825] 	Entry deleted from font path.
[  1414.825] (==) FontPath set to:
	/usr/share/fonts/X11/misc,
	/usr/share/fonts/X11/Type1,
	built-ins
[  1414.825] (==) ModulePath set to "/usr/lib/xorg/modules"
[  1414.825] (II) The server relies on udev to provide the list of input devices.
	If no devices become available, reconfigure udev or disable AutoAddDevices.
[  1414.825] (II) Loader magic: 0x555ae159c020
[  1414.825] (II) Module ABI versions:
[  1414.825] 	X.Org ANSI C Emulation: 0.4
[  1414.825] 	X.Org Video Driver: 24.1
[  1414.826] 	X.Org XInput driver : 24.1
[  1414.826] 	X.Org Server Extension : 10.0
[  1414.827] (II) systemd-logind: took control of session /org/freedesktop/login1/session/c4
[  1414.831] (--) PCI:*(1@0:0:0) 10de:128b:1043:86cb rev 161, Mem @ 0xfb000000/16777216, 0xe0000000/134217728, 0xe8000000/33554432, I/O @ 0x0000f000/128, BIOS @ 0x????????/131072
[  1414.831] (II) LoadModule: "glx"
[  1414.831] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[  1414.832] (II) Module glx: vendor="X.Org Foundation"
[  1414.832] 	compiled for 1.20.13, module version = 1.0.0
[  1414.832] 	ABI class: X.Org Server Extension, version 10.0
[  1414.953] (==) Matched nouveau as autoconfigured driver 0
[  1414.953] (==) Matched modesetting as autoconfigured driver 1
[  1414.953] (==) Matched fbdev as autoconfigured driver 2
[  1414.953] (==) Matched vesa as autoconfigured driver 3
[  1414.953] (==) Assigned the driver to the xf86ConfigLayout
[  1414.953] (II) LoadModule: "nouveau"
[  1414.954] (II) Loading /usr/lib/xorg/modules/drivers/nouveau_drv.so
[  1414.954] (II) Module nouveau: vendor="X.Org Foundation"
[  1414.954] 	compiled for 1.20.3, module version = 1.0.16
[  1414.954] 	Module class: X.Org Video Driver
[  1414.954] 	ABI class: X.Org Video Driver, version 24.0
[  1414.954] (II) LoadModule: "modesetting"
[  1414.954] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[  1414.954] (II) Module modesetting: vendor="X.Org Foundation"
[  1414.954] 	compiled for 1.20.13, module version = 1.20.13
[  1414.954] 	Module class: X.Org Video Driver
[  1414.954] 	ABI class: X.Org Video Driver, version 24.1
[  1414.954] (II) LoadModule: "fbdev"
[  1414.954] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so
[  1414.954] (II) Module fbdev: vendor="X.Org Foundation"
[  1414.954] 	compiled for 1.20.1, module version = 0.5.0
[  1414.954] 	Module class: X.Org Video Driver
[  1414.954] 	ABI class: X.Org Video Driver, version 24.0
[  1414.954] (II) LoadModule: "vesa"
[  1414.954] (II) Loading /usr/lib/xorg/modules/drivers/vesa_drv.so
[  1414.954] (II) Module vesa: vendor="X.Org Foundation"
[  1414.954] 	compiled for 1.20.4, module version = 2.4.0
[  1414.954] 	Module class: X.Org Video Driver
[  1414.954] 	ABI class: X.Org Video Driver, version 24.0
[  1414.954] (II) NOUVEAU driver Date:   Mon Jan 28 23:25:58 2019 -0500
[  1414.954] (II) NOUVEAU driver for NVIDIA chipset families :
[  1414.954] 	RIVA TNT            (NV04)
[  1414.954] 	RIVA TNT2           (NV05)
[  1414.954] 	GeForce 256         (NV10)
[  1414.954] 	GeForce 2           (NV11, NV15)
[  1414.954] 	GeForce 4MX         (NV17, NV18)
[  1414.954] 	GeForce 3           (NV20)
[  1414.954] 	GeForce 4Ti         (NV25, NV28)
[  1414.954] 	GeForce FX          (NV3x)
[  1414.954] 	GeForce 6           (NV4x)
[  1414.954] 	GeForce 7           (G7x)
[  1414.954] 	GeForce 8           (G8x)
[  1414.954] 	GeForce 9           (G9x)
[  1414.954] 	GeForce GTX 2xx/3xx (GT2xx)
[  1414.954] 	GeForce GTX 4xx/5xx (GFxxx)
[  1414.954] 	GeForce GTX 6xx/7xx (GKxxx)
[  1414.954] 	GeForce GTX 9xx     (GMxxx)
[  1414.954] 	GeForce GTX 10xx    (GPxxx)
[  1414.954] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[  1414.954] (II) FBDEV: driver for framebuffer: fbdev
[  1414.954] (II) VESA: driver for VESA chipsets: vesa
[  1414.954] (EE) 
Fatal server error:
[  1414.954] (EE) parse_vt_settings: Cannot open /dev/tty0 (Permission denied)
[  1414.954] (EE) 
[  1414.954] (EE) 
Please consult the The X.Org Foundation support 
	 at http://wiki.x.org
 for help. 
[  1414.954] (EE) Please also check the log file at ".xorgxrdp.11.log" for additional information.
[  1414.954] (EE) 
[  1414.955] (WW) xf86CloseConsole: KDSETMODE failed: Bad file descriptor
[  1414.955] (WW) xf86CloseConsole: VT_GETMODE failed: Bad file descriptor
[  1414.955] (EE) Server terminated with error (1). Closing log file.

How should I do to fix the problem?

Thanks for your support,

@matt335672
Copy link
Member

@phongtnit :-

[  1414.825] (EE) Unable to locate/open config file: "xrdp/xorg.conf"

install the xorgxrdp package.

@rapirent
Copy link
Author

@akarl10 @matt335672 sorry for the late replying
I just tried to add Option "AutoAddGPU" "off" and Option "AccelMethod" "glamor" in /etc/X11/xrdp/xorg.conf and /etc/X11/xorg.conf.d/20-intel.conf, but I still have problem with xorg xrdp connection (black screen) :(

there are my ~/.xorgxrdp.10.log
xorgxrdp.10.log

my xorg.conf
xorg.conf.txt

my /etc/X11/xorg.conf.d/*

20-intel.conf.txt
20-nvidia.conf.txt

anyway, thank you all.. :)

@akarl10
Copy link
Contributor

akarl10 commented Oct 27, 2022

I think you need to add GPUDevice "" to you xrdp/xorg.conf

You should probably revert the changes you have done in the files in xorg.conf.d

I think this xorg.conf file should work for you

Section "ServerLayout"
    Identifier "X11 Server"
    Screen "Screen (xrdpdev)"
    InputDevice "xrdpMouse" "CorePointer"
    InputDevice "xrdpKeyboard" "CoreKeyboard"
EndSection

Section "ServerFlags"
    # This line prevents "ServerLayout" sections in xorg.conf.d files
    # overriding the "X11 Server" layout (xrdp #1784)
    Option "DefaultServerLayout" "X11 Server"
    Option "DontVTSwitch" "on"
    Option "AutoAddDevices" "off"
    Option "AutoAddGPU" "off"
EndSection

Section "Module"
    Load "dbe"
    Load "ddc"
    Load "extmod"
    Load "glx"
    Load "int10"
    Load "record"
    Load "vbe"
    Load "xorgxrdp"
    Load "fb"
EndSection

Section "InputDevice"
    Identifier "xrdpKeyboard"
    Driver "xrdpkeyb"
EndSection

Section "InputDevice"
    Identifier "xrdpMouse"
    Driver "xrdpmouse"
EndSection

Section "Monitor"
    Identifier "Monitor"
    Option "DPMS"
    HorizSync 30-80
    VertRefresh 60-75
    ModeLine "1920x1080" 138.500 1920 1968 2000 2080 1080 1083 1088 1111 +hsync -vsync
    ModeLine "1280x720" 74.25 1280 1720 1760 1980 720 725 730 750 +HSync +VSync
    Modeline "1368x768" 72.25 1368 1416 1448 1528 768 771 781 790 +hsync -vsync
    Modeline "1600x900" 119.00 1600 1696 1864 2128 900 901 904 932 -hsync +vsync
EndSection

Section "Device"
    Identifier "Video Card (xrdpdev)"
    Driver "xrdpdev"
    Option "DRMDevice" "/dev/dri/renderD128"
    Option "DRI3" "1"
EndSection

Section "Screen"
    Identifier "Screen (xrdpdev)"
    Device "Video Card (xrdpdev)"
    GPUDevice ""
    Monitor "Monitor"
    DefaultDepth 24
    SubSection "Display"
        Depth 24
        Modes "640x480" "800x600" "1024x768" "1280x720" "1280x1024" "1600x900" "1920x1080"
    EndSubSection
EndSection

@rapirent
Copy link
Author

@akarl10 thanks!!! it works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants