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

GFX: graphic glitches when a monitor is more than 4096 pixels wide or high #3083

Closed
metalefty opened this issue May 21, 2024 · 11 comments · Fixed by #3154
Closed

GFX: graphic glitches when a monitor is more than 4096 pixels wide or high #3083

metalefty opened this issue May 21, 2024 · 11 comments · Fixed by #3154
Labels

Comments

@metalefty
Copy link
Member

xrdp version

0.10.0-beta.3

Detailed xrdp version, build options

xrdp 0.10.0-beta.3
  A Remote Desktop Protocol Server.
  Copyright (C) 2004-2024 Jay Sorg, Neutrino Labs, and all contributors.
  See https://github.com/neutrinolabs/xrdp for more information.

  Configure options:
      --enable-imlib2
      --enable-jpeg
      --enable-painter
      --enable-pam-config=freebsd
      --enable-pixman
      --enable-rfxcodec
      --enable-strict-locations
      --enable-vsock
      --localstatedir=/var
      --with-pkgconfigdir=/usr/local/libdata/pkgconfig
      --disable-devel-debug
      --disable-devel-logging
      --enable-fdkaac
      --disable-fuse
      --enable-ipv6
      --disable-mp3lame
      --enable-opus
      --x-libraries=/usr/local/lib
      --x-includes=/usr/local/include
      --prefix=/usr/local
      --mandir=/usr/local/share/man
      --disable-silent-rules
      --infodir=/usr/local/share/info/
      --build=amd64-portbld-freebsd14.0
      build_alias=amd64-portbld-freebsd14.0
      CC=cc
      CFLAGS=-O2 -pipe  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing
      LDFLAGS= -lssl  -fstack-protector-strong
      LIBS=-L/usr/local/lib
      CPPFLAGS=-isystem /usr/local/include
      CXX=c++
      CXXFLAGS=-O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include
      PKG_CONFIG=pkgconf
      PKG_CONFIG_LIBDIR=/ssd/ports-wrkdir/home/meta/FreeBSD/ports/git/net/xrdp-devel/work/.pkgconfig:/usr/local/libdata/pkgconfig:/usr/local/share/pkgconfig:/usr/libdata/pkgconfig
      OPENSSL_CFLAGS=-I/usr/include
      OPENSSL_LIBS=-L/usr/lib -lcrypto -lssl
      CPP=cpp

  Compiled with OpenSSL 3.0.13 30 Jan 2024

Operating system & version

FreeBSD 14 but actually not OS specific

Installation method

dnf / apt / zypper / pkg / etc

Which backend do you use?

xorgxrdp 0.10.1

What desktop environment do you use?

Xfce but any

Environment xrdp running on

any

What's your client?

Win 11 mstsc.exe

Area(s) with issue?

Graphic glitches

Steps to reproduce

Start an xrdp session at least one monitor has more than 4096 pixels wide or high.
We can start an RDP session larger than the physical monitor if specifying width/height via command line options.

  1. Press Win+R shortcut key
  2. Run mstsc /w:4160 /h:2160 /v:xrdp-server.example.com to specify screen
  3. Login with valid credentials

✔️ Expected Behavior

Works fine as well if the width or height is less than or equal to 4096 pixels.

❌ Actual Behavior

No response

Anything else?

This issue is similar to #2063 but there's no protocol error. #2063 happens if the total screen width is more than 8192. However, this issue happens when one of the monitors has a width of more than 4096.

Screenshot:

image

@metalefty metalefty added the bug label May 21, 2024
@metalefty
Copy link
Member Author

metalefty commented May 21, 2024

@jsorg71 Does librfxcodec encoder support more than 4096 pixels per screen/encoder?

@jsorg71
Copy link
Contributor

jsorg71 commented May 21, 2024

Oh no, the history only had 64x64 64x64 tiles so that is 4096x4096 pixels. I don't think it's a codec limitation, just an implementation limit. We can improve that.

@metalefty
Copy link
Member Author

@jsorg71 Could extend librfxcoec to support screens larger than 4096x4096 pixcels?

@rowlap
Copy link
Contributor

rowlap commented Jun 6, 2024

Is this limit set by the various 64 and 4096 constants in https://github.com/neutrinolabs/librfxcodec/blob/devel/src/rfxencode.h ? We see a fair few matches searching for 4096, so this doesn't look like a trivial patch to a #define.

@jsorg71
Copy link
Contributor

jsorg71 commented Jun 28, 2024

I don't have a 4K monitor to test but I created neutrinolabs/librfxcodec#65 to possibly fix this.

@jsorg71
Copy link
Contributor

jsorg71 commented Jun 28, 2024

I was able to edit an rdp file to get a single monitor > 4K and it seems to work ok.
@metalefty are you able to test?

@rowlap
Copy link
Contributor

rowlap commented Jun 28, 2024

@jsorg71 please see the repro steps above; we can just pass /w and /h to simulate ~any arbitrary screen size.

@jsorg71
Copy link
Contributor

jsorg71 commented Jun 28, 2024

thanks @rowlap I am able to test now. I also went back to devel branch to make sure I can repro the issue(which I should have done first) and I can so I think it's fixed.

@metalefty
Copy link
Member Author

Works fine for me now.

image

@metalefty
Copy link
Member Author

Merged neutrinolabs/librfxcodec#65.

@metalefty
Copy link
Member Author

I will close this after updaitng submodule.

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

Successfully merging a pull request may close this issue.

3 participants