Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-97150

Failed to commit atomic request (code=-22) on qt5.15.2/qt6.2.1

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P2: Important
    • None
    • 5.15.2, 6.2.0
    • QPA: EGLFS, QPA: KMS
    • None
    • rpi4 or Allwinner h6 or Intel i5 NUC with qt6.2.0, mesa 21.2.3, kernel5.14.7, libdrm2.4.105
    • Linux/Other display system

    Description

      Hi,

      Using EGLFS/KMS and attempting to change video mode results with:

      Qt: Failed to commit atomic request (code=-22)

      I looks it might be similar issue like QTBUG-82104Qt Quick Live preview not working on Toradex Apalis i.MX 8 with Yocto 2.7  

      In my project (MiniMyth2) I have this issue on all platforms i'm supporting: x86_64 Intel DRM/AMD DRM and also on aarch64 Rockchip/Allwinner/Amlogic.

      For exemplary log from app using EGLFS/KMS - when playback starts & wants to change videomode resulting with failed commit - pls see below.

      Searching other Qt issues i understand root cause is somehow explained here in Laszlo comment: https://bugreports.qt.io/browse/QTBUG-82104?focusedCommentId=499162&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-499162

      In my development i'm in contact with Mesa/DRM devs - so - if to resolve this bug - some fixes in Mesa/DRM are required - i'll be more than happy to help!

       

      Runing with drawing to EGLFS
      Using DRM_PRIME in DRM planes mode
      USER=minimyth
      XINITRC=/etc/X11/xinit/xinitrc
      CONSOLE=/dev/console
      XDG_SESSION_TYPE=tty
      HOME=/home/minimyth
      OLDPWD=/
      PAN_MESA_DEBUG=bifrost
      KDE_HOME_READONLY=1
      XSERVERRC=/etc/X11/xinit/xserverrc
      INIT_VERSION=sysvinit-
      LOGNAME=minimyth
      XCOMPOSEFILE=/usr/share/X11/locale/en_US.UTF-8/Compose
      XDG_SESSION_CLASS=user
      TERM=linux
      USE_VDPAU_COLORKEY=1
      QT_QPA_EGLFS_INTEGRATION=eglfs_kms
      MYTHTV_DRM_VIDEO=1
      PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/libexec:/usr/lib/qt6/bin
      RUNLEVEL=5
      XDG_RUNTIME_DIR=/var/run/xdg/minimyth
      PREVLEVEL=N
      DISPLAY=:0.0
      ICEAUTHORITY=/home/minimyth/.ICEauthority
      LANG=en_US.UTF-8
      PERL_BADLANG=0
      SHELL=/bin/ash
      PWD=/
      QT_QPA_PLATFORM=eglfs
      QT_PLUGIN_PATH=/usr/lib/qt6/plugins
      Myth cmd.line:mythfrontend
      2021-10-06 12:08:50.211560 I Exporting \'QT_QPA_EGLFS_KMS_ATOMIC=1\'
      2021-10-06 12:08:50.211586 I Exporting \'QT_QPA_EGLFS_ALWAYS_SET_MODE=1\'
      2021-10-06 12:08:50.222629 I /dev/dri/card0: Authenticated
      2021-10-06 12:08:50.222647 E /dev/dri/card0: Failed to request universal planes
      2021-10-06 12:08:50.229221 I /dev/dri/card0: Closed
      2021-10-06 12:08:50.229270 I /dev/dri/card1: Authenticated
      2021-10-06 12:08:50.259221 I /dev/dri/card1: Found 26 planes; 18 for this CRTC
      2021-10-06 12:08:50.259240 I /dev/dri/card1: Selected Plane #64 Primary for video
      2021-10-06 12:08:50.259289 I /dev/dri/card1: Supported DRM video formats: YU16,YV16,YU12,YV12,NV12,NV21,NV16,NV61
      2021-10-06 12:08:50.259293 I /dev/dri/card1: Selected Plane #74 Overlay for GUI
      2021-10-06 12:08:50.259799 I Wrote /home/minimyth/.mythtv/eglfs_kms_config.json: 
      {
      "device": "/dev/dri/card1",
      "outputs": [ { "name": "HDMI1", "format": "argb8888", "mode": "current" } ]
      }
      
      2021-10-06 12:08:50.259803 I Exporting \'QT_QPA_EGLFS_KMS_CONFIG=/home/minimyth/.mythtv/eglfs_kms_config.json\'
      2021-10-06 12:08:50.259879 I Exporting \'QT_QPA_EGLFS_KMS_PLANE_INDEX=5\'
      2021-10-06 12:08:50.259881 I Exporting \'QT_QPA_EGLFS_KMS_PLANES_FOR_CRTCS=68,74\'
      2021-10-06 12:08:50.271609 I /dev/dri/card1: Closed
      2021-10-06 12:08:51.487433 I Setup Interrupt handler
      2021-10-06 12:08:51.487444 I Setup Terminated handler
      2021-10-06 12:08:51.487453 I Setup Segmentation fault handler
      2021-10-06 12:08:51.487462 I Setup Aborted handler
      2021-10-06 12:08:51.487470 I Setup Bus error handler
      2021-10-06 12:08:51.487480 I Setup Floating point exception handler
      2021-10-06 12:08:51.487488 I Setup Illegal instruction handler
      2021-10-06 12:08:51.487506 I Setup Real-time signal 0 handler
      2021-10-06 12:08:51.487516 I Setup User defined signal 1 handler
      2021-10-06 12:08:51.487524 I Setup User defined signal 2 handler
      2021-10-06 12:08:51.487532 I Setup Hangup handler
      2021-10-06 12:08:51.487804 C mythfrontend version: test [v32-Pre-2902-gb50f8b17c1] www.mythtv.org
      2021-10-06 12:08:51.487811 C Qt version: compile: 6.2.0, runtime: 6.2.0
      2021-10-06 12:08:51.488026 I Linux 5.14.7 (arm64)
      2021-10-06 12:08:51.488030 N Enabled verbose msgs: general
      2021-10-06 12:08:51.488049 N Setting Log Level to LOG_INFO
      2021-10-06 12:08:51.498538 I Added logging to the console
      2021-10-06 12:08:51.501552 N Using runtime prefix = /usr
      2021-10-06 12:08:51.501562 N Using configuration directory = /home/minimyth/.mythtv
      2021-10-06 12:08:51.505460 I Assumed character encoding: en_US.UTF-8
      2021-10-06 12:08:51.517475 I Loading en_us translation for module mythfrontend
      2021-10-06 12:08:51.521058 E DBHostName is not set in config.xml
      2021-10-06 12:08:51.521160 I Empty LocalHostName. This is typical.
      2021-10-06 12:08:51.521166 I Using a profile name of: \'Myth-Frontend-dca632247596\' (Usually the same as this host\'s name.)
      2021-10-06 12:08:51.521265 I Start up testing connections. DB 192.168.1.254, BE , attempt 0, status dbAwake, Delay: 2000
      2021-10-06 12:08:51.878400 N Setting QT default locale to pl_US
      2021-10-06 12:08:51.878416 I Current locale pl_US
      2021-10-06 12:08:51.879175 E No locale defaults file for pl_US, skipping
      2021-10-06 12:08:51.925910 I Listening on TCP 0.0.0.0:6547
      2021-10-06 12:08:51.957169 I Listening on TCP [::]:6547
      2021-10-06 12:08:52.203088 I Loading en_us translation for module mythfrontend
      2021-10-06 12:08:52.936474 I Display: Screen \'HDMI-1\' not found, defaulting to primary screen (HDMI1)
      2021-10-06 12:08:52.940035 I Display: Using screen \'HDMI1\' (Make: SANTAK CORP. Model: S2-TEK TV-)
      2021-10-06 12:08:52.940096 I Display: Qt screen pixel ratio: 1.00
      2021-10-06 12:08:52.940156 I Display: Geometry: 1920x1080+0+0 Size(Qt): 930mmx530mm
      2021-10-06 12:08:52.940414 I /dev/dri/card1 Qt EGLFS/KMS Fd:5 Crtc id:68 Connector id:32 Atomic: 1
      2021-10-06 12:08:52.940491 I /dev/dri/card1: Authenticated
      2021-10-06 12:08:52.972545 I /dev/dri/card1: Found 26 planes; 18 for this CRTC
      2021-10-06 12:08:52.972556 I /dev/dri/card1: Selected Plane #64 Primary for video
      2021-10-06 12:08:52.972584 I /dev/dri/card1: Supported DRM video formats: YU16,YV16,YU12,YV12,NV12,NV21,NV16,NV61
      2021-10-06 12:08:52.972588 I /dev/dri/card1: Selected Plane #74 Overlay for GUI
      2021-10-06 12:08:52.972765 I /dev/dri/card1: DRM device retrieved from Qt
      2021-10-06 12:08:52.972770 I /dev/dri/card1: Multi-plane setup: Requested: 1 Setup: 1
      2021-10-06 12:08:52.972783 I DispDRM: Filtering out modes that aren\'t 1920x1080
      2021-10-06 12:08:52.973924 I /dev/dri/card1 Qt EGLFS/KMS Fd:5 Crtc id:68 Connector id:32 Atomic: 1
      2021-10-06 12:08:52.973995 I /dev/dri/card1: Authenticated
      2021-10-06 12:08:53.005825 I /dev/dri/card1: Found 26 planes; 18 for this CRTC
      2021-10-06 12:08:53.005836 I /dev/dri/card1: Selected Plane #64 Primary for video
      2021-10-06 12:08:53.005863 I /dev/dri/card1: Supported DRM video formats: YU16,YV16,YU12,YV12,NV12,NV21,NV16,NV61
      2021-10-06 12:08:53.005867 I /dev/dri/card1: Selected Plane #74 Overlay for GUI
      2021-10-06 12:08:53.006042 I /dev/dri/card1: DRM device retrieved from Qt
      2021-10-06 12:08:53.006047 I /dev/dri/card1: Multi-plane setup: Requested: 1 Setup: 1
      2021-10-06 12:08:53.006209 I VRR: No variable refresh rate support detected
      2021-10-06 12:08:53.006287 N Display: Desktop video mode: 1920x1080 60.000Hz
      2021-10-06 12:08:53.006293 N Display: Display has custom colourspace
      2021-10-06 12:08:53.006315 N Display: Supported HDR formats: None
      2021-10-06 12:08:53.030947 I Display: Using 1920x1080@60Hz for GUI
      2021-10-06 12:08:53.030952 I InputHandler: Starting
      2021-10-06 12:08:53.032978 I LIRC: Successfully initialized \'/dev/lircd\' using \'/home/minimyth/.mythtv/lircrc\' config
      2021-10-06 12:08:53.033388 I UDPListener: Enabling
      2021-10-06 12:08:53.037355 I Binding to UDP 0.0.0.0:6948
      2021-10-06 12:08:53.037462 I Binding to UDP [::]:6948
      2021-10-06 12:08:53.110242 I Using Frameless Window
      2021-10-06 12:08:53.110249 I Using Full Screen Window
      2021-10-06 12:08:53.166582 I Display: Have main widget
      2021-10-06 12:08:53.166587 I Display: Have main window
      2021-10-06 12:08:53.166634 I Display: Screen \'HDMI-1\' not found, defaulting to primary screen (HDMI1)
      2021-10-06 12:08:53.349500 I Qt: QOpenGLFramebufferObject: Framebuffer incomplete attachment.
      2021-10-06 12:08:53.349527 I Qt: QOpenGLFramebufferObject: Framebuffer incomplete, missing attachment.
      2021-10-06 12:08:53.349546 E Failed to create framebuffer object
      2021-10-06 12:08:53.349673 I OpenGL: OpenGL vendor : Broadcom
      2021-10-06 12:08:53.349677 I OpenGL: OpenGL renderer : V3D 4.2
      2021-10-06 12:08:53.349680 I OpenGL: OpenGL version : OpenGL ES 3.1 Mesa 21.2.3
      2021-10-06 12:08:53.349684 I OpenGL: Qt platform : eglfs
      2021-10-06 12:08:53.349707 I OpenGL: EGL display : Yes
      2021-10-06 12:08:53.349710 I OpenGL: Qt OpenGL module : OpenGL ES
      2021-10-06 12:08:53.349713 I OpenGL: Qt OpenGL format : OpenGLES 3.1
      2021-10-06 12:08:53.349715 I OpenGL: Qt OpenGL surface : RGBA: 8:8:8:0 Depth: 0 Stencil: 0
      2021-10-06 12:08:53.349720 I OpenGL: Max texture size : 4096
      2021-10-06 12:08:53.349725 I OpenGL: Shaders : Vertex,Fragment,Compute
      2021-10-06 12:08:53.349728 I OpenGL: 16bit framebuffers : No
      2021-10-06 12:08:53.393395 I OpenGL: Initialised MythRenderOpenGL
      2021-10-06 12:08:53.393403 I OpenGL: Using full range output
      2021-10-06 12:08:53.438502 I UICache: Pruning cache directory: /home/minimyth/.mythtv/cache/remotecache
      2021-10-06 12:08:53.438633 I UICache: Kept 0 files, deleted 0 files, stat error on 0 files
      2021-10-06 12:08:53.438645 I UICache: Pruning cache directory: /home/minimyth/.mythtv/cache/thumbnails
      2021-10-06 12:08:53.438699 I UICache: Kept 0 files, deleted 0 files, stat error on 0 files
      2021-10-06 12:08:55.539774 I MythCoreContext::ConnectCommandSocket(): Connecting to backend server: 192.168.1.254:6543 (try 1 of 1)
      2021-10-06 12:08:55.743984 I CECAdapter: Using physical address 1.0.0.0 from EDID
      2021-10-06 12:08:55.759218 I CECAdapter: Found 1 CEC devices(s).
      2021-10-06 12:08:55.759243 I CECAdapter: Device 1: path \'/dev/cec0\' com port \'Linux\' SELECTED
      2021-10-06 12:08:55.759248 I CECAdapter: Trying to open device /dev/cec0 (Linux).
      2021-10-06 12:08:55.759970 I CECAdapter: connection opened
      2021-10-06 12:08:56.561314 I CECAdapter: >> source activated: Playback 1 (4)
      2021-10-06 12:08:56.561385 I CECAdapter: Source 4 Activated
      2021-10-06 12:08:56.561519 I CECAdapter: CEC client registered: libCEC version = 6.0.2, client version = 6.0.2, firmware version = 0, logical address(es) = Playback 1 (4) , physical address: 1.0.0.0, git revision: v11.21.0-v30.0-97-g7d297b1fb8+54-6f8286a~dirty, compiled on 2021-09-23 10:12:53 by piotro@/bin/sh: hostname: command not found on Linux 5.10.16-arch1-4 (x86_64), features: P8_USB, DRM, P8_detect, randr, Linux
      2021-10-06 12:08:57.752912 I CECAdapter: Opened CEC device.
      2021-10-06 12:08:57.753078 I CECAdapter: << powering on \'TV\' (0)
      2021-10-06 12:08:57.815273 I CECAdapter: Asked TV to turn on.
      2021-10-06 12:08:57.815340 I CECAdapter: >> source activated: Playback 1 (4)
      2021-10-06 12:08:57.815357 I CECAdapter: Source 4 Activated
      2021-10-06 12:08:57.815397 I CECAdapter: << powering on \'TV\' (0)
      2021-10-06 12:08:57.882253 I CECAdapter: << Playback 1 (4) -> broadcast (F): active source (1000)
      2021-10-06 12:08:58.088477 I CECAdapter: Asked TV to switch to this input.
      2021-10-06 12:08:58.092762 I VideoProfile: Resetting decoder/render support
      [AVHWDeviceContext @ 0xa35dc90] libva: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
      [AVHWDeviceContext @ 0xa35dc90] Failed to initialise VAAPI connection: -1 (unknown libva error).
      Cannot load libcuda.so.1
      2021-10-06 12:08:58.119150 I VAAPIDec: VAAPI functionality checked failed
      2021-10-06 12:08:58.123449 I NVDEC: No NVDEC decoders found
      2021-10-06 12:08:58.139012 I V4L2_M2M: Supported/available V4L2 decoders:
      2021-10-06 12:08:58.139027 I V4L2_M2M: H264
      2021-10-06 12:08:58.139031 I V4L2_M2M: HEVC(Request)
      2021-10-06 12:08:58.163153 I DRMPRIMECtx: DRM PRIME codecs supported: None 
      2021-10-06 12:08:58.175420 I VideoProfile: Available GPU interops: DRM-DRM-PRIME,GL-VAAPI-DRM,GL-NVDEC,GL-DRM-PRIME
      2021-10-06 12:08:58.175446 I VideoProfile: Decoder/render support: ffmpeg null opengl opengl-yv12
      2021-10-06 12:08:58.175458 I VideoProfile: Decoder/render support: v4l2 opengl-hw
      2021-10-06 12:08:58.175469 I VideoProfile: Decoder/render support: v4l2-dec null opengl opengl-yv12
      2021-10-06 12:08:58.189209 I RAOP Device: Created RAOP device objects.
      2021-10-06 12:08:58.189878 I Listening on TCP 0.0.0.0:5000
      2021-10-06 12:08:58.190009 I Listening on TCP [::]:5000
      2021-10-06 12:08:58.190050 I RAOP Device: Listening for connections on port 5000
      2021-10-06 12:08:58.199931 I Registering service 3c6f67696067@MythTV on Myth-Frontend-dca632247596._raop._tcp port 5000 TXT tp=UDPsm=falsesv=falseek=1et=0,1cn=0,1ch=2ss=16sr=44100pw=falsevn=3 txtvers=1md=0,1,2vs=115.2da=trueam=MythTV,1
      2021-10-06 12:08:58.210276 I Current MythTV Schema Version (DBSchemaVer): 1371
      2021-10-06 12:08:59.090595 N Registering Internal as a media playback plugin.
      2021-10-06 12:08:59.092631 N Creating MediaMonitor
      2021-10-06 12:08:59.092637 I IgnoreDevices=/dev/mmcblk0,/dev/mmcblk1,/dev/mmcblk2,/dev/mmcblk3,/dev/mmcblk0p1,/dev/mmcblk0p2,/dev/mmcblk0p3,/dev/mmcblk0p4,/dev/mmcblk1p1,/dev/mmcblk1p2,/dev/mmcblk1p3,/dev/mmcblk1p4,/dev/mmcblk2p1,/dev/mmcblk2p2,/dev/mmcblk2p3,/dev/mmcblk2p4,/dev/mmcblk3p1,/dev/mmcblk3p2,/dev/mmcblk3p3,/dev/mmcblk3p4,/dev/mmcblk0boot0,/dev/mmcblk0boot1,/dev/mmcblk1boot0,/dev/mmcblk1boot1,/dev/mmcblk2boot0,/dev/mmcblk2boot1,/dev/mmcblk3boot0,/dev/mmcblk3boot1,/dev/zram0,/dev/zram1,/dev/zram2,/dev/zram3,/dev/zram4,/dev/zram5,/dev/zram6,/dev/zram7,
      2021-10-06 12:08:59.094386 N MediaMonitor disabled by user setting.
      2021-10-06 12:08:59.123434 I Loading en_us translation for module mythgame
      2021-10-06 12:08:59.155664 I Current MythMusic Schema Version (MusicDBSchemaVer): 1025
      2021-10-06 12:08:59.177969 I Bonjour: Service registration complete: name \'3c6f67696067@MythTV on Myth-Frontend-dca632247596\' type \'_raop._tcp.\' domain: \'local.\'
      2021-10-06 12:08:59.206209 I Loading en_us translation for module mythmusic
      2021-10-06 12:08:59.221659 I Loading en_us translation for module mythnetvision
      2021-10-06 12:08:59.234935 I Loading en_us translation for module mythnews
      2021-10-06 12:08:59.255233 I Loading en_us translation for module mythweather
      2021-10-06 12:08:59.268897 I ZMClient: no valid IP or port found for mythzmserver
      2021-10-06 12:08:59.273798 I Loading en_us translation for module mythzoneminder
      2021-10-06 12:08:59.279118 I Listening on TCP 0.0.0.0:6546
      2021-10-06 12:08:59.281295 I Listening on TCP [::]:6546
      2021-10-06 12:08:59.347107 N Found mainmenu.xml for theme \'MiniMyth2\'
      2021-10-06 12:08:59.358275 I Registering HouseKeeperTask \'HardwareProfiler\'.
      2021-10-06 12:08:59.362576 I Starting HouseKeeper.
      2021-10-06 12:08:59.363150 I Starting process manager
      2021-10-06 12:08:59.363279 I Starting IO manager (read)
      2021-10-06 12:08:59.372854 I Starting process signal handler
      2021-10-06 12:08:59.373217 I Starting IO manager (write)
      2021-10-06 12:08:59.588657 I Bonjour: Service registration complete: name \'Mythfrontend on Myth-Frontend-dca632247596\' type \'_mythfrontend._tcp.\' domain: \'local.\'
      2021-10-06 12:09:10.494843 I TV::TV(): Creating TV object
      2021-10-06 12:09:10.905218 I TV::Init(): Created TvPlayWindow.
      2021-10-06 12:09:10.924583 I TV::HandleStateChange(): Attempting to change from None to WatchingPreRecorded
      2021-10-06 12:09:11.004110 E Overlay: Failed to create window osd_status
      2021-10-06 12:09:11.006348 E Overlay: Failed to create window osd_status
      2021-10-06 12:09:11.011140 I PlayerUI: Initialising player state
      2021-10-06 12:09:11.011144 I Editor: Initialising editor
      2021-10-06 12:09:11.011149 I PlayerVis: Initialising visualiser
      2021-10-06 12:09:11.011158 I PlayerCaptions: Initialising captions
      2021-10-06 12:09:11.011172 I PlayerAudio: Initialising audio
      2021-10-06 12:09:11.152817 N AudioPlayer: Enabling Audio
      2021-10-06 12:09:11.152859 I PlayerBase: Player state ready
      2021-10-06 12:09:11.152896 I Player(0): Opening \'myth://mythtv/13109_20211006054000.ts\'
      2021-10-06 12:09:12.199714 I AFD: Opened codec 0xbf4f030, id(DVB_SUBTITLE) type(Subtitle)
      2021-10-06 12:09:12.199752 I AFD: codec MP2 has 2 channels
      2021-10-06 12:09:12.201556 I AFD: Opened codec 0xe120ea0, id(MP2) type(Audio)
      2021-10-06 12:09:12.204316 I AFD: codec AC3 has 2 channels
      2021-10-06 12:09:12.204887 I AFD: Opened codec 0xc0e5100, id(AC3) type(Audio)
      2021-10-06 12:09:12.205459 I AFD: Using v4l2 for video decoding
      2021-10-06 12:09:12.213064 I AFD: Opened codec 0xc106780, id(H264) type(Video)
      2021-10-06 12:09:12.219662 I AOBase: Opening audio device \'sysdefault:CARD=ALSA\' ch 2(2) sr 48000 sf signed 16 bit reenc 0
      2021-10-06 12:09:12.289635 I Clearing OpenGL painter cache.
      2021-10-06 12:09:12.297254 E Display: Trying mode 1920x1080@25.000Hz
      2021-10-06 12:09:12.297381 I Display: Switched to 1920x1080@50.000Hz for video 1920x1080
      2021-10-06 12:09:13.077719 I VideoOutput: SetDeinterlacing (Doublerate 1): Single High|CPU|GLSL|DRIVER Double High|CPU|GLSL|DRIVER
      2021-10-06 12:09:13.080245 I TV::StartPlayer(): Created player.
      2021-10-06 12:09:13.080413 I TV::HandleStateChange(): Changing from None to WatchingPreRecorded
      2021-10-06 12:09:13.082689 I TV::HandleStateChange(): Main UI disabled.
      2021-10-06 12:09:13.082781 I TV::StartTV(): Entering main playback loop.
      2021-10-06 12:09:13.114505 I DRMVideo: Using Plane #64 for video
      2021-10-06 12:09:13.116219 I Qt: Failed to commit atomic request (code=-22)

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            lagocs Laszlo Agocs
            warpme Piotr Oniszczuk
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes