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

Can't login to xrdp when my installed raspberry kernel is higher than raspberrypi 5.10.103-v7+ #3245

Closed
jk-85 opened this issue Sep 14, 2024 · 13 comments
Labels

Comments

@jk-85
Copy link

jk-85 commented Sep 14, 2024

xrdp version

0.9.21

Detailed xrdp version, build options

Sorry, I don't know if I used the correct terms in my topic (e.g. "kernel"), but this is what I see so far. I have several raspberries, but not higher than Raspberry 3, but I ran into problems every time when I want to use a fresh linux system image with a kernel higher than raspberrypi 5.10.103-v7+ (Linux r2 6.6.31+rpt-rpi-v7 for example did not work, but I also tried to run a system with a lower kernel number if I remembered correctly). It's always a pain in the neck and up to this point I simply cloned my raspberries with version 5.10.103 instead of reinstalling with a newer image just to avoid these xrdp config nightmare. I tried different solutions I found around the internet, but I can't get xrdp to work.

Operating system & version

Ubuntu 22.04

Installation method

dnf / apt / zypper / pkg / etc

Which backend do you use?

No response

What desktop environment do you use?

No response

Environment xrdp running on

No response

What's your client?

No response

Area(s) with issue?

Authentication

Steps to reproduce

Just install a fresh Raspberry Ubuntu OS higher than raspberrypi 5.10.103-v7+

✔️ Expected Behavior

No response

❌ Actual Behavior

No response

Anything else?

No response

@jk-85 jk-85 added the bug label Sep 14, 2024
@jk-85 jk-85 changed the title Can't login to xrdp when my raspberry os is hihgher than raspberrypi 5.10.103-v7+ Can't login to xrdp when my raspberry os is higher than raspberrypi 5.10.103-v7+ Sep 14, 2024
@jk-85 jk-85 changed the title Can't login to xrdp when my raspberry os is higher than raspberrypi 5.10.103-v7+ Can't login to xrdp when my installed raspberry kernel is higher than raspberrypi 5.10.103-v7+ Sep 14, 2024
@matt335672
Copy link
Member

@jk-85 - can you tell us exactly what is happening?

"ran into problems" is not giving us enough to go on.

@jk-85
Copy link
Author

jk-85 commented Sep 15, 2024

Will give more info when I have enough time for it.

@jk-85
Copy link
Author

jk-85 commented Sep 15, 2024

Late yesterday evening I did a workaround: I commented out the [Xorg] section in xrdp.ini and installed vnc instead and don't have to select Xvnc in the combo-box every time in the xrdp login-screen:

[Xorg]
name=Xorg
lib=libxup.so
username=ask
password=ask
ip=127.0.0.1
port=-1
code=20

@matt335672
Copy link
Member

Thanks. That rules out a lot of probable causes.

Have a look also at this comment. The Glamor drivers in the kernel seem to be a bit buggy on the PI.

@jk-85
Copy link
Author

jk-85 commented Sep 16, 2024

Thank, will visit your link soon!

I found more time now, re-enabled the Xorg-section again and the logs show this:
/var/log/xrdp.log shows these new lines after typed in username and password into the xrdp login screen, but nothing happens, screen appears light blue (cursor is black and I have to close it):

/var/log/xrdp.log:
[20240916-15:29:16] [INFO ] xrdp_wm_log_msg: sesman connect ok
[20240916-15:29:16] [INFO ] sesman connect ok
[20240916-15:29:16] [INFO ] sending login info to session manager. Please wait...
[20240916-15:29:16] [INFO ] xrdp_wm_log_msg: login successful for user hubert on display 10
[20240916-15:29:16] [INFO ] login successful for user hubert on display 10
[20240916-15:29:16] [INFO ] loaded module 'libxup.so' ok, interface size 9456, version 4
[20240916-15:29:16] [INFO ] started connecting
[20240916-15:29:16] [INFO ] lib_mod_connect: connecting via UNIX socket

/var/log/xrdp-sesman.log:
[20240916-15:32:05] [INFO ] Socket 12: AF_INET6 connection received from ::1 port 46220
[20240916-15:32:05] [INFO ] Terminal Server Users group is disabled, allowing authentication
[20240916-15:32:05] [INFO ] ++ created session (access granted): username hubert, ip ::ffff:192.168.1.61:12367 - socket: 12
[20240916-15:32:05] [INFO ] starting Xorg session...
[20240916-15:32:05] [INFO ] Starting session: session_pid 1515, display :10.0, width 1680, height 1050, bpp 24, client ip ::ffff:192.168.1.61:12367 - socket: 12, user name hubert
[20240916-15:32:05] [INFO ] [session start] (display 10): calling auth_start_session from pid 1515
[20240916-15:32:05] [ERROR] sesman_data_in: scp_process_msg failed
[20240916-15:32:05] [ERROR] sesman_main_loop: trans_check_wait_objs failed, removing trans
[20240916-15:32:05] [INFO ] Starting X server on display 10: /usr/lib/xorg/Xorg :10 -auth .Xauthority -config xrdp/xorg.conf -noreset -nolisten tcp -logfile .xorgxrdp.%s.log
[20240916-15:32:15] [WARN ] Timed out waiting for X server on display 10 to startup
[20240916-15:32:15] [WARN ] Timed out waiting for X server on display 10 to startup
[20240916-15:32:19] [INFO ] Session started successfully for user hubert on display 10
[20240916-15:32:19] [INFO ] Starting the xrdp channel server for display 10
[20240916-15:32:19] [ERROR] There is no X server active on display 10
[20240916-15:32:19] [INFO ] Session in progress on display 10, waiting until the window manager (pid 1516) exits to end the session
[20240916-15:32:19] [ERROR] A fatal error has occurred attempting to start the window manager on display 10, aborting connection
[20240916-15:32:19] [WARN ] Window manager (pid 1516, display 10) exited quickly (0 secs). This could indicate a window manager config problem
[20240916-15:32:19] [INFO ] Calling auth_stop_session and auth_end from pid 1515
[20240916-15:32:19] [INFO ] Terminating X server (pid 1517) on display 10
[20240916-15:32:19] [INFO ] Terminating the xrdp channel server (pid 1521) on display 10
[20240916-15:32:19] [INFO ] X server on display 10 (pid 1517) returned exit code 1 and signal number 0
[20240916-15:32:19] [INFO ] xrdp channel server for display 10 (pid 1521) exit code 0 and signal number 0
[20240916-15:32:19] [INFO ] cleanup_sockets:
[20240916-15:32:19] [INFO ] Process 1515 has exited
[20240916-15:32:19] [INFO ] ++ terminated session:  username hubert, display :10.0, session_pid 1515, ip ::ffff:192.168.1.61:12367 - socket: 12

@matt335672
Copy link
Member

That's consistent with earlier reports linked above.

What's in ~hubert/.xorgxrdp.10.log?

@jk-85
Copy link
Author

jk-85 commented Sep 16, 2024

Oops, don't know if it was a good idea to first clear the logfile xorgxrdp.10.log. I set back the "Option DRMDevice" to "/dev/dri/renderD128" in the file /etc/X11/xrdp/xorg.conf, then restarted xrdp via "sudo systemctl restart xrdp", then tried again to connect and the log shows this:

.xorgxrdp.10.log:
[  9991.248] (EE)
[  9991.248] (EE)
Please consult the The X.Org Foundation support
         at http://wiki.x.org
 for help.
[  9991.248] (EE) Please also check the log file at ".xorgxrdp.10.log" for additional information.
[  9991.248] (EE)
[  9991.248] (WW) xf86CloseConsole: KDSETMODE failed: Bad file descriptor
[  9991.248] (WW) xf86CloseConsole: VT_GETMODE failed: Bad file descriptor
[  9991.253] (EE) Server terminated with error (1). Closing log file.

@matt335672
Copy link
Member

Suggest you log out from xrdp, completely delete the file and try again!

@jk-85
Copy link
Author

jk-85 commented Sep 16, 2024

Don't know if it helps, I just found an ".xordxrdp.10.log.old" backup-log file:

[ 10643.374]
X.Org X Server 1.21.1.7
X Protocol Version 11, Revision 0
[ 10643.374] Current Operating System: Linux r2 6.6.31+rpt-rpi-v7 #1 SMP Raspbian 1:6.6.31-1+rpt1 (2024-05-29) armv7l
[ 10643.374] Kernel command line: coherent_pool=1M snd_bcm2835.enable_headphones=0 snd_bcm2835.enable_headphones=1 snd_bcm2835.enable_hdmi=1 snd_bcm2835.enable_hdmi=0  vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  console=ttyAMA0,115200 console=tty1 root=PARTUUID=9f1cd52a-02 rootfstype=ext4 fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles
[ 10643.374] xorg-server 2:21.1.7-3+rpt2+deb12u7 (https://www.debian.org/support)
[ 10643.374] Current version of pixman: 0.42.2
[ 10643.374]    Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
[ 10643.374] Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 10643.375] (++) Log file: ".xorgxrdp.10.log", Time: Mon Sep 16 16:13:13 2024
[ 10643.375] (++) Using config file: "/etc/X11/xrdp/xorg.conf"
[ 10643.375] (==) Using config directory: "/etc/X11/xorg.conf.d"
[ 10643.375] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[ 10643.377] (**) Option "defaultserverlayout" "X11 Server"
[ 10643.377] (**) ServerLayout "X11 Server"
[ 10643.377] (**) |-->Screen "Screen (xrdpdev)" (0)
[ 10643.377] (**) |   |-->Monitor "Monitor"
[ 10643.378] (**) |   |-->Device "Video Card (xrdpdev)"
[ 10643.378] (**) |   |-->GPUDevice "kms"
[ 10643.378] (**) |-->Input Device "xrdpMouse"
[ 10643.378] (**) |-->Input Device "xrdpKeyboard"
[ 10643.378] (**) Option "DontVTSwitch" "on"
[ 10643.378] (**) Option "AutoAddDevices" "off"
[ 10643.378] (**) Not automatically adding devices
[ 10643.378] (==) Automatically enabling devices
[ 10643.378] (==) Automatically adding GPU devices
[ 10643.378] (==) Automatically binding GPU devices
[ 10643.378] (==) Max clients allowed: 256, resource mask: 0x1fffff
[ 10643.378] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[ 10643.378]    Entry deleted from font path.
[ 10643.379] (==) FontPath set to:
        /usr/share/fonts/X11/misc,
        /usr/share/fonts/X11/100dpi/:unscaled,
        /usr/share/fonts/X11/75dpi/:unscaled,
        /usr/share/fonts/X11/Type1,
        /usr/share/fonts/X11/100dpi,
        /usr/share/fonts/X11/75dpi,
        built-ins
[ 10643.379] (==) ModulePath set to "/usr/lib/xorg/modules"
[ 10643.379] (II) Loader magic: 0x20a080
[ 10643.379] (II) Module ABI versions:
[ 10643.379]    X.Org ANSI C Emulation: 0.4
[ 10643.379]    X.Org Video Driver: 25.2
[ 10643.379]    X.Org XInput driver : 24.4
[ 10643.379]    X.Org Server Extension : 10.0
[ 10643.400] (II) systemd-logind: took control of session /org/freedesktop/login1/session/c12
[ 10643.405] (II) xfree86: Adding drm device (/dev/dri/card0)
[ 10643.405] (II) Platform probe for /sys/devices/platform/soc/soc:gpu/drm/card0
[ 10643.408] (EE) systemd-logind: failed to take device /dev/dri/card0: Operation not permitted
[ 10643.419] (**) OutputClass "vc4" setting /dev/dri/card0 as PrimaryGPU
[ 10643.419] (II) "glx" will be loaded. This was enabled by default and also specified in the config file.
[ 10643.419] (II) LoadModule: "dbe"
[ 10643.419] (II) Module "dbe" already built-in
[ 10643.419] (II) LoadModule: "ddc"
[ 10643.419] (II) Module "ddc" already built-in
[ 10643.420] (II) LoadModule: "extmod"
[ 10643.420] (II) Module "extmod" already built-in
[ 10643.420] (II) LoadModule: "glx"
[ 10643.420] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[ 10643.426] (II) Module glx: vendor="X.Org Foundation"
[ 10643.426]    compiled for 1.21.1.7, module version = 1.0.0
[ 10643.427]    ABI class: X.Org Server Extension, version 10.0
[ 10643.427] (II) LoadModule: "int10"
[ 10643.427] (II) Loading /usr/lib/xorg/modules/libint10.so
[ 10643.428] (II) Module int10: vendor="X.Org Foundation"
[ 10643.428]    compiled for 1.21.1.7, module version = 1.0.0
[ 10643.428]    ABI class: X.Org Video Driver, version 25.2
[ 10643.428] (II) LoadModule: "record"
[ 10643.428] (II) Module "record" already built-in
[ 10643.428] (II) LoadModule: "vbe"
[ 10643.429] (II) Loading /usr/lib/xorg/modules/libint10.so
[ 10643.429] (II) Module int10: vendor="X.Org Foundation"
[ 10643.429]    compiled for 1.21.1.7, module version = 1.0.0
[ 10643.429]    ABI class: X.Org Video Driver, version 25.2
[ 10643.429] (II) LoadModule: "glamoregl"
[ 10643.430] (II) Loading /usr/lib/xorg/modules/libglamoregl.so
[ 10643.459] (II) Module glamoregl: vendor="X.Org Foundation"
[ 10643.459]    compiled for 1.21.1.7, module version = 1.0.1
[ 10643.460]    ABI class: X.Org ANSI C Emulation, version 0.4
[ 10643.460] (II) LoadModule: "xorgxrdp"
[ 10643.460] (II) Loading /usr/lib/xorg/modules/libxorgxrdp.so
[ 10643.463] (II) Module XORGXRDP: vendor="X.Org Foundation"
[ 10643.463]    compiled for 1.21.1.4, module version = 0.9.19
[ 10643.463]    ABI class: X.Org Video Driver, version 25.2
[ 10643.463] xorgxrdpSetup:
[ 10643.463] (II) LoadModule: "fb"
[ 10643.463] (II) Module "fb" already built-in
[ 10643.463] (II) LoadModule: "xrdpdev"
[ 10643.463] (II) Loading /usr/lib/xorg/modules/drivers/xrdpdev_drv.so
[ 10643.464] (II) Module XRDPDEV: vendor="X.Org Foundation"
[ 10643.464]    compiled for 1.21.1.4, module version = 0.9.19
[ 10643.465]    ABI class: X.Org Video Driver, version 25.2
[ 10643.465] xrdpdevSetup:
[ 10643.465] (II) LoadModule: "modesetting"
[ 10643.465] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[ 10643.466] (II) Module modesetting: vendor="X.Org Foundation"
[ 10643.466]    compiled for 1.21.1.7, module version = 1.21.1
[ 10643.466]    Module class: X.Org Video Driver
[ 10643.466]    ABI class: X.Org Video Driver, version 25.2
[ 10643.466] (II) LoadModule: "xrdpmouse"
[ 10643.467] (II) Loading /usr/lib/xorg/modules/input/xrdpmouse_drv.so
[ 10643.467] (II) Module XRDPMOUSE: vendor="X.Org Foundation"
[ 10643.467]    compiled for 1.21.1.4, module version = 0.9.19
[ 10643.467]    Module class: X.Org XInput Driver
[ 10643.467]    ABI class: X.Org XInput driver, version 24.4
[ 10643.467] rdpmousePlug:
[ 10643.467] (II) LoadModule: "xrdpkeyb"
[ 10643.468] (II) Loading /usr/lib/xorg/modules/input/xrdpkeyb_drv.so
[ 10643.468] (II) Module XRDPKEYB: vendor="X.Org Foundation"
[ 10643.469]    compiled for 1.21.1.4, module version = 0.9.19
[ 10643.469]    Module class: X.Org XInput Driver
[ 10643.469]    ABI class: X.Org XInput driver, version 24.4
[ 10643.469] rdpkeybPlug:
[ 10643.469] rdpIdentify:
[ 10643.469] (II) XRDPDEV: driver for xrdp: XRDPDEV
[ 10643.469] rdpDriverFunc: op 10
[ 10643.469] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[ 10643.469] (EE)
Fatal server error:
[ 10643.469] (EE) parse_vt_settings: Cannot open /dev/tty0 (Permission denied)
[ 10643.469] (EE)
[ 10643.469] (EE)
Please consult the The X.Org Foundation support
         at http://wiki.x.org
 for help.
[ 10643.469] (EE) Please also check the log file at ".xorgxrdp.10.log" for additional information.
[ 10643.469] (EE)
[ 10643.470] (WW) xf86CloseConsole: KDSETMODE failed: Bad file descriptor
[ 10643.470] (WW) xf86CloseConsole: VT_GETMODE failed: Bad file descriptor
[ 10643.475] (EE) Server terminated with error (1). Closing log file.

@matt335672
Copy link
Member

That log file is consistent with this patch being needed (which you can apply yourself):-

neutrinolabs/xorgxrdp#241

See also #3201

@jk-85
Copy link
Author

jk-85 commented Sep 16, 2024

Yeah, this really works with the pi 2 !!! Thanks a lot for the great responses and the support!

@hitjethva
Copy link

It seems that XRDP has compatibility issues with Raspberry Pi kernels newer than 5.10.103-v7+. This is likely due to changes in the newer kernel that XRDP hasn't fully adapted to yet.

A temporary solution is to either downgrade to the compatible kernel or try using ThinLinc, a remote desktop tool that works seamlessly on Raspberry Pi and doesn't face the same kernel version issues. ThinLinc provides a smoother remote access experience and might be a more stable alternative for your setup.

@jk-85
Copy link
Author

jk-85 commented Sep 20, 2024

We have a fix now.

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

No branches or pull requests

3 participants