xrdp: XRDP not working with Optimus Manager - permission denied on /dev/tty0

I was able to connect with my Windows 10 pc to my Manjaro XFCE laptop, but after what I think to be a system update on Manjaro, it stopped working. I can reac XRDP login page, select XORG, typing my login, but when I click ok it freezes, and after a while it goes on timeout.

This is the journalctl output of the issue:

ott 07 16:12:00 PCABS xrdp-sesman[36820]: [INFO ] ++ created session (access granted): username pipodi, ip ::ffff:192.168.178.31:63741 - socket: 12
ott 07 16:12:00 PCABS xrdp-sesman[36820]: [INFO ] starting Xorg session...
ott 07 16:12:00 PCABS xrdp-sesman[36820]: [INFO ] Starting session: session_pid 37652, display :10.0, width 1920, height 1080, bpp 24, client ip ::ffff:192.168.178.31:63741 - socket: 12, user name pipodi
ott 07 16:12:00 PCABS xrdp-sesman[37652]: [INFO ] [session start] (display 10): calling auth_start_session from pid 37652
ott 07 16:12:00 PCABS xrdp-sesman[36820]: [ERROR] sesman_data_in: scp_process_msg failed
ott 07 16:12:00 PCABS xrdp[37649]: [INFO ] xrdp_wm_log_msg: login successful for display 10
ott 07 16:12:00 PCABS xrdp[37649]: [INFO ] login successful for display 10
ott 07 16:12:00 PCABS audit[37652]: CRED_ACQ pid=37652 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:setcred grantors=pam_shells,pam_faillock,pam_faillock acct="pipodi" exe="/usr/bin/xrdp-sesman" hostname=? addr=? terminal=:10 res=success'
ott 07 16:12:00 PCABS xrdp-sesman[37652]: pam_unix(xrdp-sesman:session): session opened for user pipodi(uid=1000) by (uid=0)
ott 07 16:12:00 PCABS xrdp-sesman[37652]: pam_systemd(xrdp-sesman:session): Failed to create session: No child processes
ott 07 16:12:00 PCABS xrdp-sesman[37652]: pam_env(xrdp-sesman:session): deprecated reading of user environment enabled
ott 07 16:12:00 PCABS audit[37652]: USER_START pid=37652 uid=0 auid=1000 ses=6 msg='op=PAM:session_open grantors=pam_loginuid,pam_keyinit,pam_limits,pam_unix,pam_permit,pam_mail,pam_env acct="pipodi" exe="/usr/bin/xrdp-sesman" hostname=? addr=? terminal=:10 res=success'
ott 07 16:12:00 PCABS kernel: audit: type=1103 audit(1633615920.356:385): pid=37652 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:setcred grantors=pam_shells,pam_faillock,pam_faillock acct="pipodi" exe="/usr/bin/xrdp-sesman" hostname=? addr=? terminal=:10 res=success'
ott 07 16:12:00 PCABS kernel: audit: type=1006 audit(1633615920.356:386): pid=37652 uid=0 old-auid=4294967295 auid=1000 tty=(none) old-ses=4294967295 ses=6 res=1
ott 07 16:12:00 PCABS kernel: audit: type=1105 audit(1633615920.356:387): pid=37652 uid=0 auid=1000 ses=6 msg='op=PAM:session_open grantors=pam_loginuid,pam_keyinit,pam_limits,pam_unix,pam_permit,pam_mail,pam_env acct="pipodi" exe="/usr/bin/xrdp-sesman" hostname=? addr=? terminal=:10 res=success'
ott 07 16:12:00 PCABS xrdp-sesman[36820]: [ERROR] sesman_main_loop: trans_check_wait_objs failed, removing trans
ott 07 16:12:00 PCABS xrdp[37649]: [INFO ] loaded module 'libxup.so' ok, interface size 10296, version 4
ott 07 16:12:00 PCABS xrdp-sesman[37654]: [INFO ] Starting X server on display 10: /usr/lib/Xorg :10 -auth .Xauthority -config xrdp/xorg.conf -noreset -nolisten tcp -logfile .xorgxrdp.%s.log
ott 07 16:12:00 PCABS xrdp[37649]: [INFO ] started connecting
ott 07 16:12:00 PCABS xrdp[37649]: [INFO ] lib_mod_connect: connecting via UNIX socket
ott 07 16:12:00 PCABS kernel: ------------[ cut here ]------------
ott 07 16:12:00 PCABS kernel: WARNING: CPU: 6 PID: 37654 at /run/media/phil/home/phil/dev/git/manjaro/repositories/gitlab/extra/extramodules/linux510-extramodules/nvidia/src/NVIDIA-Linux-x86_64-470.63.01-no-compat32/kernel/nvidia-drm/nvidia-drm-drv.c:574 nv_drm_master_set+0x22/0x30 [nvidia_drm]
ott 07 16:12:00 PCABS kernel: Modules linked in: ccm rfcomm xt_nat veth xt_CHECKSUM nf_conntrack_netlink nfnetlink xt_MASQUERADE xt_conntrack ipt_REJECT nf_reject_ipv4 xt_addrtype uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 cmac videobuf2_common algif_hash videodev algif_skcipher af_alg bnep mc nvidia_drm(POE) nvidia_modeset(POE) br_netfilter nvidia(POE) xt_tcpudp overlay ip6table_mangle snd_hda_codec_hdmi ip6table_nat ip6table_filter ip6_tables snd_sof_pci snd_sof_intel_byt snd_sof_intel_ipc snd_hda_codec_realtek snd_sof_intel_hda_common snd_sof_xtensa_dsp snd_hda_codec_generic iptable_mangle snd_sof_intel_hda snd_sof iptable_nat nf_nat ledtrig_audio nf_conntrack snd_soc_skl nf_defrag_ipv6 nf_defrag_ipv4 libcrc32c snd_soc_hdac_hda snd_hda_ext_core iptable_filter snd_soc_sst_ipc snd_soc_sst_dsp snd_soc_acpi_intel_match snd_soc_acpi snd_hda_intel snd_intel_dspcfg soundwire_intel soundwire_generic_allocation soundwire_cadence mousedev i915 snd_hda_codec bridge rtw88_8822be iTCO_wdt rtw88_8822b
ott 07 16:12:00 PCABS kernel:  btusb x86_pkg_temp_thermal intel_pmc_bxt ee1004 intel_powerclamp iTCO_vendor_support coretemp btrtl snd_hda_core qrtr stp btbcm btintel snd_hwdep kvm_intel rtw88_pci ns llc i2c_algo_bit mei_hdcp hid_multitouch bluetooth intel_rapl_msr joydev soundwire_bus rtw88_core drm_kms_helper kvm hp_wmi sparse_keymap wmi_bmof ecdh_generic intel_wmi_thunderbolt ecc snd_soc_core cec irqbypass crct10dif_pclmul crc32_pclmul snd_compress ghash_clmulni_intel mac80211 drm ac97_bus snd_pcm_dmaengine aesni_intel r8169 snd_pcm crypto_simd cryptd intel_gtt glue_helper intel_spi_pci snd_timer agpgart intel_spi realtek rapl cfg80211 intel_cstate syscopyarea mdio_devres spi_nor intel_uncore pcspkr sysfillrect i2c_i801 rfkill snd vfat mei_me sysimgblt processor_thermal_device intel_lpss_pci mtd intel_lpss fat i2c_smbus libarc4 intel_rapl_common libphy mei soundcore idma64 fb_sys_fops intel_soc_dts_iosf intel_pch_thermal ucsi_acpi typec_ucsi int3403_thermal typec i2c_hid video int340x_thermal_zone wmi
ott 07 16:12:00 PCABS kernel:  tpm_crb tpm_tis tpm_tis_core tpm rng_core hp_wireless hp_accel acpi_tad int3400_thermal lis3lv02d acpi_pad mac_hid acpi_thermal_rel uinput fuse crypto_user ip_tables x_tables ext4 crc32c_generic crc16 mbcache jbd2 alcor mmc_core crc32c_intel serio_raw alcor_pci xhci_pci
ott 07 16:12:00 PCABS kernel: CPU: 6 PID: 37654 Comm: Xorg Tainted: P        W  OE     5.10.68-1-MANJARO #1
ott 07 16:12:00 PCABS kernel: Hardware name: HP HP Pavilion Gaming Laptop 15-dk0xxx/85FC, BIOS F.33 07/16/2020
ott 07 16:12:00 PCABS kernel: RIP: 0010:nv_drm_master_set+0x22/0x30 [nvidia_drm]
ott 07 16:12:00 PCABS kernel: Code: 70 c3 e8 c1 8e ee d9 90 0f 1f 44 00 00 48 8b 47 48 48 8b 78 20 48 8b 05 9c 5c 00 00 48 8b 40 28 e8 33 4b 28 da 84 c0 74 01 c3 <0f> 0b c3 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 80 3d bc
ott 07 16:12:00 PCABS kernel: RSP: 0018:ffffa54284f23bc0 EFLAGS: 00010246
ott 07 16:12:00 PCABS kernel: RAX: 0000000000000000 RBX: ffff91a40459b000 RCX: 0000000000000008
ott 07 16:12:00 PCABS kernel: RDX: ffffffffc161eed8 RSI: 0000000000000292 RDI: ffffffffc161eea0
ott 07 16:12:00 PCABS kernel: RBP: ffff91a370529000 R08: 0000000000000008 R09: ffffa54284f23ba8
ott 07 16:12:00 PCABS kernel: R10: 0000000000000000 R11: 0000000000000000 R12: ffff91a4045be300
ott 07 16:12:00 PCABS kernel: R13: 0000000000000000 R14: ffff91a40459b010 R15: 0000000059b6b828
ott 07 16:12:00 PCABS kernel: FS:  00007fc092195180(0000) GS:ffff91a6ae380000(0000) knlGS:0000000000000000
ott 07 16:12:00 PCABS kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
ott 07 16:12:00 PCABS kernel: CR2: 000055d1e1ffa068 CR3: 00000001b6f9a001 CR4: 00000000003706e0
ott 07 16:12:00 PCABS kernel: Call Trace:
ott 07 16:12:00 PCABS kernel:  drm_new_set_master+0x93/0x110 [drm]
ott 07 16:12:00 PCABS kernel:  drm_master_open+0x83/0xb0 [drm]
ott 07 16:12:00 PCABS kernel:  drm_open+0xf8/0x250 [drm]
ott 07 16:12:00 PCABS kernel:  drm_stub_open+0xab/0x130 [drm]
ott 07 16:12:00 PCABS kernel:  chrdev_open+0xc3/0x250
ott 07 16:12:00 PCABS kernel:  ? cdev_device_add+0x90/0x90
ott 07 16:12:00 PCABS kernel:  do_dentry_open+0x14e/0x380
ott 07 16:12:00 PCABS kernel:  path_openat+0xb38/0xfa0
ott 07 16:12:00 PCABS kernel:  ? fsnotify+0x4f1/0x560
ott 07 16:12:00 PCABS kernel:  do_filp_open+0x91/0x130
ott 07 16:12:00 PCABS kernel:  ? getname_flags.part.0+0x2c/0x1b0
ott 07 16:12:00 PCABS kernel:  ? __check_object_size+0x136/0x150
ott 07 16:12:00 PCABS kernel:  do_sys_openat2+0x96/0x150
ott 07 16:12:00 PCABS kernel:  __x64_sys_openat+0x53/0x90
ott 07 16:12:00 PCABS kernel:  do_syscall_64+0x33/0x40
ott 07 16:12:00 PCABS kernel:  entry_SYSCALL_64_after_hwframe+0x44/0xa9
ott 07 16:12:00 PCABS kernel: RIP: 0033:0x7fc092c2a5bb
ott 07 16:12:00 PCABS kernel: Code: 25 00 00 41 00 3d 00 00 41 00 74 4b 64 8b 04 25 18 00 00 00 85 c0 75 67 44 89 e2 48 89 ee bf 9c ff ff ff b8 01 01 00 00 0f 05 <48> 3d 00 f0 ff ff 0f 87 91 00 00 00 48 8b 54 24 28 64 48 2b 14 25
ott 07 16:12:00 PCABS kernel: RSP: 002b:00007fff260c3a80 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
ott 07 16:12:00 PCABS kernel: RAX: ffffffffffffffda RBX: 00000000ffffffff RCX: 00007fc092c2a5bb
ott 07 16:12:00 PCABS kernel: RDX: 0000000000080002 RSI: 000055d1e1ff8780 RDI: 00000000ffffff9c
ott 07 16:12:00 PCABS kernel: RBP: 000055d1e1ff8780 R08: 0000000000000031 R09: 0000000000000000
ott 07 16:12:00 PCABS kernel: R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000080002
ott 07 16:12:00 PCABS kernel: R13: 000055d1e1ff8780 R14: 000055d1e1ff8780 R15: 000055d1e1ff7c50
ott 07 16:12:00 PCABS kernel: ---[ end trace 17007ef8c558990d ]---
ott 07 16:12:00 PCABS xrdp-sesman[37653]: [INFO ] Found X server running at /tmp/.X11-unix/X10
ott 07 16:12:00 PCABS xrdp-sesman[37652]: [INFO ] Found X server running at /tmp/.X11-unix/X10
ott 07 16:12:00 PCABS xrdp-sesman[37653]: [INFO ] Found X server running at /tmp/.X11-unix/X10
ott 07 16:12:00 PCABS xrdp-sesman[37652]: [INFO ] Session started successfully for user pipodi on display 10
ott 07 16:12:00 PCABS xrdp-sesman[37656]: [INFO ] Starting the xrdp channel server for display 10
ott 07 16:12:00 PCABS xrdp-sesman[37653]: [INFO ] Starting the default window manager on display 10: /etc/xrdp/startwm.sh
ott 07 16:12:00 PCABS xrdp-sesman[37652]: [INFO ] Session in progress on display 10, waiting until the window manager (pid 37653) exits to end the session
ott 07 16:12:01 PCABS xrdp-sesman[37652]: [WARN ] Window manager (pid 37653, display 10) exited quickly (1 secs). This could indicate a window manager config problem
ott 07 16:12:01 PCABS xrdp-sesman[37652]: [INFO ] Calling auth_stop_session and auth_end from pid 37652
ott 07 16:12:01 PCABS xrdp-sesman[37652]: pam_unix(xrdp-sesman:session): session closed for user pipodi
ott 07 16:12:01 PCABS audit[37652]: USER_END pid=37652 uid=0 auid=1000 ses=6 msg='op=PAM:session_close grantors=pam_loginuid,pam_keyinit,pam_limits,pam_unix,pam_permit,pam_mail,pam_env acct="pipodi" exe="/usr/bin/xrdp-sesman" hostname=? addr=? terminal=:10 res=success'
ott 07 16:12:01 PCABS audit[37652]: CRED_DISP pid=37652 uid=0 auid=1000 ses=6 msg='op=PAM:setcred grantors=pam_shells,pam_faillock,pam_faillock acct="pipodi" exe="/usr/bin/xrdp-sesman" hostname=? addr=? terminal=:10 res=success'
ott 07 16:12:01 PCABS xrdp-sesman[37652]: [INFO ] Terminating X server (pid 37654) on display 10
ott 07 16:12:01 PCABS kernel: audit: type=1106 audit(1633615921.659:388): pid=37652 uid=0 auid=1000 ses=6 msg='op=PAM:session_close grantors=pam_loginuid,pam_keyinit,pam_limits,pam_unix,pam_permit,pam_mail,pam_env acct="pipodi" exe="/usr/bin/xrdp-sesman" hostname=? addr=? terminal=:10 res=success'
ott 07 16:12:01 PCABS kernel: audit: type=1104 audit(1633615921.659:389): pid=37652 uid=0 auid=1000 ses=6 msg='op=PAM:setcred grantors=pam_shells,pam_faillock,pam_faillock acct="pipodi" exe="/usr/bin/xrdp-sesman" hostname=? addr=? terminal=:10 res=success'
ott 07 16:12:01 PCABS xrdp-sesman[37652]: [INFO ] Terminating the xrdp channel server (pid 37656) on display 10
ott 07 16:12:01 PCABS xrdp-sesman[37652]: [INFO ] X server on display 10 (pid 37654) returned exit code 1 and signal number 0
ott 07 16:12:01 PCABS xrdp-sesman[37652]: [INFO ] xrdp channel server for display 10 (pid 37656) exit code 0 and signal number 0
ott 07 16:12:01 PCABS xrdp-sesman[37652]: [INFO ] cleanup_sockets:
ott 07 16:12:01 PCABS xrdp-sesman[36820]: [INFO ] ++ terminated session:  username pipodi, display :10.0, session_pid 37652, ip ::ffff:192.168.178.31:63741 - socket: 12

Both xrdp-git and xorgxrdp-git installed.

Any tip? Thanks!

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 26 (12 by maintainers)

Most upvoted comments

FYI: I’m running xrdp with xorgxrdp on manjaro (should apply to arch users also), over a configuration of Optimus-enabled laptop, and just change the [Xorg] section of /etc/xrdp/sesman.ini from:

param=-config
param=xrdp/xorg.conf

to:

param=-configdir
param=xrdp/

would do the trick, as it prevent any system related X11 configurations in /etc/X11/xorg.conf.d/ from loading, including the modesetting/intel/nvidia display driver set by optimus-manager and/or keyboard/mouse related stuffs which could possibly conflict with xrdp’s xrdpkeyb or xrdpmouse, and your X11 program shall only load display & input drivers from xrdp, fixing issues like Cannot open virtual console, xrdpkeyb segment violation and Cannot run in framebuffer mode. Please specify busIDs which I encountered before.

Side note: 3D rendering & optimus offloading should be fine, at least my current use case didn’t yield any error.