FreeCAD screen flashing after system update

I want to report a bug, but at this point I’m unusually unsure where to report it.

I sometimes use FreeCAD, almost solely through appimages distributed by FreeCAD or “realthunder” rather than the default version built into Fedora, due to specific features I want to use. Some time in I think December, after some system update on my F35, those external FreeCAD versions (which had not been updated) started to have some screen artifacts. Things would momentarily disappear while I was interacting with them. I didn’t immediatey report this because I chalked it up to version mismatches of some sort between the system and the appimage build. In any case, it persisted through multiple further updates.

Today, I discovered that in the version of FreeCAD shipped in Fedora 35 (freecad-0.19.2-5.fc35.x86_64), the whole UI flashes a lot (not exactly the same symptoms as the upstream appimage builds), making it unusable.

I don’t know whether this is a FreeCAD bug, kernel bug, graphics stack bug somewhere, or something else. I don’t know whether it is unique to me or other people are running into the same problem not knowing whether to report it… Or maybe I haven’t figured out what to search for in bugzilla and it is already known?

Can anyone else reproduce this?

Any suggestions on reporting it usefully in bugzilla?

Could you please give us more info’s as :

inxi -Fzx in terminal and post the output as </> Preformatted text here.

So we probably can make some suggestions to fix the problem. Or help to reproduce it, what is important, if you want to make a bug-request.

1 Like

Thanks for helping me know what to provide… Happy to provide more information to figure out how to better report this. :smiling_face:

$ inxi -Fzx
  Kernel: 5.15.11-200.fc35.x86_64 x86_64 bits: 64 compiler: gcc
  v: 2.37-10.fc35 Desktop: GNOME 41.2
  Distro: Fedora release 35 (Thirty Five)
  Type: Laptop System: LENOVO product: 20N2CTO1WW v: ThinkPad T490
  serial: <superuser required>
  Mobo: LENOVO model: 20N2CTO1WW v: SDK0J40709 WIN
  serial: <superuser required> UEFI: LENOVO v: N2IET96W (1.74 )
  date: 08/10/2021
  ID-1: BAT0 charge: 28.8 Wh (68.4%) condition: 42.1/50.5 Wh (83.4%)
  volts: 11.5 min: 11.5 model: SMP 02DL008 status: Discharging
  Info: Quad Core model: Intel Core i7-8565U bits: 64 type: MT MCP
  arch: Kaby Lake note: check rev: B cache: L2: 1024 KiB
  flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  bogomips: 31999
  Speed: 3265 MHz min/max: 400/4600 MHz Core speeds (MHz): 1: 3637 2: 3590
  3: 3727 4: 3592 5: 3569 6: 3643 7: 3307 8: 3819
  Device-1: Intel WhiskeyLake-U GT2 [UHD Graphics 620] vendor: Lenovo
  driver: i915 v: kernel bus-ID: 00:02.0
  Device-2: NVIDIA GP108M [GeForce MX250] driver: N/A bus-ID: 3c:00.0
  Device-3: Chicony ThinkPad T490 Webcam type: USB driver: uvcvideo
  bus-ID: 1-8:2
  Display: wayland server: X.Org compositor: gnome-shell driver:
  loaded: modesetting unloaded: fbdev,vesa resolution: 2560x1440~60Hz
  OpenGL: renderer: Mesa Intel UHD Graphics 620 (WHL GT2) v: 4.6 Mesa 21.3.2
  direct render: Yes
  Device-1: Intel Cannon Point-LP High Definition Audio vendor: Lenovo
  driver: snd_hda_intel v: kernel bus-ID: 00:1f.3
  Sound Server-1: ALSA v: k5.15.11-200.fc35.x86_64 running: yes
  Sound Server-2: PulseAudio v: 15.0 running: no
  Sound Server-3: PipeWire v: 0.3.40 running: yes
  Device-1: Intel Cannon Point-LP CNVi [Wireless-AC] driver: iwlwifi
  v: kernel bus-ID: 00:14.3
  IF: wlp0s20f3 state: up mac: <filter>
  Device-2: Intel Ethernet I219-V vendor: Lenovo driver: e1000e v: kernel
  port: N/A bus-ID: 00:1f.6
  IF: enp0s31f6 state: down mac: <filter>
  IF-ID-1: virbr0 state: down mac: <filter>
  Device-1: Intel Bluetooth 9460/9560 Jefferson Peak (JfP) type: USB
  driver: btusb v: 0.8 bus-ID: 1-10:3
  Report: bt-adapter ID: hci0 rfk-id: 53 state: up address: <filter>
  Local Storage: total: 2.29 TiB used: 1.07 TiB (46.9%)
  ID-1: /dev/mmcblk0 model: EFAQK size: 476.91 GiB
  ID-2: /dev/nvme0n1 vendor: Samsung model: SSD 970 EVO 2TB size: 1.82 TiB
  temp: 36.9 C
  ID-1: / size: 68.4 GiB used: 45.71 GiB (66.8%) fs: ext4
  dev: /dev/nvme0n1p3
  ID-2: /boot size: 1.94 GiB used: 235.2 MiB (11.9%) fs: ext4
  dev: /dev/nvme0n1p2
  ID-3: /boot/efi size: 199.8 MiB used: 32.7 MiB (16.4%) fs: vfat
  dev: /dev/nvme0n1p1
  ID-4: /home size: 1.71 TiB used: 1.03 TiB (60.1%) fs: ext4
  dev: /dev/nvme0n1p5
  ID-1: swap-1 type: partition size: 12 GiB used: 0 KiB (0.0%)
  dev: /dev/nvme0n1p4
  ID-2: swap-2 type: zram size: 8 GiB used: 1.76 GiB (22.0%) dev: /dev/zram0
  System Temperatures: cpu: 56.0 C mobo: N/A
  Fan Speeds (RPM): N/A
  Processes: 386 Uptime: 18d 54m Memory: 23.13 GiB used: 15.56 GiB (67.3%)
  Init: systemd runlevel: 5 Compilers: gcc: 11.2.1 clang: 13.0.0
  Packages: 30 note: see --pkg Shell: Bash v: 5.1.8 inxi: 3.3.09

If you made an upgrade from a lower version as F35 you need to upgrade the Nvidia driver too.
There where lately a lot of requests with graphic problems related to nvidia. Try to search more including NVIDIA GP108Min your search request.

It was updated from earlier Fedora versions. However, despite having the hardware, I’m not running the nvidia driver.

I guess I could try installing it, but I thought it didn’t play well with wayland, and I had incorrectly thought when I bought the system that I’d be able to use the open source nouveau support in dual graphics mode.

Noting that FreeCAD uses Qt5, I tried running a local build of Candle, which is also built with Qt5, and also saw screen corruption, like seeing the screen behind it through the main window.

I installed krita as an example KDE app, also using Qt5, and didn’t see problems with it.

I’m running wayland. I could try an X session and see whether the problem is visible there. (I’ve been trying to stick in Wayland for security and to be moving toward the future…)

from a terminal you could do
QT_QPA_PLATFORM=xcb freecad

1 Like

Interesting! I see that QT_QPA_PLATFORM=xcb /usr/bin/FreeCAD fixes the bleed-through in the FreeCAD shipped with Fedora, but QT_QPA_PLATFORM=xcb $appimage does not fix the disappearing sketch elements I saw in the appimages, both the official ones from the FreeCAD project and the “realthunder” versions. So there are really two at least somewhat distinct problems that showed up at the same time.

You may need to export QT_QPA_PLATFORM=xcb; $appimage

I would venture that the issue is due to not having any driver loaded for the nvidia GPU. Your inxi output shows no driver loaded, not even the default nouveau open source driver for nvidia. Recently there was another that had similar issues and when he installed the nvidia driver his problems disappeared. It is known that with fedora 35 nouveau will not load for some nvidia GPUs. It has also been seen that having a GPU with no driver loaded can interfere, especially on the dual GPU systems such as your laptop.

You can easily install the correct nvidia driver for your system by first opening the gnome software panel (yes I suggest you use gnome instead of kde for this purpose) then select the repos from the ‘hamburger’ menu at the upper right. Once there go to third party repos and enable the rpmfusion-nonfree-nvidia-driver repo. Once that is done then go to a terminal command line (either kde or gnome [preferred]) and run sudo dnf install akmod-nvidia-470xx which will install all the needed parts for nvidia.

Once the nvidia driver is installed then you can easily see if the flickering continues after you reboot. If the issue is fixed it was simple. If it continues we may need to look a little deeper.

Note that the 470 driver does not support wayland, but using the built in screen with the intel IGP that is not an issue. If you need the discrete GPU with the 470 driver you will have to use X11.

Also note that there is a newer driver available, the 495.46 driver that can be installed the same way, but it has dropped support for some of the older GPUs and yours may be supported or maybe not with that version. The 495 driver does support wayland with some apps but not all.


Thank you!

I’m a GNOME user. (Installing Krita was to test whether was a generic Qt problem on my system.)

I’d been avoiding a tainted kernel, but if nouveau can’t work I guess I brought this on myself by buying the dual video system. :rofl:

I want to make sure I understand: I should expect to be able to run wayland even with the 470 driver installed and I’ll just keep using only the Intel IGP, but the 470 driver being there may address the problem?

Also, I now see that GeForce MX250 is supported by the 495.46 driver so that seems like it’s worth starting with in order to keep Wayland. I assume that’s akmod-nvidia-495xx… (Edit: Nope, akmod-nvidia.)

Looks like it’s time for some more updates and installs!

Edit: A full update without akmod-nvidia did not resolve the problem, now rebooting with akmod-nvidia installed…

1 Like

Installing akmod-nvidia after fully updating made no difference. Also, even the 495 driver dropped me into an X session rather than a wayland session (XDG_SESSION_TYPE=x11), and the problem reproduced in X. I (eventually) successfully booted into a wayland session with the 495 driver installed, and the problem continues to reproduce in wayland.

To show the problem here, I can’t upload a 400K webm movie, so the best I can do is a 1MB animated gif. :stuck_out_tongue:


The appearing and disappearing is driven by movements of the cursor which doesn’t show in the screen recording.

However, in both an X session and a wayland session with the 495 nvidia drivers installed, this works around the problem:

Does this give any sense where the bug is likely to be? I’d like to help with a good bug report, not just find a workaround, if I can. :smiling_face:

I would suggest filing the bug against that app. It is definitely a video issue and with the issue appearing in both wayland and X it seems directly related to that app.

Does this appear in all apps or only in that one? The answer to that should determine if this is a wayland or app issue. Only that one app (and in both wayland and X) implies an app issue. If it appeared in all apps it would imply a wayland issue.

I use freeCAD as the appimage, but only on my fedora 34 machine and have not seen any issues there. I would guess there is something that needs updated in the appimage for fedora 35.

BTW, the fact that nouveau does not load for you but the nvidia 495 driver does seems to imply that the hardware is new enough that nouveau has not yet been updated to support that card.

Nouveau didn’t work when I tried it. This is a T490 that’s several years old, from early 2019, and I don’t remember the last time I tried it. I kind of forgot I even had dual video in it, honestly.

I don’t run enough different apps to know whether it is actually specific to the FreeCAD Appimage, honestly. That’s one of the reasons I was asking whether anyone else had seen anything like this; it seemed possible that I’m just not using apps that demonstrate the problem. Terminal, prusa-slicer, cura, firefox, and chrome don’t, but that’s most of what I’ve run on this system lately that comes easily to mind. I’m not sure what app would be most likely to demonstrate a similar problem.

I thought one of the several points of an appimage was to be primarily decoupled from the installed OS base?

It appeared on system update newly affecting old versions of FreeCAD as well as newer ones, and works fine when it’s actually using the nvidia driver. Does that not point to an intel video driver problem?

Not necessarily.
Having a video card with no driver installed can cause strange symptoms.

The fact that the problem disappeared after installing the nvidia driver does not indicate a problem with the intel driver, but can reflect hardware actions or issues that only occur when no driver is available. The driver controls access to certain memory addresses but with no driver they are open for spurious signals to be activated.

A quick search for the term __GLX_VENDOR_LIBRARY_NAME=nvidia on this site gives ~15 threads where it is referenced and a quick perusal of several seems to indicate the need likely is hardware related. Thus it may simply be a quirk of your particular hardware combination and not needed nor identifiable on other systems.

An appimage is mostly decoupled from the OS, but of necessity must rely upon the video system for display so quirks there can be triggered.

But that’s not what happened. The problem happens even with the nvidia driver installed unless I explicitly set __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia to force it to be rendered with the nvidia driver.

This problem went away when I upgraded to Fedora 36. I no longer need to use nvidia. Additionally, there was some lag interacting with certain components in FreeCAD (particularly the tree view) before the upgrade and that has gone away with the upgrade too.

I’ll chalk this up as “fixed by system upgrade” so that anyone else seeing this knows to follow suit. (Note that if you are using an Appimage, you may have to repackage the FreeCAD Appimage to remove the old libstdc++ from the Appimage. Unrelated to this problem, just something you might run into if you are trying to use this to resolve the problem.)