[linux] launch without gpu possible? - extreme lag on radeon

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
gyrfalconsfisherman
Posts: 10
Joined: Mon Dec 06, 2021 11:35 pm

[linux] launch without gpu possible? - extreme lag on radeon

Post by gyrfalconsfisherman »

I'm on arch linux and if I use the appimage or freecad-git from the AUR then any sketch operations are extremely slow/laggy, like 0.1fps looking like it.

I have a HD7790 running on radeon (because amdgpu won't display) - so I think it's to blame, if I try to run it in a VM that doesn't have a real GPU or I run freecad inside a docker container with X11 from my host, it all works fine.

I have noticed the docker container doesn't have access to the gpu either since I didn't pass it through, if I do pass it - then the lag fest starts..

is there a way to launch the appimage without gpu access? or is this a known issue and has a fix?

Thanks in advance for any ideas!! :)
TheMarkster
Veteran
Posts: 5505
Joined: Thu Apr 05, 2018 1:53 am

Re: [linux] launch without gpu possible? - extreme lag on radeon

Post by TheMarkster »

I don't know if it will help or not, but you could try changing these settings.
Snip macro screenshot-d5821a.png
Snip macro screenshot-d5821a.png (74.9 KiB) Viewed 2510 times
gyrfalconsfisherman
Posts: 10
Joined: Mon Dec 06, 2021 11:35 pm

Re: [linux] launch without gpu possible? - extreme lag on radeon

Post by gyrfalconsfisherman »

That sounded extremely promising, thanks! alas, toggling these options on/off and saving / restarting, didn't do anything sadly, the lag is still there - and comparing it to inside docker - it didn't have neither of these ticked.
User avatar
onekk
Veteran
Posts: 6098
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: [linux] launch without gpu possible? - extreme lag on radeon

Post by onekk »

For many aspects you could launch FreeCAD use a script and obtain a FCstd file or a DXF file or a STl file, without user intervention, and no "visual output", in other word no use of GUI at all.

But obviously you have to be aware of some aspect of FreeCAD scripting to avoid invoking the GUI maybe calling some "commands" instead of using Python methods.

Regards

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
gyrfalconsfisherman
Posts: 10
Joined: Mon Dec 06, 2021 11:35 pm

Re: [linux] launch without gpu possible? - extreme lag on radeon

Post by gyrfalconsfisherman »

Thanks but I didn't mean to use freecad headless, but intead just make it work on my system without lag :) and I assume it is lagging because it has access to my GPU or radeon is somehow bugging it.
User avatar
onekk
Veteran
Posts: 6098
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: [linux] launch without gpu possible? - extreme lag on radeon

Post by onekk »

Yes but you are trying to use FreeCAD in a VM that is not the fastest way to do things, expecially if the VM is not "taylored for speed" and is doing many "graphics emulations" that are notably consume some if not many horsepower.

I'm using FreeCAD on a i3 2100 that is not very "young" using processor internal GPU, so not a "graphic workstation" and FreeCAD is useable.

Said so I'm not an expert of VM so maybe some more information are needed to try to guess what is going wrong, as maybe some settings on your machine are the culprit.

I think that even some expert are in need of more "detailed" information about your installation, and maybe some sort of:

MWE Minimal Working Example that show the problem, you could not force developers to download heavy files only to catch a "bad described bug".

Not to criticize, only to gave some advice that maybe will permit to find a solution to your problem.

Remember that here, no one is payed to make "assistance" we are all "users willing to help other users".

Regards

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
wmayer
Founder
Posts: 20202
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: [linux] launch without gpu possible? - extreme lag on radeon

Post by wmayer »

Yes but you are trying to use FreeCAD in a VM that is not the fastest way to do things, expecially if the VM is not "taylored for speed" and is doing many "graphics emulations" that are notably consume some if not many horsepower.
As far a I understand it the problem is the other way around. When running FreeCAD inside the VM the speed is acceptable while when running it natively things are extremely slow.
gyrfalconsfisherman wrote: Mon Dec 06, 2021 11:45 pm I'm on arch linux and if I use the appimage or freecad-git from the AUR then any sketch operations are extremely slow/laggy, like 0.1fps looking like it.
Is this only the case for editing sketches or do you have a general problem where rendering is very slow? How do other OpenGL-based applications behave, e.g. Blender?
I have a HD7790 running on radeon (because amdgpu won't display) - so I think it's to blame,
Is there a driver update available that you could install?
User avatar
onekk
Veteran
Posts: 6098
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: [linux] launch without gpu possible? - extreme lag on radeon

Post by onekk »

gyrfalconsfisherman wrote: Mon Dec 06, 2021 11:45 pm I'm on arch linux and if I use the appimage or freecad-git from the AUR then any sketch operations are extremely slow/laggy, like 0.1fps looking like it.
I'm on Arch Linux too, using the stock FreeCAD AppImage with and i3-2110 with the internal GPU and there is no lags, or at least not in normal use, I use mostly scripting.

Maybe some settings are wrong in the libraries, so try to use other OpenGl programs.

What WM are you using, and display driver is also important, maybe automatic install will detect the "wrong GPU" in other word you are using a "discrete card" but you have also the "internal chipset GPU" and for some reason driver for the "discrete card" are not installed, so the driver is using framebuffer or VESA emulation and things are very slow for this reason.

Here my FreeCAD info, note that ArtixLinux is "Arch Linux without systemd", so a part for the init system libraries are the same as Arch Linux.

OS: Artix Linux (openbox)
Word size of FreeCAD: 64-bit
Version: 0.20.26498 (Git) AppImage
Build type: Release
Branch: (HEAD detached at 1895593)
Hash: 18955931c7f0926a4cd9d2719be5a433b49ae56e
Python version: 3.9.7
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.3
Locale: Italian/Italy (it_IT)

This is the output of:

Code: Select all

inxi -G
Inxi is a command line utility that show some system info data, I hope that if you will run this command in the VM you will obtain some data about the "emulated Graphics Card" that "is running" on the VM, maybe this will help to sort out were the problem is generated.


Graphics:
Device-1: Intel 2nd Generation Core Processor Family Integrated Graphics
driver: i915 v: kernel
Display: x11 server: X.Org 1.21.1.1 driver: loaded: modesetting
unloaded: vesa resolution: 1920x1080~60Hz
OpenGL: renderer: Mesa DRI Intel HD Graphics 2000 (SNB GT1)
v: 3.3 Mesa 21.2.5



Hope it helps.

Regards

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
gyrfalconsfisherman
Posts: 10
Joined: Mon Dec 06, 2021 11:35 pm

Re: [linux] launch without gpu possible? - extreme lag on radeon

Post by gyrfalconsfisherman »

wmayer wrote: Thu Dec 09, 2021 5:51 am As far a I understand it the problem is the other way around. When running FreeCAD inside the VM the speed is acceptable while when running it natively things are extremely slow.
this is correct, thank you
wmayer wrote: Thu Dec 09, 2021 5:51 am Is this only the case for editing sketches or do you have a general problem where rendering is very slow? How do other OpenGL-based applications behave, e.g. Blender?
blender works extremely smooth and no issues, though not sure what other applications use openGL to try out
wmayer wrote: Thu Dec 09, 2021 5:51 am Is there a driver update available that you could install?
I update every day automatically, so if there was one, I am on it right now.
onekk wrote: Thu Dec 09, 2021 8:05 am What WM are you using, and display driver is also important, maybe automatic install will detect the "wrong GPU" in other word you are using a "discrete card" but you have also the "internal chipset GPU" and for some reason driver for the "discrete card" are not installed, so the driver is using framebuffer or VESA emulation and things are very slow for this reason.
I use cinnamon and I do have two GPUs, but not an iGPU:
- RX590 (which isn't allowed to auto-detect via xorg config - I verified the gpu isn't used by anything either)
- HD7790 (the one that my host uses for everything)

If there's some debug info I can provide from freecad, please tell me and I'll attach it, I've ran it from terminal and it didn't say anything at all, unless the GPU's were missing like in the VM or docker.

Thanks!
gyrfalconsfisherman
Posts: 10
Joined: Mon Dec 06, 2021 11:35 pm

Re: [linux] launch without gpu possible? - extreme lag on radeon

Post by gyrfalconsfisherman »

Also worth noting, the appimage is throwing this in terminal if I try to run it now: https://github.com/FreeCAD/FreeCAD-Bundle/issues/67
Post Reply