xrdp icon indicating copy to clipboard operation
xrdp copied to clipboard

Window not repainted if its title changed just before repaint

Open elfmz opened this issue 2 years ago • 10 comments

Server: Ubuntu 22 with xrdp running 0.9.17 Client: Remmina or MSTSC Test code for reproduction can be found here: https://pastecode.io/s/sxjwfya7 - it requires libwxgtk3.0-gtk3-dev to be installed Under local session or X-forwarding over SSH this program behaves in following way: each (any) keypress it repaints its window drawing alternately single line or multiple lines. Also it changes its titlebar string with random suffix just before each repaint. When running under xrdp many repaints are missing and window's content not changed after key press, however if after such missing repaint try to switch focus or hover mouse over test app's window - then it gets correct content. However if comment out titlebar changes then problem stops to reproduce. Also it seems to stop reproduce if titlebar change moved after call to Update() (that actually forces window repaint)

elfmz avatar Sep 11 '22 06:09 elfmz

Are you using the Xorg backend or the Xvnc backend?

If it's the Xorg backend you may be coming across neutrinolabs/xorgxrdp#171. This is fixed by neutrinolabs/xorgxrdp#186. which was released as part of xorgxrdp v0.9.19 recently.

matt335672 avatar Sep 11 '22 10:09 matt335672

yes its Xorg, regarding #171 - i will try to build recent version and check with it

elfmz avatar Sep 11 '22 10:09 elfmz

Unfortunatelly cannot start manually built xrdp on same system i did

sudo apt remove xrdp
git clone --recursive https://github.com/neutrinolabs/xorgxrdp
cd xorgxrdp
./bootstrap && ./configure && make -j5 && sudo make install
cd ..
git clone --recursive https://github.com/neutrinolabs/xrdp
cd xrdp
git checkout v0.9.19
./bootstrap && ./configure && make -j5 && sudo make install
sudo systemctl unmask xrdp-sesman
sudo systemctl unmask xrdp
sudo systemctl enable xrdp-sesman
sudo systemctl enable xrdp
sudo reboot

and after client connect i'm getting login prompt (as before) then just an empty blue screen for a long time then a message below.. anything missing? image

elfmz avatar Sep 11 '22 11:09 elfmz

The X server isn't starting, or is failing most likely.

Check the following:-

  1. Contents of /var/log/xrdp-sesman.log
  2. That Xorg has the correct path specified in /etc/xrdp/xrdp.ini.
  3. Contents of ~/.xorgxrdp.0.log` if it's there.

matt335672 avatar Sep 11 '22 11:09 matt335672

i already found that had to change allowed_users to anybody in /etc/X11/Xwrapper (from here https://wiki.archlinux.org/title/xrdp#Xorg_backend ) - IMHO its better to show this info somewhere in readme.. Now i have xrdp 0.9.19 (as on screenshot below) and problem still reproducible.. image

elfmz avatar Sep 11 '22 11:09 elfmz

The Xwrapper stuff is not really correct. It's better to set a path to the unwrapped Xorg server, as you then don't need to modify the permissions for the console Xorg.

Might be worth checking the correct xorgxrdp version is loaded in ~/.xorgxrdp.10.log. I've got something like the following for an old version:-

[   506.840] (II) LoadModule: "xorgxrdp"
[   506.840] (II) Loading /usr/lib/xorg/modules/libxorgxrdp.so
[   506.883] (II) Module XORGXRDP: vendor="X.Org Foundation"
[   506.883]    compiled for 1.20.9, module version = 0.2.15
[   506.883]    ABI class: X.Org Video Driver, version 24.1

matt335672 avatar Sep 11 '22 11:09 matt335672

i had ~/.xorgxrdp.10.log and ~/.xorgxrdp.11.log and also couple .log.old files near so i removed all that then rebooted and here is whats now in brand new .xorgxrdp.10.log :

/home/user$ grep 'module version' ./.xorgxrdp.*.log
[    34.334]    compiled for 1.21.1.3, module version = 1.0.0
[    34.335]    compiled for 1.21.1.3, module version = 1.0.0
[    34.336]    compiled for 1.21.1.3, module version = 1.0.0
[    34.339]    compiled for 1.21.1.3, module version = 0.9.80
[    34.342]    compiled for 1.21.1.3, module version = 0.9.80
[    34.344]    compiled for 1.21.1.3, module version = 0.9.80
[    34.346]    compiled for 1.21.1.3, module version = 0.9.80

also:

[    34.336] (II) LoadModule: "xorgxrdp"
[    34.337] (II) Loading /usr/lib/xorg/modules/libxorgxrdp.so
[    34.339] (II) Module XORGXRDP: vendor="X.Org Foundation"
[    34.339] 	compiled for 1.21.1.3, module version = 0.9.80
[    34.339] 	ABI class: X.Org Video Driver, version 25.2

elfmz avatar Sep 11 '22 12:09 elfmz

my version looks too high may be its because i've built xorgxrdp from the master branch.. anyway same issue as was reproduced with from Ubuntu's repository xrdp/xorgxrdp

elfmz avatar Sep 11 '22 12:09 elfmz

OK - thanks.

@jsorg71 - can you take a look at this? It's somewhat beyond my knowledge I'm afraid.

matt335672 avatar Sep 11 '22 12:09 matt335672

Just FYI - i've changed param=Xorg to param=/usr/lib/xorg/Xorg in the /etc/xrdp/sesman.ini and then set allowed_users back to console and login works and same versions in .xorgxrdp.10.log and issue is also still there

elfmz avatar Sep 11 '22 12:09 elfmz

closing as it appeared that issue reproduced not only with xrdp, local reproduction also achieved, opened issue for xwayland as its most suspicious now: https://bugs.launchpad.net/ubuntu/+source/xwayland/+bug/2002456

elfmz avatar Jan 15 '23 19:01 elfmz