FreeRDP / FreeRDP

FreeRDP is a free remote desktop protocol library and clients
http://www.freerdp.com/
Apache License 2.0
10.99k stars 14.84k forks source link

AVC444 anouncement error? #7915

Closed krokodyl1220 closed 2 years ago

krokodyl1220 commented 2 years ago

Hi,

I am trying to setup RDP connection to my Windows 10 VM to use AVC444, together with hardware encoding acceleration and currently have zero success, either with Remmina or bare freerdp. However I tried, I could not get AVC compression to work, even running on CPU.

I am testing the results of the connection using Windows' Event Viewer, and I am looking at the output of the event 162 or 163. Here are the results I got based on the different configuration options from Remmina color depth dialog or different freerdp options - the logs are from Applications and Services Logs -> Microsoft -> Windows -> RemoteDesktopServices-RdpCoreTS -> Operational:

app option event ID event text
remmina True color (32 bpp) 163 The client supports RDP 7.1 or lower protocol. Server: DESKTOP-XXXXXXX
remmina RemoteFX (32 bpp) 163 The client supports RDP 7.1 or lower protocol. Server: DESKTOP-XXXXXXX
remmina GFX RFX (32 bpp) 162 The client supports version 0xA0600 of the RDP graphics protocol, client mode: 0, AVC available: 0, Initial profile: 2. Server: DESKTOP-XXXXXXX
remmina GFX AVC420 (32 bpp) 162 The client supports version 0x80105 of the RDP graphics protocol, client mode: 3, AVC available: 0, Initial profile: 128. Server: DESKTOP-XXXXXXX
remmina GFX AVC444 (32 bpp) 162 The client supports version 0xA0600 of the RDP graphics protocol, client mode: 2, AVC available: 0, Initial profile: 2. Server: DESKTOP-XXXXXXX
freerdp without args 162 The client supports version 0xA0600 of the RDP graphics protocol, client mode: 2, AVC available: 0, Initial profile: 2. Server: DESKTOP-XXXXXXX
freerdp gfx:avc420 162 The client supports version 0x80105 of the RDP graphics protocol, client mode: 3, AVC available: 0, Initial profile: 128. Server: DESKTOP-XXXXXXX
freerdp gfx:avc444 162 The client supports version 0xA0600 of the RDP graphics protocol, client mode: 2, AVC available: 0, Initial profile: 2. Server: DESKTOP-XXXXXXX

So from what I can see is that the supported version detected by Windows is:

So it seems like for AVC 444 RDP falls back to RFX, and even though for AVC 420 the supported version advertised by the client is higher it still shows that AVC is not available.

Is this an error on freerdp side?

Application details

Environment (please complete the following information):

akallabeth commented 2 years ago

@krokodyl1220 There was indeed an old define for the most recent GFX version A0600 instead of A0601 but I can still connect and have AVC444 from a 21H2 windows 10.

FYI:

krokodyl1220 commented 2 years ago

Thank you for the clarification regarding AVC420.

Regarding the configuration on Windows side, I already tried different configurations, what I tried first were all modifications from this reddit thread, but no success. I also tried disabling the Use hardware graphics adapters to see if this is an issue with Nvidia drivers, but no change. FYI, this is a screen from my Group Policy:

image

And RemoteFX settings:

image

akallabeth commented 2 years ago

@krokodyl1220 ok, sorry, don´t know the exact conditions when windows enables and when disables the AVC444 mode (I did test against a real hardware installation, maybe something with VMs is different?) As for FreeRDP with 2.7.0 it contains Backported #6786: Use /network:auto by default which means if you don´t add any /rfx, /gfx, /bpp or /network options it will announce everything we´ve got (so you end up with graphics of the latest GFX mode supported by the client and server) For previous versions you had to use /network:auto to get that.

akallabeth commented 2 years ago

@krokodyl1220 one small advice maybe: Reset all RDP policies to default and start with only the 2 settings containing AVC, maybe some RFX related options override something

krokodyl1220 commented 2 years ago

Right, I will try that and let you know. According to ncomputing, it is enough to select Prioritize h264... and that should work. We will see.

akallabeth commented 2 years ago

ok, good luck. closing this as it is more support than issue.

krokodyl1220 commented 2 years ago

Right, thank you for your help.

krokodyl1220 commented 2 years ago

Just a quick info: I compiled the FreeRDP from master branch, after running ./xfreerdp /v:192.0.2.24 /u:ap /workarea /gfx:avc444 I get The client supports version 0xA0502 of the RDP graphics protocol, client mode: 2, AVC available: 0, Initial profile: 2. Server:

So it seems that this define is fixed (just for sanity - should it be detected as 0xA0502?), but from my side the FreeRDP client seems to not advertise the AVC codec available. I also tried with +gfx-thin-client, but I got the same effect. Am I missing something? I compiled the FreeRDP using default flags (cmake ../ & make)

akallabeth commented 2 years ago

@krokodyl1220 there are different GFX versions, your example detects as RDPGFX_CAPVERSION_105. Details here: https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-rdpegfx/da5c75f9-cd99-450c-98c4-014a496942b0

but it is strange that it identifies as older version, before you had RDPGFX_CAPVERSION_106 and now also RDPGFX_CAPVERSION_107 should be available.

As for building, depends if you compiled against ffmpeg or not ;)

krokodyl1220 commented 2 years ago

Thank you very much for the link, I will read into the materials after work.

but it is strange that it identifies as older version, before you had RDPGFX_CAPVERSION_106 and now also RDPGFX_CAPVERSION_107 should be available.

Maybe that is the root of the problem, can I do anything to see if this is a problem with my setup or there is an issue with the code? I will later try setting up connections from Windows to Windows, also I will try FreeRDP from Fedora to check if perhaps it is an Arch issue. Anything else you would like me to try?

As for building, this is my result:

Result of buildconfig ./xfreerdp /buildconfig This is FreeRDP version 3.0.0-dev (3.0.0) Build configuration: BUILD_TESTING=OFF HAVE_AIO_H=1 HAVE_EXECINFO_H=1 HAVE_FCNTL_H=1 HAVE_GETLOGIN_R=1 HAVE_GETPWUID_R=1 HAVE_INTTYPES_H=1 HAVE_JOURNALD_H=TRUE HAVE_PIXMAN_REGION=OFF HAVE_POLL_H=1 HAVE_PTHREAD_MUTEX_TIMEDLOCK_LIB=1 HAVE_PTHREAD_MUTEX_TIMEDLOCK_LIBS= HAVE_PTHREAD_MUTEX_TIMEDLOCK_SYMBOL=1 HAVE_STDBOOL_H=1 HAVE_STDINT_H=1 HAVE_STRNDUP=1 HAVE_SYSLOG_H=1 HAVE_SYS_EVENTFD_H=1 HAVE_SYS_FILIO_H= HAVE_SYS_SELECT_H=1 HAVE_SYS_SOCKIO_H= HAVE_SYS_TIMERFD_H=1 HAVE_TM_GMTOFF=1 HAVE_UNISTD_H=1 HAVE_UNWIND_H=1 HAVE_XI_TOUCH_CLASS=1 WITH_ADD_PLUGIN_TO_RPATH=OFF WITH_ALSA=ON WITH_CAIRO=ON WITH_CCACHE=ON WITH_CHANNELS=ON WITH_CLANG_FORMAT=ON WITH_CLIENT=ON WITH_CLIENT_AVAILABLE=1 WITH_CLIENT_CHANNELS=ON WITH_CLIENT_CHANNELS_AVAILABLE=1 WITH_CLIENT_COMMON=ON WITH_CLIENT_INTERFACE=OFF WITH_CUPS=ON WITH_DEBUG_ALL=OFF WITH_DEBUG_CAPABILITIES=OFF WITH_DEBUG_CERTIFICATE=OFF WITH_DEBUG_CHANNELS=OFF WITH_DEBUG_CLIPRDR=OFF WITH_DEBUG_DVC=OFF WITH_DEBUG_EVENTS=OFF WITH_DEBUG_KBD=OFF WITH_DEBUG_LICENSE=OFF WITH_DEBUG_MUTEX=OFF WITH_DEBUG_NEGO=OFF WITH_DEBUG_NLA=OFF WITH_DEBUG_NTLM=OFF WITH_DEBUG_RAIL=OFF WITH_DEBUG_RDP=OFF WITH_DEBUG_RDPDR=OFF WITH_DEBUG_RDPEI=OFF WITH_DEBUG_RDPGFX=OFF WITH_DEBUG_REDIR=OFF WITH_DEBUG_RFX=OFF WITH_DEBUG_RINGBUFFER=OFF WITH_DEBUG_SCARD=OFF WITH_DEBUG_SND=OFF WITH_DEBUG_SVC=OFF WITH_DEBUG_SYMBOLS=OFF WITH_DEBUG_THREADS=OFF WITH_DEBUG_TIMEZONE=OFF WITH_DEBUG_TRANSPORT=OFF WITH_DEBUG_TSG=OFF WITH_DEBUG_TSMF=OFF WITH_DEBUG_TSMF_AVAILABLE=0 WITH_DEBUG_URBDRC=OFF WITH_DEBUG_WND=OFF WITH_DEBUG_X11=OFF WITH_DEBUG_X11_CLIPRDR=OFF WITH_DEBUG_X11_LOCAL_MOVESIZE=OFF WITH_DEBUG_XV=OFF WITH_DSP_EXPERIMENTAL=OFF WITH_DSP_FFMPEG=ON WITH_EVENTFD_READ_WRITE=1 WITH_FAAC=OFF WITH_FAAD2=OFF WITH_FFMPEG=TRUE WITH_FFMPEG=TRUE WITH_FREERDP_DEPRECATED=OFF WITH_FUSE=ON WITH_GFX_H264=ON WITH_GFX_H264=ON WITH_GPROF=OFF WITH_GSM=OFF WITH_GSSAPI=OFF WITH_ICU=OFF WITH_IPP=OFF WITH_JPEG=OFF WITH_LAME=OFF WITH_LIBRARY_VERSIONING=ON WITH_LIBSYSTEMD=ON WITH_MACAUDIO=OFF WITH_MACAUDIO_AVAILABLE=0 WITH_MANPAGES=ON WITH_MBEDTLS=OFF WITH_NATIVE_SSPI=OFF WITH_OPENCL=OFF WITH_OPENH264=OFF WITH_OPENSLES=OFF WITH_OPENSSL=ON WITH_OSS=ON WITH_PCSC=ON WITH_PKCS11=OFF WITH_POLL=ON WITH_PROFILER=OFF WITH_PULSE=ON WITH_SAMPLE=OFF WITH_SANITIZE_ADDRESS=OFF WITH_SANITIZE_ADDRESS_AVAILABLE=1 WITH_SANITIZE_MEMORY=OFF WITH_SANITIZE_MEMORY_AVAILABLE=1 WITH_SANITIZE_THREAD=OFF WITH_SANITIZE_THREAD_AVAILABLE=1 WITH_SERVER=OFF WITH_SERVER_INTERFACE=ON WITH_SMARTCARD_EMULATE=OFF WITH_SMARTCARD_INSPECT=OFF WITH_SMARTCARD_PCSC=ON WITH_SOXR=OFF WITH_SSE2=ON WITH_SWSCALE=OFF WITH_SW_SCALE=ON WITH_THIRD_PARTY=OFF WITH_VAAPI=OFF WITH_VALGRIND_MEMCHECK=OFF WITH_VALGRIND_MEMCHECK_AVAILABLE=1 WITH_VERBOSE_WINPR_ASSERT=ON WITH_WAYLAND=ON WITH_WINPR_DEPRECATED=OFF WITH_WINPR_TOOLS=ON WITH_X11=ON WITH_XCURSOR=ON WITH_XEXT=ON WITH_XFIXES=ON WITH_XI=ON WITH_XINERAMA=ON WITH_XKBFILE=ON WITH_XRANDR=ON WITH_XRENDER=ON WITH_XSHM=ON WITH_XV=ON WITH_ZLIB=ON Build type: Release CFLAGS: -fPIC -Wall -fvisibility=hidden -Wimplicit-function-declaration -Wredundant-decls -fno-omit-frame-pointer Compiler: GNU, 12.1.0 Target architecture: x64
akallabeth commented 2 years ago

@krokodyl1220 ok, that problem is a different one (and not the issue you face), you still have a server side configuration issue.

krokodyl1220 commented 2 years ago

@akallabeth I'm replying to let you know that I got it to work.

First, I set up fresh win10 21H1 VMs and verified that I properly got 2048 mode when connecting from Windows to Windows. Next, I connected from my system's freerdp xfreerdp /v:<IP>, also got 2048.

So now I switched to my VM that I was testing before. Got 2048, enabled Configure hardware acceleration - got 2048 and GPU encoding is visible in Task Manager. :man_facepalming:

I honestly have no clue what changed, apart from me installing Arch update after work. Perhaps this was the solution, but I still have FreeRDP version 2.7.0.

For anybody who stumbles upon this note:

if you wish to use a gpu, enable also:

Anyway, thank you very much for your help, this helped me clear up my mind