Steps I use to reproduce:
I know it's a bug because the Radeon Sapphire R9 390 video card is a relatively recent card. I have checked freecad on my system with an Nvidia Asus gtx 1070, whose 3d view performance matches the refresh rate of my monitor. This bug occurs both in KDE plasma (wayland) on Arch, and Xfce (xorg) on Manjaro. I've tried radeon drivers, amdgpu driver, amdgpu driver with amdgpu.dc=0, separately amdgpu.dmp=0, also amdgpu.exp_hw_support=1. I've tried with only one monitor plugged in.1. Start FreeCAD in a console: "QT_QPA_PLATFORM=xcb FreeCAD"
2. Click New Document.
3. Click Create Body.
4. Click Create Sketch.
5. Click XY_Plane. (Sketcher opens)
6. Click Create Circle.
7. Click to place circle center, now frames are low and circle is updated at < 2fps)
8. Move mouse to desired radius, click again to stop updating circle.
9. Click and hold circle center, drag mouse to the right and observe jerky animation.
One thing I haven't tried is I have the r9 390 in the lower pcie slot, and the 1070 in the first pcie slot. However, given everything else works correctly running on the 390 I don't think it should be a problem.
I've tried blender and librecad with no problems.
The problem has been tested to occur in the following versions:
FreeCAD_weekly-builds-28918-2022-05-22-conda-Linux-x86_64-py39.AppImage
AUR FreeCAD 0.20 Revision: 28775 (Git)
Built from source:
Code: Select all
OS: Arch Linux (KDE)
Word size of FreeCAD: 64-bit
Version: 0.20.28928 (Git)
Build type: Debug
Branch: master
Hash: d492ac30838e4fb07b1ce4b378730f2fb38b9ba3
Python 3.10.4, Qt 5.15.4, Coin 4.0.1, OCC 7.5.3
Locale: English/United States (en_US)
Installed mods:
* fasteners 0.3.41
Code: Select all
Operating System: Arch Linux
KDE Plasma Version: 5.24.5
KDE Frameworks Version: 5.94.0
Qt Version: 5.15.4
Kernel Version: 5.17.9-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 24 × AMD Ryzen 9 3900X 12-Core Processor
Memory: 62.8 GiB of RAM
Graphics Processor: AMD Radeon R9 390 Series
Code: Select all
[user-arch@antec-arch ~]$ glxinfo -B
name of display: :0
display: :0 screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
Vendor: AMD (0x1002)
Device: AMD HAWAII (LLVM 13.0.1, DRM 2.50, 5.17.9-arch1-1) (0x67b1)
Version: 22.1.0
Accelerated: yes
Video memory: 8192MB
Unified memory: no
Preferred profile: core (0x1)
Max core profile version: 4.5
Max compat profile version: 4.5
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.2
Memory info (GL_ATI_meminfo):
VBO free memory - total: 7400 MB, largest block: 7400 MB
VBO free aux. memory - total: 1982 MB, largest block: 1982 MB
Texture free memory - total: 7400 MB, largest block: 7400 MB
Texture free aux. memory - total: 1982 MB, largest block: 1982 MB
Renderbuffer free memory - total: 7400 MB, largest block: 7400 MB
Renderbuffer free aux. memory - total: 1982 MB, largest block: 1982 MB
Memory info (GL_NVX_gpu_memory_info):
Dedicated video memory: 8192 MB
Total available memory: 10235 MB
Currently available dedicated video memory: 7400 MB
OpenGL vendor string: AMD
OpenGL renderer string: AMD HAWAII (LLVM 13.0.1, DRM 2.50, 5.17.9-arch1-1)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 22.1.0
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL version string: 4.5 (Compatibility Profile) Mesa 22.1.0
OpenGL shading language version string: 4.50
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 22.1.0
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
Code: Select all
Wrn: Accelerator conflict between Std_ViewFitAll (V, F) and Sketcher_ConstrainVertical (V)
I find it curious that FreeCAD's pstree output shows many threads when I run the program displaying output to my 390 card. But when I run it to output on the nvidia 1070 card, I only see two threads.
I've attached a file with two straces which were taken with the radeon driver, I will probably attach another with the amdgpu driver. To take the strace, I get the strace command ready in a console, then I prepare a sketch with a single circle. Then I start the strace, I click and hold the center of the circle, then I move the circle and stop, then ctrl-C the strace.
The difference in the straces between amdgpu and radeon would be something like:
"ioctl(9, DRM_IOCTL_AMDGPU_WAIT_CS, 0x7ffc0036bf70) = 0"
instead of
"5865 21:14:47.925761 (+ 0.000012) ioctl(12, DRM_IOCTL_RADEON_GEM_WAIT_IDLE, 0x7ffd18c6e930) = 0 <0.004183>
5865 21:14:47.929988 (+ 0.004228) ioctl(12, DRM_IOCTL_RADEON_GEM_BUSY, 0x7ffd18c6e850) = 0 <0.000016>"
The attached strace is just for the thread of the main process, the one that pgrep -i freecad reports as the process. I could excerpt a second or two of strace with -f (traces children too.).
I think this fellow had a similar problem. I am unable to run old AppImages though.
https://forum.freecadweb.org/viewtopic.php?t=38443
Because this problem occurs with both the amdgpu and radeon drivers, I suspect something else, maybe QT5, or a kernel bug. It seems like something is held up by a futex or a resource being unavailable. Is it possible running the video card through the x570 pcie chipset could be a problem in this corner case for some reason? Can anyone help me track the problem further so I can file a bug report somewhere? Is there a QT6 build of FreeCAD? I can have strace print stack with each call.
Thanks,
Squeaks