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

5.12.0 -> 5.12.1 Regression: Graphical artifacts and hang ups when using nouveau [bisected]

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Done
    • Affects Version/s: 5.12.1
    • Fix Version/s: 5.12.2, 5.14.0 Alpha
    • Component/s: GUI: OpenGL
    • Labels:
      None
    • Environment:
      Arch Linux x86_64
    • Platform/s:
      Linux/X11
    • Commits:
      96f6cab22cab252cbe7a98bbeadde95497e0bd75 (qt/qtbase/5.12.2)

      Description

      [This issue was first discussed in QTBUG-73691 and later found to be a separate problem.]

      On Arch Linux x86_64, using X11 (server version 1.20.3), when using nouveau or modesetting as the X driver and the nouveau kernel DRM driver (I have a NVIDIA Geforce GTX 285 GPU), with mesa 18.3.3 and libxcb 1.13.1 the following error occurs:

      After using the desktop for a while (in particular, after causing some graphics load) visual artifacts appear and plasma-desktop often hangs up. Sometimes the hanging process can be restarted, other times X is completely frozen (but can still be ssh'ed into).

      The dmesg log shows these lines, although only the fifo DMA_PUSHER lines seem to consistently appear every time the problem is triggered:

      [  227.576711] nouveau 0000:04:00.0: fifo: DMA_PUSHER - ch 6 [Xorg[751]] get 00000eb764 put 00000ec8ec ib_get 00000167 ib_put 0000016a state 80006eac (err: INVALID_CMD) push 00400040
      [  227.630897] nouveau 0000:04:00.0: gr: DATA_ERROR 00000005 [INVALID_ENUM]
      [  227.630904] nouveau 0000:04:00.0: gr: 00100000 [] ch 6 [007f437000 Xorg[751]] subc 3 class 8397 mthd 1348 data 00046da0
      [  227.630916] nouveau 0000:04:00.0: fifo: DMA_PUSHER - ch 6 [Xorg[751]] get 00000fcb8c put 0000102f84 ib_get 00000178 ib_put 0000017c state 80007354 (err: INVALID_CMD) push 00400040
      [  227.630926] nouveau 0000:04:00.0: gr: DATA_ERROR 00000005 [INVALID_ENUM]
      [  227.630929] nouveau 0000:04:00.0: gr: 00100000 [] ch 6 [007f437000 Xorg[751]] subc 3 class 8397 mthd 134c data 00000000
      [  227.630938] nouveau 0000:04:00.0: gr: DATA_ERROR 00000005 [INVALID_ENUM]
      [  227.630941] nouveau 0000:04:00.0: gr: 00100000 [] ch 6 [007f437000 Xorg[751]] subc 3 class 8397 mthd 1350 data 000479d0
      [  227.630950] nouveau 0000:04:00.0: gr: DATA_ERROR 00000005 [INVALID_ENUM]
      [  227.630953] nouveau 0000:04:00.0: gr: 00100000 [] ch 6 [007f437000 Xorg[751]] subc 3 class 8397 mthd 1348 data 00046da0
      [  227.630964] nouveau 0000:04:00.0: fifo: DMA_PUSHER - ch 6 [Xorg[751]] get 00000fcb8c put 0000102f84 ib_get 0000017a ib_put 0000017c state 80007354 (err: INVALID_CMD) push 00400040
      [  227.630975] nouveau 0000:04:00.0: gr: DATA_ERROR 00000005 [INVALID_ENUM]
      [  227.630978] nouveau 0000:04:00.0: gr: 00100000 [] ch 6 [007f437000 Xorg[751]] subc 3 class 8397 mthd 134c data 00000000
      [  227.630988] nouveau 0000:04:00.0: gr: DATA_ERROR 00000005 [INVALID_ENUM]
      [  227.630991] nouveau 0000:04:00.0: gr: 00100000 [] ch 6 [007f437000 Xorg[751]] subc 3 class 8397 mthd 1350 data 000479d0
      [  227.665017] nouveau 0000:04:00.0: gr: DATA_ERROR 0000000c [INVALID_BITFIELD]
      [  227.665022] nouveau 0000:04:00.0: gr: 00100000 [] ch 6 [007f437000 Xorg[751]] subc 3 class 8397 mthd 135c data 000472e8
      [  227.847944] nouveau 0000:04:00.0: fifo: DMA_PUSHER - ch 6 [Xorg[751]] get 0000138e10 put 000013b454 ib_get 000001ad ib_put 000001b0 state 40000004 (err: INVALID_MTHD) push 00400040
      [  227.850171] nouveau 0000:04:00.0: fifo: CACHE_ERROR - ch 6 [Xorg[751]] subc 0 mthd 0000 data 00146200
      [  227.889579] nouveau 0000:04:00.0: Xorg[751]: multiple instances of buffer 4 on validation list
      [  227.889588] nouveau 0000:04:00.0: Xorg[751]: validate_init
      [  227.889590] nouveau 0000:04:00.0: Xorg[751]: validate: -22
      ...
      

      This problem appeared with Qt 5.12.1 and goes away when downgrading to Qt 5.12.0.

      I bisected the bug and found this commit to be faulty:

      commit 97600d2c2885e667ced0926815b5a12a7f25285c
      Author: Allan Sandfeld Jensen <allan.jensen@qt.io>
      Date:   Mon Feb 19 10:23:15 2018 +0100
      
          White-list more recent Mesa version for multi-threading
          
          The issue we had has been fixed for years, but was unfortunately in
          libxcb which we can't check at runtime. Instead assume very recent
          Mesa drivers works.
          
          Change-Id: I5fdd726b480b77edbedc0f369ae82ab4acbb77c9
          Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
          Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
      

      Here is the bisect log:

      git bisect start
      # good: [13ed06640c6cf32ea8c784c896c6bf017053edb3] [Android] Fix the ability to override environment and arguments
      git bisect good 13ed06640c6cf32ea8c784c896c6bf017053edb3
      # bad: [0c498153331d79715ecfe431eb27065748628ba8] Fix llvm-strip error
      git bisect bad 0c498153331d79715ecfe431eb27065748628ba8
      # bad: [c0dd44556454ce0fa451f83decdad3931a6deaec] Fix a nullptr compile error with gcc 4.8
      git bisect bad c0dd44556454ce0fa451f83decdad3931a6deaec
      # bad: [4d180586cddbd71a67c83246db3bec1caa595e05] Merge remote-tracking branch 'origin/5.11' into 5.12
      git bisect bad 4d180586cddbd71a67c83246db3bec1caa595e05
      # bad: [bc07958f922519bca1acc5930498ee0273576699] Merge remote-tracking branch 'origin/5.11' into 5.12
      git bisect bad bc07958f922519bca1acc5930498ee0273576699
      # good: [eedb3a06cbaff1a3e100a0d68a578d15a0c9dd97] Merge remote-tracking branch 'origin/5.12.0' into 5.12
      git bisect good eedb3a06cbaff1a3e100a0d68a578d15a0c9dd97
      # bad: [a0907e6ac1deee086c04a8987ad76fc2c78f65ab] Fix warning about missing initializer for a struct member
      git bisect bad a0907e6ac1deee086c04a8987ad76fc2c78f65ab
      # bad: [cfbb0d2b407e45d652d18ecd940adbbc8b3ddddd] Avoid crashing with opaque opacity effect
      git bisect bad cfbb0d2b407e45d652d18ecd940adbbc8b3ddddd
      # bad: [97600d2c2885e667ced0926815b5a12a7f25285c] White-list more recent Mesa version for multi-threading
      git bisect bad 97600d2c2885e667ced0926815b5a12a7f25285c
      # good: [1f984dee90d6aa7d556a1fbd042b0209efac3150] Merge "Merge remote-tracking branch 'origin/5.12.0' into 5.12" into refs/staging/5.12
      git bisect good 1f984dee90d6aa7d556a1fbd042b0209efac3150
      # first bad commit: [97600d2c2885e667ced0926815b5a12a7f25285c] White-list more recent Mesa version for multi-threading
      

      This also makes a lot of sense, since

      https://bugs.freedesktop.org/show_bug.cgi?id=91632

      concludes that nouveau DRM doesn't support multithreaded rendering. The author of the offending commit argues that multithreaded rendering should be supported depending on the version of libxcb, but that doesn't appear to be true, at least not for my GPU.

        Attachments

        For Gerrit Dashboard: QTBUG-73715
        # Subject Branch Project Status CR V

          Activity

            People

            • Assignee:
              allan.jensen Allan Sandfeld Jensen
              Reporter:
              bastianbeischer Bastian Beischer
            • Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes