FreeRDP / FreeRDP

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

xfreerdp-cli does not fall back to software rendering on some VAAPI errors #8373

Open jasom opened 1 year ago

jasom commented 1 year ago

My video card (Radeon 6350, Linux radeon kernel driver) only supports up to 2048x1152 for h264 VAAPI decoding, so when I connect to a 1920x1200 display, the VAAPI frame setup fails

To Reproduce Steps to reproduce the behavior:

  1. With a Radeon 6350, connect to a remote (I used freerdp-shadow-cli on the remonte) with more than 1152 horizontal lines
  2. The initial image renders, but screen never updates (clicking/typing has an effect on the remote computer)
  3. console shows repeated error messages like:
    [h264 @ 0x7fe7c805e1c0] Failed setup for format vaapi_vld: hwaccel initialisation returned error.
    [h264 @ 0x7fe7c805e1c0] decode_slice_header error
    [h264 @ 0x7fe7c805e1c0] Hardware does not support image size 1920x1200 (constraints: width 0-2048 height 0-1152).
  4. Setting LIBVA_DRIVER_NAME to something bogus is a workaround; it causes VAAPI to fail to initialize and xfreerdp falls back on software rendering

Expected behavior xfreerdp-cli should fall back on software rendering

Application details

Environment (please complete the following information):

hardening commented 1 year ago

Some time ago I did some changes that were allowing the window size to be bigger than the actual physical screen and I hit the same bug. We shall definitely test the capabilities of the VAAPI driver before using it...

akallabeth commented 1 year ago

all for adding these checks, so who is willing to do it? (e.g. pull requests welcome) for the time being the feature is still marked experimental so better not use it in production