Board index FlightGear Support Graphics

Advice on eGPU for iMac to fly FG

Graphics issues like: bad framerates, weird colors, OpenGL errors etc. Bad graphics ar usually the result of bad graphics cards or drivers.
Forum rules
In order to help you, we need to know a lot of information. Make sure to include answers to at least the following questions in your initial post.

- what OS (Windows Xp/Vista, Mac etc.) are you running?
- what FlightGear version do you use?
- what graphics card do you have?
- does the problem occur with any aircraft, at any airport?
- is there any output printed to the console (black window)?
- copy&paste your commandline (tick the "Show commandline box on the last page of FGRun or the "Others" section on the Mac launcher).
- please upload a screenshot of the problem.

If you experience FlightGear crashes, please report a bug using the issue tracker (can be also used for feature requests).
To run FlightGear on old computers with bad OpenGL support, please take a look at this wiki article. If you are seeing corrupted/broken textures, please see this article.

Note: If you did not get a reponse, even after 7 days, you may want to check out the FlightGear mailing lists to ask your question there.

Advice on eGPU for iMac to fly FG

Postby kemosabe » Tue Jun 01, 2021 5:12 am

Hi all,

I am flying FG 2020.4 on Apple 27 inch iMac Retina 5K, 2017 with 8 GB 2400MHz DDR4 and Radeon Pro 570 4GB.

With FG Forum's advice, I have used settings that do allow me to get 50 FPS. It'd be nice to see what FG can do if rendering, AI, et ., was turned on/up.

I was going to get extra RAM, but was advised that better solution might be to get an eGPU.

Would like to get advice on best eGPU for purposed stated above.

Thank you.
kemosabe
 
Posts: 38
Joined: Wed Mar 10, 2021 12:33 am

Re: Advice on eGPU for iMac to fly FG

Postby V12 » Tue Jun 01, 2021 9:05 am

RX570's performance is similar to my GTX1060, I was satisfied with this GPU. You should be able to use all eyecandies except OSM scenery at dense big cities. But this is not GPU problem, FG is very CPU bound. For decent visibility limit at 35000 feet You will need minimum 16 GB RAM.
Fly high, fly fast - fly Concorde !
V12
 
Posts: 2757
Joined: Thu Jan 12, 2017 5:27 pm
Location: LZIB
Callsign: BAWV12

Re: Advice on eGPU for iMac to fly FG

Postby vnts » Tue Jun 01, 2021 3:53 pm

kemosabe wrote in Tue Jun 01, 2021 5:12 am:With FG Forum's advice, I have used settings that do allow me to get 50 FPS. It'd be nice to see what FG can do if rendering, AI, et ., was turned on/up.

If rendering isn't turned up now as you had to turn it down to get 50 FPS, it would indicate your resolution is too high. The retina display is 5k. You should be running at 1080p (1920 by 1080) with that GPU. Laptop manufacturers tend to put screens which are just divided into a lot of pixels, as those are not too expensive to manufacture, and quoting a larger number for displays is good for sales - despite the number not being how good the laptop is at computing 3d . The GPU on laptops can often be quite slow, although yours is reasonable (in 2021 a mid-range 3050 GPU is about as fast as a 1070).

Check your resolution first. FG should roughly look like this: https://wiki.flightgear.org/Category:Sc ... h_settings . See discussion and hardware benchmark sites in https://wiki.flightgear.org/Hardware_recommendations and this guide covers enabling various rendering things: https://wiki.flightgear.org/Howto:Make_ ... nd_Daytime . If you become CPU bound (with OSM2City or whatever) then at least you can really turn up settings that place demands on GPU :mrgreen:

Kind regards
vnts
 
Posts: 409
Joined: Thu Apr 02, 2015 1:29 am

Re: Advice on eGPU for iMac to fly FG

Postby kemosabe » Tue Jun 01, 2021 4:20 pm

Thanks, vnts and V12.

So far, over a year, I have found FG to be a nice community, filled with superhelpful folks like the two of you.
kemosabe
 
Posts: 38
Joined: Wed Mar 10, 2021 12:33 am

Re: Advice on eGPU for iMac to fly FG

Postby tom_nl » Tue Jun 01, 2021 5:58 pm

For comparison, i'm running FG on a much more lower powered system - a 2014 i7 MacBook Pro with 16GB memory, and GeForce GT750M graphics, and it's driving 2x 1920x1200 and 1x1920x1080 external screens (officially not supported by the hardware. but it works fine).. I"m running openstreetmap scenery with some graphics things turned down a little and still getting reasonable frame rates (i'd estimate 20-ish) over not too densely populated scenery. Increasing the number of openscenegraph threads to 4 seemed to help with performance.

Tom
tom_nl
 
Posts: 84
Joined: Tue Aug 04, 2020 11:41 am
Location: Netherlands
OS: OS X Big Sur

Re: Advice on eGPU for iMac to fly FG

Postby V12 » Tue Jun 01, 2021 6:07 pm

How did You changed OSG thread count ?
Fly high, fly fast - fly Concorde !
V12
 
Posts: 2757
Joined: Thu Jan 12, 2017 5:27 pm
Location: LZIB
Callsign: BAWV12

Re: Advice on eGPU for iMac to fly FG

Postby tom_nl » Tue Jun 01, 2021 8:07 pm

I launch FG on the command line using a script. The key parts to use more than one thread for OpenSceneGraph are:
Code: Select all
Exec=env OSG_GL_ERROR_CHECKING=OFF  OSG_NUM_DATABASE_THREADS=4 "/Applications/Flightgear/FlightGear.app/Contents/MacOS/fgfs" \
--prop:/sim/rendering/multithreading-mode=AutomaticSelection

Then followed by any other launch options for aircraft/airport/time of day/serial in-out/custom display config etc.

I found this information somewhere on the forum or wiki, but can't for the life of me find it again.

Tom
tom_nl
 
Posts: 84
Joined: Tue Aug 04, 2020 11:41 am
Location: Netherlands
OS: OS X Big Sur

Re: Advice on eGPU for iMac to fly FG

Postby Hooray » Tue Jun 01, 2021 8:25 pm

V12 wrote in Tue Jun 01, 2021 6:07 pm:How did You changed OSG thread count ?

I found this information somewhere on the forum or wiki, but can't for the life of me find it again.


See: https://wiki.flightgear.org/Howto:Using ... er_Threads
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Advice on eGPU for iMac to fly FG

Postby tom_nl » Tue Jun 01, 2021 8:26 pm

That was it - thanks!

Tom
tom_nl
 
Posts: 84
Joined: Tue Aug 04, 2020 11:41 am
Location: Netherlands
OS: OS X Big Sur

Re: Advice on eGPU for iMac to fly FG

Postby V12 » Wed Jun 02, 2021 4:48 am

Aaa,I remember this thing, it is useless for faster rendering. This optimalization only speed up scenery loading. I made some experiments in New York, but results was not very good. OSG is bit unstable with more than 1 thread :( I had many CTDs on the Linux.
Fly high, fly fast - fly Concorde !
V12
 
Posts: 2757
Joined: Thu Jan 12, 2017 5:27 pm
Location: LZIB
Callsign: BAWV12

Re: Advice on eGPU for iMac to fly FG

Postby vnts » Wed Jun 02, 2021 4:25 pm

tom_nl wrote in Tue Jun 01, 2021 5:58 pm:Increasing the number of openscenegraph threads to 4 seemed to help with performance.

How did you find stability? This does improve loading time. I think wkitty found it unusable, and V12 found it occasionally unstable with a lot of threads - both were using recent Ryzen 8 core processors. My testing on a 4 core i5 was that 3 threads caused FG to crash when starting with the ufo, but it was more stable with 2 threads - FG only occasionally crashed in the short time I tested it. I was using DrawThreadPerContext.

Does "OSG_GL_ERROR_CHECKING=OFF" help with reducing/stopping crashes, or is that unrelated?

Kind regards
vnts
 
Posts: 409
Joined: Thu Apr 02, 2015 1:29 am

Re: Advice on eGPU for iMac to fly FG

Postby Hooray » Wed Jun 02, 2021 4:54 pm

It would be interesting to share some backtraces, so that we can take a look and try to determine what's going on.
For instance, Richard mentioned that our "autogen" (random buildings) component is interfering badly with lots of OSG threads.

Thus, if people could try to reproduce/trigger crashes by using a really simple scenario (ufo, no airport, possibly no terrain/scenery) that would be interesting.

Realistically, we can only fix the underlying issue if we understand what's happening - for instance, if massive OSG threading works all the time with random buildings disabled, that would also be good to know.
Also, if this can be reproduced without being specific to any particular aircraft or location, that would also be helpful.

Ideally, we would come up with a really simple test case (flight plan or fgtape) so that different people on different machines can try to reproduce the issue while playing with different settings.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Advice on eGPU for iMac to fly FG

Postby tom_nl » Wed Jun 02, 2021 6:45 pm

vnts wrote in Wed Jun 02, 2021 4:25 pm:How did you find stability? This does improve loading time. I think wkitty found it unusable, and V12 found it occasionally unstable with a lot of threads.....Does "OSG_GL_ERROR_CHECKING=OFF" help with reducing/stopping crashes, or is that unrelated?

As mentioned i'm on a mid-2014 15" MacBook Pro running the latest version of Big Sur. This has a 4 (physical) core 2.5GHz Haswell i7 and 16GB RAM, plus the 2GB GT750M. I'm using the 2020.4.0 nightly release. It seems to be rock solid with 4 threads and automatic selection - I don't think it's ever crashed! Never tried more threads as then i'd be into multithreading on the cores. I've flown with the Cessna 172 and K21 using this setup

The "OSG_GL_ERROR_CHECKING=OFF" was more to suppress a load of OpenGL warnings/errors in the console that were rather annoying, especially when debugging other things (mainly arduino serial in/out for my panel).

Tom
tom_nl
 
Posts: 84
Joined: Tue Aug 04, 2020 11:41 am
Location: Netherlands
OS: OS X Big Sur

Re: Advice on eGPU for iMac to fly FG

Postby vnts » Thu Jun 03, 2021 2:54 pm

Hooray wrote in Wed Jun 02, 2021 4:54 pm:It would be interesting to share some backtraces, so that we can take a look and try to determine what's going on.
For instance, Richard mentioned that our "autogen" (random buildings) component is interfering badly with lots of OSG threads.

The new sentry system will upload small memory dumps and produces backtraces (using the pdb on Windows nightly builds). The issue is the fact that OSG_NUM_DATABASE_THREADS was turned up may not be immediately visible.

tom_nl wrote in Wed Jun 02, 2021 6:45 pm:I'm using the 2020.4.0 nightly release. It seems to be rock solid with 4 threads and automatic selection - I don't think it's ever crashed! Never tried more threads as then i'd be into multithreading on the cores. I've flown with the Cessna 172 and K21 using this setup

The "OSG_GL_ERROR_CHECKING=OFF" was more to suppress a load of OpenGL warnings/errors in the console that were rather annoying, especially when debugging other things (mainly arduino serial in/out for my panel).

I tried it with the latest Windows nightly and a very slightly older nightly, and OSG_NUM_DATABASE_THREADS=3. I found the C172P reliably crashes spawning at the runway. The test settings: scenery features/layers on, OSM2City buildings, shaders = max, vegetation = very high, Ai traffic = off. It starts fine with 2 threads.

There has been some work towards making the property tree thread safe with locking (experimental, increases the CPu boundness of FG slightly). Maybe it made FG a bit less crashy on some systems when running lots of DB threads?. The default on the next branch seems to be
--prop:bool:/sim/property-locking=true
--prop:bool:/sim/property-locking-timing=false

For the test I set property-locking to off. It also crashed when I tested once or twice with both set to true.

On nightlies, using the latest pdb file at download.flightgear.org, and using the same process as earlier for trying to find the cause of a hang using windbg call stack: https://pastebin.com/FVWkthet

Kind regards
vnts
 
Posts: 409
Joined: Thu Apr 02, 2015 1:29 am

Re: Advice on eGPU for iMac to fly FG

Postby wkitty42 » Thu Jun 03, 2021 10:41 pm

vnts wrote in Wed Jun 02, 2021 4:25 pm:I think wkitty found it unusable

i did but only with certain counts... i also don't recall ATM which of my PCs i was testing on at the time... my current gaming system runs FG with:
Code: Select all
#!/bin/bash

export QT_AUTO_SCREEN_SCALE_FACTOR=1
export OSG_NUM_DATABASE_THREADS=8
export OSG_OPTIMIZER=REMOVE_REDUNDANT_NODES
export OSG_NUM_HTTP_DATABASE_THREADS=8
export OSG_GL_TEXTURE_STORAGE=on
export OSG_COMPILE_CONTEXTS=on

~/fg/next/run_fgfs.sh --launcher --config=/home/myuser/myfg/fg-075km-horizon.rc $@ |& tee ~/myfg/fgfs-next-$(date '+%Y%m%d%H%M').log
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9148
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04


Return to Graphics

Who is online

Users browsing this forum: No registered users and 7 guests