FreeCAD AppImage stopped working after Fedora 40 upgrade

After upgrading to Fedora 40, my FreeCAD appimage isn’t working any more. This is the latest FreeCAD release.

It starts and goes through the splash screen / loading plugins, then fails with the following error message:

[alexh:~] 19s $ ~/Downloads/FreeCAD-0.21.2-Linux-x86_64.AppImage 
FreeCAD 0.21.2, Libs: 0.21.2R33771 (Git)
© Juergen Riegel, Werner Mayer, Yorik van Havre and others 2001-2023
FreeCAD is free and open-source software licensed under the terms of LGPL2+ license.
FreeCAD wouldn't be possible without FreeCAD community.
  #####                 ####  ###   ####  
  #                    #      # #   #   # 
  #     ##  #### ####  #     #   #  #   # 
  ####  # # #  # #  #  #     #####  #   # 
  #     #   #### ####  #    #     # #   # 
  #     #   #    #     #    #     # #   #  ##  ##  ##
  #     #   #### ####   ### #     # ####   ##  ##  ##

(qt.qpa.plugin) Could not find the Qt platform plugin "wayland" in ""
MESA-LOADER: failed to open iris: /usr/lib64/dri/iris_dri.so: undefined symbol: amdgpu_va_get_start_addr (search paths /usr/lib64/dri, suffix _dri)
failed to load driver: iris
MESA-LOADER: failed to open swrast: /usr/lib64/dri/swrast_dri.so: undefined symbol: amdgpu_va_get_start_addr (search paths /usr/lib64/dri, suffix _dri)
WebEngineContext used before QtWebEngine::initialize() or OpenGL context creation failed.
QGLXContext: Failed to create dummy context
Failed to create OpenGL context for format QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize 8, samples 0, swapBehavior QSurfaceFormat::DefaultSwapBehavior, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::NoProfile) 
/tmp/.mount_FreeCANL5R4l/AppRun: line 43:  7618 Aborted                 (core dumped) ${MAIN} "$@"

I’m not sure how to troubleshoot it further. It’s been a while since I’ve run into OpenGL issues.

inxi details:

[alexh:~] 2s $ sudo inxi -Fza
[sudo] password for alexh: 
System:
  Kernel: 6.8.9-300.fc40.x86_64 arch: x86_64 bits: 64 compiler: gcc
    v: 2.41-34.fc40 clocksource: tsc avail: hpet,acpi_pm
    parameters: BOOT_IMAGE=(hd0,gpt2)/vmlinuz-6.8.9-300.fc40.x86_64
    root=/dev/mapper/fedora-root ro rd.lvm.lv=fedora/root rhgb quiet
  Console: pty pts/2 wm: kwin_wayland DM: SDDM Distro: Fedora Linux 40
    (Server Edition)
Machine:
  Type: Desktop System: Dell product: OptiPlex 7040 v: N/A serial: <filter>
    Chassis: type: 3 serial: <filter>
  Mobo: Dell model: 096JG8 v: A01 serial: <filter> part-nu: 06B9
    uuid: 4c4c4544-0039-3110-8053-b6c04f4a4232 UEFI-[Legacy]: Dell v: 1.2.8
    date: 01/26/2016
CPU:
  Info: model: Intel Core i7-6700T bits: 64 type: MT MCP arch: Skylake-S
    gen: core 6 level: v3 note: check built: 2015 process: Intel 14nm family: 6
    model-id: 0x5E (94) stepping: 3 microcode: 0xF0
  Topology: cpus: 1x cores: 4 tpc: 2 threads: 8 smt: enabled cache:
    L1: 256 KiB desc: d-4x32 KiB; i-4x32 KiB L2: 1024 KiB desc: 4x256 KiB
    L3: 8 MiB desc: 1x8 MiB
  Speed (MHz): avg: 800 min/max: 800/3600 base/boost: 2700/4200 scaling:
    driver: intel_pstate governor: powersave volts: 1.0 V ext-clock: 100 MHz
    cores: 1: 800 2: 800 3: 800 4: 800 5: 800 6: 800 7: 800 8: 800
    bogomips: 44798
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: gather_data_sampling status: Vulnerable: No microcode
  Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT
    vulnerable
  Type: mds mitigation: Clear CPU buffers; SMT vulnerable
  Type: meltdown mitigation: PTI
  Type: mmio_stale_data mitigation: Clear CPU buffers; SMT vulnerable
  Type: reg_file_data_sampling status: Not affected
  Type: retbleed mitigation: IBRS
  Type: spec_rstack_overflow status: Not affected
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
    prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
    sanitization
  Type: spectre_v2 mitigation: IBRS; IBPB: conditional; STIBP: conditional;
    RSB filling; PBRSB-eIBRS: Not affected; BHI: Not affected
  Type: srbds mitigation: Microcode
  Type: tsx_async_abort mitigation: TSX disabled
Graphics:
  Device-1: Intel HD Graphics 530 vendor: Dell driver: i915 v: kernel
    arch: Gen-9 process: Intel 14n built: 2015-16 ports: active: DP-1,HDMI-A-1
    empty: DP-2,HDMI-A-2 bus-ID: 00:02.0 chip-ID: 8086:1912 class-ID: 0300
  Device-2: Microsoft LifeCam Cinema driver: snd-usb-audio,uvcvideo
    type: USB rev: 2.0 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 1-4.3:6
    chip-ID: 045e:075d class-ID: 0102
  Display: server: X.Org v: 23.2.6 with: Xwayland v: 23.2.6
    compositor: kwin_wayland driver: X: loaded: modesetting unloaded: fbdev,vesa
    dri: iris gpu: i915 display-ID: :1 screens: 1
  Screen-1: 0 s-res: 2760x1920 s-dpi: 96 s-size: 730x508mm (28.74x20.00")
    s-diag: 889mm (35.01")
  Monitor-1: DP-1 pos: right model: Lenovo P24q-10 serial: <filter>
    built: 2018 res: 1080x1920 hz: 60 dpi: 91 gamma: 1.2
    size: 300x530mm (11.81x20.87") diag: 604mm (23.8") ratio: 16:9 modes:
    max: 2560x1440 min: 720x400
  Monitor-2: HDMI-A-1 pos: primary,left model: Dell E228WFP serial: <filter>
    built: 2007 res: 1680x1050 hz: 60 dpi: 91 gamma: 1.2
    size: 470x300mm (18.5x11.81") diag: 558mm (22") ratio: 16:10 modes:
    max: 1680x1050 min: 720x400
  API: EGL v: 1.5 hw: drv: intel iris platforms: device: 0 drv: iris
    device: 1 drv: swrast gbm: drv: iris surfaceless: drv: iris x11: drv: iris
    inactive: wayland
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: intel mesa v: 24.0.7 glx-v: 1.4
    direct-render: yes renderer: Mesa Intel HD Graphics 530 (SKL GT2)
    device-ID: 8086:1912 memory: 15.13 GiB unified: yes
  API: Vulkan v: 1.3.280 layers: 1 device: 0 type: integrated-gpu name: Intel
    HD Graphics 530 (SKL GT2) driver: N/A device-ID: 8086:1912
    surfaces: xcb,xlib device: 1 type: cpu name: llvmpipe (LLVM 18.1.1 256
    bits) driver: N/A device-ID: 10005:0000 surfaces: xcb,xlib
Audio:
  Device-1: Intel 100 Series/C230 Series Family HD Audio vendor: Dell
    driver: snd_hda_intel v: kernel alternate: snd_soc_avs bus-ID: 00:1f.3
    chip-ID: 8086:a170 class-ID: 0403
  Device-2: Creative Sound Blaster Play! 3
    driver: hid-generic,snd-usb-audio,usbhid type: USB rev: 2.0 speed: 12 Mb/s
    lanes: 1 mode: 1.1 bus-ID: 1-4.1:4 chip-ID: 041e:324d class-ID: 0300
    serial: <filter>
  Device-3: Microsoft LifeCam Cinema driver: snd-usb-audio,uvcvideo
    type: USB rev: 2.0 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 1-4.3:6
    chip-ID: 045e:075d class-ID: 0102
  API: ALSA v: k6.8.9-300.fc40.x86_64 status: kernel-api
    tools: alsactl,alsamixer,amixer
  Server-1: PipeWire v: 1.0.6 status: n/a (root, process) with:
    1: pipewire-pulse status: active 2: wireplumber status: active
    3: pipewire-alsa type: plugin 4: pw-jack type: plugin
    tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Intel Ethernet I219-LM vendor: Dell driver: e1000e v: kernel
    port: N/A bus-ID: 00:1f.6 chip-ID: 8086:15b7 class-ID: 0200
  IF: enp0s31f6 state: up speed: 1000 Mbps duplex: full mac: <filter>
  Info: services: NetworkManager, sshd, wpa_supplicant
RAID:
  Hardware-1: Intel SATA Controller [RAID mode] driver: ahci v: 3.0 port: f060
    bus-ID: 00:17.0 chip-ID: 8086:2822 rev: N/A class-ID: 0104
Drives:
  Local Storage: total: 238.47 GiB used: 221.36 GiB (92.8%)
  ID-1: /dev/sda maj-min: 8:0 vendor: TeamGroup model: T253X2256G
    size: 238.47 GiB block-size: physical: 512 B logical: 512 B sata: 3.2
    speed: 6.0 Gb/s tech: SSD serial: <filter> fw-rev: 61.5 temp: 33 C
    scheme: GPT
  SMART: yes state: enabled health: PASSED on: 1y 117d 16h cycles: 83
    written: 4.1 MiB
Partition:
  ID-1: / raw-size: 237.47 GiB size: 237.41 GiB (99.97%)
    used: 221.02 GiB (93.1%) fs: xfs block-size: 512 B dev: /dev/dm-0
    maj-min: 253:0 mapped: fedora-root
  ID-2: /boot raw-size: 1024 MiB size: 960 MiB (93.75%)
    used: 347.3 MiB (36.2%) fs: xfs block-size: 512 B dev: /dev/sda2
    maj-min: 8:2
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default) zswap: no
  ID-1: swap-1 type: zram size: 8 GiB used: 0 KiB (0.0%) priority: 100
    comp: lzo-rle avail: lzo,lz4,lz4hc,842,zstd max-streams: 8 dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 40.0 C pch: 58.5 C mobo: N/A
  Fan Speeds (rpm): N/A
Info:
  Memory: total: 16 GiB available: 15.49 GiB used: 6.82 GiB (44.0%)
    igpu: 32 MiB
  Processes: 327 Power: uptime: 58m states: freeze,mem,disk suspend: deep
    avail: s2idle wakeups: 0 hibernate: platform avail: shutdown, reboot,
    suspend, test_resume image: 6.18 GiB services: org_kde_powerdevil,
    power-profiles-daemon, upowerd Init: systemd v: 255 target: graphical (5)
    default: graphical tool: systemctl
  Packages: pm: flatpak pkgs: 17 Compilers: clang: 18.1.1 gcc: 14.1.1
    Shell: Sudo (sudo) v: 1.9.15p5 default: Bash v: 5.2.26 running-in: konsole
    inxi: 3.3.34

I am on Workstation 40, using Gnome on X11.
Have been using freeCAD 21.1 appimage and no problems.
I just updated to the 21.2 appimage and it still works with no problems.

I note this on your inxi output

and on mine I see this.

  Display: x11 server: X.Org v: 1.20.14 with: Xwayland v: 23.2.6 driver: X:
    loaded: nvidia unloaded: fbdev,modesetting,nouveau,vesa
    gpu: nvidia,nvidia-nvswitch resolution: 1: 3840x2160~30Hz
    2: 1920x1080~75Hz

Just out of curiosity I switched to wayland and I see this

  Display: wayland server: X.Org v: 23.2.6 with: Xwayland v: 23.2.6
    compositor: gnome-shell driver: X: loaded: nvidia
    unloaded: fbdev,modesetting,nouveau,vesa gpu: nvidia,nvidia-nvswitch
    resolution: 1: 4096x2160~30Hz 2: 1920x1080~75Hz

Note that yours does not show a value for the Display: and mine shows the DE in use with both X11 and wayland. I suspect that solving that part may solve the issue with freeCAD.

I hit the same issue and was able to run FreeCAD using the following command:
LD_PRELOAD=/usr/lib64/libdrm_amdgpu.so.1 ./FreeCAD-0.21.2-Linux-x86_64.AppImage

This works even though my laptop has Intel graphics.

Hope this helps

I just have to ask. Why would you install an app image of something that is available from the Fedora Flatpak repo or also the rpm repo? It just seems like an invitation for grief to me. The ones in the Fedora Flatpak repo and the traditional Fedora repo are packaged with the appropriate settings for use with Fedora, which is one big step towards a good user experience. I also use FreeCad and do so with the Fedora Flatpak.

RPMs for Fedora 40 (same with 39) are not available for FreeCAD.
AppImage is the format that FreeCAD officially supports and provides, it does not provide flatpack.

Is there an official stable FreeCAD flatpack or FreeCAD + Fedora flatpack source?

If you’re using Gnome Software it can be found in Fedora Flathub selection repo and if you have the Flathub repo installed it can be found there in Beta form. AFAIK the Feora one is from the FreeCad team.

I am using nvidia for my GPU and have never had an issue with the FreeCAD appimage.

Previously freeCAD was available as rpm with f38 but they quit supporting rpm and now actually state that the appimage is the only way forward.

As I understand it, Python 3.11 is supported but Python 3.12 in fedora breaks freeCAD.
f38 initial release contained the rpm in the repo with version 0.20.2 but the current version 0.21.2 does not have an rpm available.
https://rpms.remirepo.net/rpmphp/zoom.php?rpm=freecad

Huh, that fixed it for me. Very strange!