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

Raspbian 10 : Can't click icons at all #1784

Closed
jradxl opened this issue Jan 16, 2021 · 17 comments · Fixed by neutrinolabs/xorgxrdp#181
Closed

Raspbian 10 : Can't click icons at all #1784

jradxl opened this issue Jan 16, 2021 · 17 comments · Fixed by neutrinolabs/xorgxrdp#181

Comments

@jradxl
Copy link

jradxl commented Jan 16, 2021

Description: Raspbian GNU/Linux 10 (buster)

I have a problem with a Raspberry 3B+ similar to
#1701
but all the things mention in 1701 have no effect in solving issue.

Blanking is off
using [Xorg] code=20, has this stuck icons issue
using [Xorg] code=10, results in black screen, yet Xvnc is present

I have compiled xrdp and xorgxrdp from your latest sources without issue,
and the new service files are definitely running the /usr/local versions, with the original /etc/xrdp

Same with KRDC and Remina show same issue.
Whereas using the installed VNC server with Remina works fine.

Can you suggest anything more that I could check to see if I can solve problem
Thanks
John

@jradxl
Copy link
Author

jradxl commented Jan 16, 2021

Update:
I removed the default installed RealVNCServer (which did work in X11 and not virtual mode) and installed TigerVNC.
So that's a different version of Xvnc but that didn't solve the [Xorg] code=10, and neither did a full path in sesman.ini
But commenting out the whole of the [Xorg] section, allows Remmina to connect (using RDP) to the Xvnc server.
This seems to work well

@matt335672
Copy link
Member

John,

The code= line is the way that the XRDP process communicates the required backend to xrdp-sesman. The text in square brackets [] is simply for the user's benefit on the login box. So setting code=20 will result in an Xorg-based session (needs xorgxrdp installed) and setting code=0, or not setting code at all will result in a VNC-based session.

Setting code=10 uses the X11rdp server as a backend. This backend type has been completely replaced with the Xorg type and is supported for compatibility. It is not recommended for new installations.

Have I explained that well enough?

Do you need more help with this, or can I close it?

Thanks.

@jradxl
Copy link
Author

jradxl commented Jan 20, 2021

Thanks for your helpful reply.
I would like to get the xorgxrdp connection to my raspberry pi 3b working.
Recap....
I have remove all the settings for [Xorg] from my xrdp.ini file, and now understand why my Remmina client connects without any issue, because an implied code=0 causes the use of Xvnc access.
But, if I try to use [Xorg]/code=20 the resultant login screen has non-operative Icons - it is completely dead!
It's not the account - I tried making a new one
It's not out of date software, as I compiled your latest sources
Of course, it might not be anything wrong with xorgxrdp, but can you suggest how i could fault find this so I could report to Rasbian if necessary.
Thanks

@matt335672
Copy link
Member

Let's have a go then.

Here are my settings from a 20.04 machine

/etc/xrdp/xrdp.ini

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

/etc/xrdp/sesman.ini

[Xorg]
; Specify the path of non-suid Xorg executable. It might differ depending
; on your distribution and version. Find out the appropreate path for your
; environment. The typical path is known as follows:
;
; Fedora 26 or later    :  param=/usr/libexec/Xorg
; Debian 9 or later     :  param=/usr/lib/xorg/Xorg
; Ubuntu 16.04 or later :  param=/usr/lib/xorg/Xorg
; Arch Linux            :  param=/usr/lib/Xorg
; CentOS 7              :  param=/usr/bin/Xorg or param=Xorg
; CentOS 8              :  param=/usr/libexec/Xorg
;
param=/usr/lib/xorg/Xorg
; Leave the rest paramaters as-is unless you understand what will happen.
param=-config
param=xrdp/xorg.conf
param=-noreset
param=-nolisten
param=tcp
param=-logfile
param=.xorgxrdp.%s.log

Set those up, restart the services and report back.

@matt335672
Copy link
Member

John - do you need more help with this?

Thanks,

@jradxl
Copy link
Author

jradxl commented Jan 28, 2021

Sorry for my delay. Have been trying to try different versions of Ubuntu to see if issue is still present.

(1) Rpi4, running pure Debian, rdp/xorg works fine,
with versions
xorgxrdp/stable,now 1:0.2.9-1 arm64 [installed]
xrdp/stable,stable,now 0.9.9-1+deb10u1 arm64 [installed]

(2) Rpi3b+, running Raspbian, rdp/xorg does not work as per this Issue report, but rdp/xvnc works really well as mentioned above. I've installed that in two Rpi3b+ now, and they both have same issue (of non working desktop icons)
-- apt availability:
xorgxrdp/stable,now 1:0.2.9-1 armhf [installed]
xrdp/stable,now 0.9.9-1+deb10u1 armhf [installed]
-- self compiled
xrdp 0.9.15
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:
--enable-fuse
--with-systemdsystemunitdir=/etc/systemd/system
Compiled with OpenSSL 1.1.1d 10 Sep 2019
./xorgxrdp-0.2.15/module/.libs/libxorgxrdp.so

INI FILES
XRDP.INI, with commented out section to force Xvnc. (obviously uncommented when try Xorg)
Entries as per installation

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

SESMAN.INI
Same, unmodified from installation, same as yours

[Xorg]
; comments removed, Xorg location is correct.
param=/usr/lib/xorg/Xorg
; Leave the rest paramaters as-is unless you understand what will happen.
param=-config
param=xrdp/xorg.conf
param=-noreset
param=-nolisten
param=tcp
param=-logfile
param=.xorgxrdp.%s.log

So Installation is same
Can you suggest what Log files to look in, and what is key to a working system
(i'm going to compare working rpi4 and non-working rpi3 to see if I can spot anything)

Thanks
John

@jradxl
Copy link
Author

jradxl commented Jan 28, 2021

Update:
Nothing is written to any of the logs:
.xorgxrdp.11.log
.xsession-errors
xrdp.log
xrdp-sesman.log
journalctl -f
when clicking on the inactive icons, or using keyboard.
-- the logged in desktop is completely inactive.

@matt335672
Copy link
Member

Thanks John.

Xvnc working is a useful pointer.

It's possible that for some reason the Raspbian installation isn't loading the keyboard and mouse drivers for Xorg. There's a similar PR at #1779.

Can you compare the .xordxrdp.$DISPLAY.log for the working and non-working configs?

On a working config (on Ubuntu), I get these kind of messages:-

[    31.165] (==) ServerLayout "X11 Server"
[    31.165] (**) |-->Screen "Screen (xrdpdev)" (0)
[    31.165] (**) |   |-->Monitor "Monitor"
[    31.166] (**) |   |-->Device "Video Card (xrdpdev)"
[    31.166] (**) |-->Input Device "xrdpMouse"
[    31.166] (**) |-->Input Device "xrdpKeyboard"

and later:-

[    31.245] (II) LoadModule: "xrdpmouse"
[    31.245] (II) Loading /usr/lib/xorg/modules/input/xrdpmouse_drv.so
[    31.250] (II) Module XRDPMOUSE: vendor="X.Org Foundation"
[    31.250]    compiled for 1.20.8, module version = 0.2.14
[    31.250]    Module class: X.Org XInput Driver
[    31.250]    ABI class: X.Org XInput driver, version 24.1
[    31.250] rdpmousePlug:
[    31.250] (II) LoadModule: "xrdpkeyb"
[    31.250] (II) Loading /usr/lib/xorg/modules/input/xrdpkeyb_drv.so
[    31.254] (II) Module XRDPKEYB: vendor="X.Org Foundation"
[    31.254]    compiled for 1.20.8, module version = 0.2.14
[    31.254]    Module class: X.Org XInput Driver
[    31.254]    ABI class: X.Org XInput driver, version 24.1
[    31.254] rdpkeybPlug:

Let us know what you find.

@mhaley
Copy link

mhaley commented Feb 13, 2021

I was having the same issue with no input after signing in (Raspberry Pi for Desktop). Manually specifying the ServerLayout as described on #1779, specifically this comment fixes it. Thank you.

@jradxl
Copy link
Author

jradxl commented Feb 14, 2021

How amazing. Yes that's fixed it! Thank you both!

FIX IS, quoting #1779:-

Add these lines to the [Xorg] stanza in /etc/xrdp/sesman.ini:-
param=-layout
param=X11 Server

Differences shown below from using MELD

BEFORE

[   135.163] (==) ServerLayout "ServerLayout0"
[   135.164] (**) |-->Screen "Screen (xrdpdev)" (0)
[   135.164] (**) |   |-->Monitor "Monitor"
[   135.168] (**) |   |-->Device "Video Card (xrdpdev)"
[   135.168] (**) |   |-->GPUDevice "Video Card (xrdpdev)"
[   135.169] (**) Option "DontVTSwitch" "on"

AFTER

[    41.339] (++) ServerLayout "X11 Server"
[    41.339] (**) |-->Screen "Screen (xrdpdev)" (0)
[    41.340] (**) |   |-->Monitor "Monitor"
[    41.344] (**) |   |-->Device "Video Card (xrdpdev)"
[    41.344] (**) |   |-->GPUDevice "Video Card (xrdpdev)"
[    41.344] (**) |-->Input Device "xrdpMouse"
[    41.344] (**) |-->Input Device "xrdpKeyboard"
[    41.344] (**) Option "DontVTSwitch" "on"

AND...

BEFORE

[   135.264] xrdpdevSetup:
[   135.264] (II) LoadModule: "mouse"
[   135.265] (WW) Warning, couldn't open module mouse
[   135.265] (EE) Failed to load module "mouse" (module does not exist, 0)
[   135.265] (II) LoadModule: "kbd"
[   135.266] (WW) Warning, couldn't open module kbd
[   135.266] (EE) Failed to load module "kbd" (module does not exist, 0)
[   135.266] rdpIdentify:

AFTER

[    41.439] (II) LoadModule: "xrdpmouse"
[    41.439] (II) Loading /usr/lib/xorg/modules/input/xrdpmouse_drv.so
[    41.441] (II) Module XRDPMOUSE: vendor="X.Org Foundation"
[    41.441] 	compiled for 1.20.3, module version = 0.2.9
[    41.441] 	Module class: X.Org XInput Driver
[    41.441] 	ABI class: X.Org XInput driver, version 24.1
[    41.441] rdpmousePlug:
[    41.441] (II) LoadModule: "xrdpkeyb"
[    41.441] (II) Loading /usr/lib/xorg/modules/input/xrdpkeyb_drv.so
[    41.443] (II) Module XRDPKEYB: vendor="X.Org Foundation"
[    41.443] 	compiled for 1.20.3, module version = 0.2.9
[    41.443] 	Module class: X.Org XInput Driver
[    41.443] 	ABI class: X.Org XInput driver, version 24.1
[    41.443] rdpkeybPlug:
[    41.443] rdpIdentify:

What should we do to help others that follow us????

  1. Add section to README here with a Raspberry PI section, commenting that no mouse or keyboard is loaded without these two lines added.
  2. Feed details to Upstream (to Raspberry Pi Org)???
  3. Coding change here to mitigate, if won't unstable for others?

Thanks
John

@matt335672
Copy link
Member

Glad you've both got working systems.

I'd like more information from you (if I may) before suggesting a solution so we can work out what the scope of affected systems might be. The OP in #1779 is using Manjaro for example, so this is possibly larger than just a Raspberry PI issue.

For starters, I'd like to know where the "ServerLayout0" is coming from.

Can one of you tell me what the output of the following command is on a non-working system please?

find /etc/X11 -type f -exec grep ServerLayout {} +

That would be grand - ta.

@jradxl
Copy link
Author

jradxl commented Feb 15, 2021

This is getting intriguing...
So here's the output from Raspian OS on a 3b+
At this point I have Desktop Screen Blanking DISABLED

root@raspos2:~# find /etc/X11 -type f -exec grep ServerLayout {} +
/etc/X11/xorg.conf.d/10-blanking.conf:Section "ServerLayout"
/etc/X11/xorg.conf.d/10-blanking.conf:    Identifier "ServerLayout0"
/etc/X11/xrdp/xorg.conf:Section "ServerLayout"
root@raspos2:~# ls -al /etc/X11/xorg.conf.d/
total 12
drwxr-xr-x  2 root root 4096 Jan 27 22:42 .
drwxr-xr-x 12 root root 4096 Jan 28 01:04 ..
-rw-r--r--  1 root root  247 Jan 27 22:42 10-blanking.conf

root@raspos2:~# cat /etc/X11/xorg.conf.d/10-blanking.conf 
Section "Extensions"
    Option      "DPMS" "Disable"
EndSection
Section "ServerLayout"
    Identifier "ServerLayout0"
    Option "StandbyTime" "0"
    Option "SuspendTime" "0"
    Option "OffTime"     "0"
    Option "BlankTime"   "0"
EndSection

RasbianOS has a "Raspberry PI configuration" utility in the Preferences menu.
This has a option to disable screen blanking and when set to ENABLE, it removes the 10-blanking.conf
I think that's why there is another issue where someone reports a similar issue with blanking on the Raspberry PI.
However there is another way to turn off blanking,
consoleblank=0 in /boot/cmdline.txt, ie kernel boot parameters
but the Raspberry PI documentation informs us that the utility is to be used for GUI blanking.

So we have an explanation, but what is the fix??

@matt335672
Copy link
Member

The other issue is #1701. That's using the Xvnc back-end, and the user is connecting to it directly. The only similarity with this is that screen blanking is involved. I couldn't fully investigate that one, as the RealVNC server is only licensed on a proper PI.

That aside, this one is explained as the ServerLayout in the include is processed first. The only reference I could find to this is on the ArchWiki which contains these lines:-

The /etc/X11/xorg.conf.d/ directory stores host-specific configuration.
. . .
These files are parsed by the X server upon startup and are treated like part of the traditional xorg.conf configuration file. Note
that on conflicting configuration, the file read last will be processed. For that reason the most generic configuration files should
be ordered first by name. The configuration entries in the xorg.conf file are processed at the end.

There seem to be three possibilities here:-

  1. Use the DefaultServerLayout directive in the ServerFlags section which will give the X server a clue which layout to use.
  2. Specify the option explicitly using -layout in /etc/xrdp/sesman.ini.
  3. Specify the option explicitly in code.

I currently preferring 1., as the other two introduce more coupling between the xrdp and xorgxrdp repos.

@jradxl, @mhaley - could you please try the following for me?

  1. Remove these lines ffrom /etc/xrdp/sesman.ini, if you've added them.
    param=-layout
    param=X11 Server
    
  2. Add this line to the ServerFlags section in /etc/X11/xrdp/xorg.conf:-
        Option "DefaultServerLayout" "X11 Server"
    
  3. Enable screen blanking.
  4. See if everything is still OK.

If that works for you, I'll rasie a PR on the xorgxrdp repo to include this in the config file.

Thanks again

@jradxl
Copy link
Author

jradxl commented Feb 16, 2021

Don't know why Raspberry include RealVNC. I guess it's same reason why they add the VSCode repository without telling anyone - commercial reasons. I take it off and add TigerVNC instead.

Your suggestions work fine. My first two stanzas look like this.
But I've not tested the actual screen blanking as I think that's for the HDMI output.

root@raspos1:/etc/X11/xrdp# cat xorg.conf 
Section "ServerLayout"
    Identifier "X11 Server"
    Screen "Screen (xrdpdev)"
    InputDevice "xrdpMouse" "CorePointer"
    InputDevice "xrdpKeyboard" "CoreKeyboard"   
EndSection

Section "ServerFlags"
    Option "DefaultServerLayout" "X11 Server"
    Option "DontVTSwitch" "on"
    Option "AutoAddDevices" "off"
EndSection

So pleased we could find this.
Cheers

@matt335672
Copy link
Member

PR submitted for discussion and inclusion.

Thanks again John.

@MichaIng
Copy link

MichaIng commented Dec 7, 2021

Just a hint for everyone who applied this patch manually and then did or plans to do a distribution upgrade form Debian Buster to Bullseye or similar: Newer xorgxrdp requires to load an additional module for glamor support, if the compile was set at least, which is done on Debian Bullseye. Since changing a configuration file manually leads to APT/dpkg not upgrading it without user confirmation, assure that you do the upgrade an re-apply the input fix patch if not shipped by the new distribution package config yet, e.g.:

mv /etc/X11/xrdp/xorg.conf.dpkg-dist /etc/X11/xrdp/xorg.conf
grep -q 'DefaultServerLayout' /etc/X11/xrdp/xorg.conf || sed -i '/Section "ServerFlags"/a\    Option "DefaultServerLayout" "X11 Server"' /etc/X11/xrdp/xorg.conf
systemctl restart xrdp

@lanche11
Copy link

lanche11 commented Sep 7, 2022

Thanks for this it worked for AstroPi on RPi3+ Raspian10. XRDP had mouse movement on Win8 RDP but no select. An aggressive 2 day search found this fix.Thanks again.
Add these lines to the [Xorg] stanza in /etc/xrdp/sesman.ini:-
param=-layout
param=X11 Server

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

Successfully merging a pull request may close this issue.

5 participants