Board index FlightGear Support Graphics

FG not using GPU with jsbsim aircraft?  Topic is solved

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.

FG not using GPU with jsbsim aircraft?

Postby owenpsmith » Wed Jan 26, 2022 11:12 pm

A few days ago I suddenly started getting only 1fps when using the Cessna 172 (jsbsim), even before starting the engine. I tried my Canadair Tutor model (work in progress) which I had just started migrating from yasim to jsbsim, same issue. I fired up my yasim Tutor and got my usual 30-40fps. I tested a few aircraft and summary is below:

jsbsim aircraft, 1fps for all
  • Cessna 172
  • Canadair Tutor
  • DHC-2 Beaver

yasim aircraft, 30-40 fps for all
  • Canadair Tutor
  • Bristol Freighter
  • Ford Trimotor

I also go 30-40 fps with the UFO

Looking at the resource usage, I see that it is using 75% GPU with yasim aircraft, but only 0-5% GPU with jsbsim aircraft.

I encountered the problem on FG 2020.3.6 but have upgraded to 2020.3.11 and get the same issue.

I don't recall changing and settings in FG or the OS, but Windows may have changed something during an update.

Environment:
  • Asus ROG G752VY laptop
  • Intel iCore i7-6700HQ 2.6GHz
  • Windows 10 64-bit
  • 32Gb RAM
  • NVIDIA GeForce GTX 980 4Gb

Does anyone have any suggestions to correct this issue?

Thanks,

Owen.
Aircraft: Bristol Freighter Mk.31, Canadair CL-41 Tutor

Learn from the mistakes of others, only in FlightGear will you live long enough to make them all yourself.
owenpsmith
 
Posts: 86
Joined: Wed Jan 13, 2010 2:26 am
Location: Port Coquitlam, BC, Canada
Version: 2020.3.11
OS: Windows 10

Re: FG not using GPU with jsbsim aircraft?

Postby ludomotico » Thu Jan 27, 2022 1:21 am

Your laptop probably has two videocards: an integrated video card, which is used to save power when you are not playing games, and the dedicated NVIDIA GeForce video card. By default, Windows chooses one video card or the other based on some internal magic, such as if you are using the batteries or not.

It seems that, for some reason I can't explain, your Windows chooses the integrated video card for some of your aircraft, and the NVIDIA video card for some others. The developers could look into this, but fortunately there is a much easier fix: configure the system to always use the NVIDIA video card while running FlightGear. You can do this in Windows Settings or the NVIDIA control panel. Check: https://www.getdroidtips.com/force-app- ... -graphics/
User avatar
ludomotico
 
Posts: 1269
Joined: Tue Apr 24, 2012 2:01 pm
Version: nightly
OS: Windows 10

Re: FG not using GPU with jsbsim aircraft?

Postby owenpsmith » Thu Jan 27, 2022 1:37 am

Thanks ludomotico, however I believe I only have the one card on this machine, and yes my battery sucks all the time.

Under Device Manager->Display Adapters, it only lists "NVIDIA GeForce GTX 980M".

Here is a paste of the info from Flightgear Help->About to confirm it is using the NVIDIA card:

/sim/version/flightgear: 2020.3.11
/sim/version/simgear: 2020.3.11
/sim/version/openscenegraph: 3.4.2
/sim/version/build-id: 320
/sim/version/build-number: 320
/sim/version/build-type: Release
/sim/version/revision: c060800fed65ce9502a9dfad46cccf59c941362b
/sim/rendering/gl-vendor: NVIDIA Corporation
/sim/rendering/gl-renderer: GeForce GTX 980M/PCIe/SSE2
/sim/rendering/gl-version: 4.6.0 NVIDIA 419.35
/sim/rendering/gl-shading-language-version: 4.60 NVIDIA
/sim/rendering/max-texture-size: 16384
/sim/rendering/depth-buffer-bits: 24
Aircraft: Bristol Freighter Mk.31, Canadair CL-41 Tutor

Learn from the mistakes of others, only in FlightGear will you live long enough to make them all yourself.
owenpsmith
 
Posts: 86
Joined: Wed Jan 13, 2010 2:26 am
Location: Port Coquitlam, BC, Canada
Version: 2020.3.11
OS: Windows 10

Re: FG not using GPU with jsbsim aircraft?

Postby wkitty42 » Thu Jan 27, 2022 12:31 pm

check to see if you have the latest NVIDIA video drivers for that card... the 419 series is a tad long in the tooth... i run the 460 series up to the 490 series on my linux systems depending on what i'm doing...
"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

Re: FG not using GPU with jsbsim aircraft?

Postby owenpsmith » Thu Jan 27, 2022 6:14 pm

Thanks wkitty42, I have apparently been neglecting to keep my drivers up to date, however I am still having the same issues after upgrading:

/sim/version/flightgear: 2020.3.11
/sim/version/simgear: 2020.3.11
/sim/version/openscenegraph: 3.4.2
/sim/version/build-id: 320
/sim/version/build-number: 320
/sim/version/build-type: Release
/sim/version/revision: c060800fed65ce9502a9dfad46cccf59c941362b
/sim/rendering/gl-vendor: NVIDIA Corporation
/sim/rendering/gl-renderer: NVIDIA GeForce GTX 980M/PCIe/SSE2
/sim/rendering/gl-version: 4.6.0 NVIDIA 511.23
/sim/rendering/gl-shading-language-version: 4.60 NVIDIA
/sim/rendering/max-texture-size: 16384
/sim/rendering/depth-buffer-bits: 24

It puzzles me that the graphics are affected by the FDM in use, and I thought it could be a coincidence with some other factor, however if I run the Tutor with each FDM in the same environment with the same settings I get the problem with jsbsim but not yasim. Absolutely everything else is the same in both scenarios.

Thanks,

Owen.
Aircraft: Bristol Freighter Mk.31, Canadair CL-41 Tutor

Learn from the mistakes of others, only in FlightGear will you live long enough to make them all yourself.
owenpsmith
 
Posts: 86
Joined: Wed Jan 13, 2010 2:26 am
Location: Port Coquitlam, BC, Canada
Version: 2020.3.11
OS: Windows 10

Re: FG not using GPU with jsbsim aircraft?

Postby wkitty42 » Thu Jan 27, 2022 9:52 pm

are you building your FG on your system or are you using the latest release binaries?
the reason i ask is because your OSG is showing as v3.4.2 instead of a newer version... my own linux build is using self-built OSG 3.6.5...
i'm not saying that OSG may be part of the problem you are seeing, though...

my build of this morning (which brought me the new marker pins feature):
Code: Select all
********** 2022-01-27 07:29:57 -0500 **********
********** Total elapsed update and compile time is 0 days 0 hours 0 minutes 52 seconds **********

OSG 3.6: 06558a5dda9b5fc35a80336477157431cfacd028
Simgear: 76f1ffa26997800506c96bba918b889d373efd23
FGFS   : fe8b7bea2129647148896846b360683c7acd09dd
FGData : 2d17217a019c6aa8192e189374ee30c83d8a4714
"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

Re: FG not using GPU with jsbsim aircraft?

Postby owenpsmith » Thu Jan 27, 2022 11:53 pm

I'm using the latest release binaries for FG 2020.3.11, which contains osgPlugins-3.4.2.

Looking back at my previous installed releases, 2020.3.6 used osgPlugins-3.4.2 as well, and 2017.2.1 used osgPlugins-3.4.0.

So it seems the latest installer is not using the latest OSG?

According the to the OSG wiki page, 3.4.1 came out in Aug 2017, and 3.6.5 came out in Jan 2020, so FG is about two years behind currently.

I've never compiled FG myself, I leave that to the core developers. I am just a lowly aircraft developer :roll:

Owen.
Aircraft: Bristol Freighter Mk.31, Canadair CL-41 Tutor

Learn from the mistakes of others, only in FlightGear will you live long enough to make them all yourself.
owenpsmith
 
Posts: 86
Joined: Wed Jan 13, 2010 2:26 am
Location: Port Coquitlam, BC, Canada
Version: 2020.3.11
OS: Windows 10

Re: FG not using GPU with jsbsim aircraft?

Postby WoodSTokk » Fri Jan 28, 2022 12:06 am

owenpsmith wrote in Thu Jan 27, 2022 11:53 pm:According the to the OSG wiki page, 3.4.1 came out in Aug 2017, and 3.6.5 came out in Jan 2020, so FG is about two years behind currently.


No, its all correct. Up to FG 2020.3.x we use OSG 3.4.x. In newer OSG there are some function changed and this lead to broken effects.
Started with FG 2020.4 (aka next) the problem are solved so we use OSG 3.6.5 now.
But OSG should not be the problem. Im on Linux and have 2020.3.6 and 2020.4 and dont have the problems you are describing.
WoodSTokk
 
Posts: 1077
Joined: Tue Oct 17, 2017 3:30 pm
Location: Milky Way/Sol/Earth/Europe
Callsign: SX-W57
IRC name: WoodSTokk
Version: 2020.4.0
OS: Debian Bullseye

Re: FG not using GPU with jsbsim aircraft?

Postby wkitty42 » Fri Jan 28, 2022 11:05 am

FWIW: i thought jenkins was now building nightlies with newer OSG than 3.4.2... i know james has a 3.4.2 that he patched and is used somewhere... but i really thought, without digging back through mailing list posts and commit logs, that jenkins was building with OSG newer than 3.4.2 within the last year... it might have been done and then switched back for some reason i don't recall ATM...
"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

Re: FG not using GPU with jsbsim aircraft?

Postby V12 » Fri Jan 28, 2022 1:30 pm

Gentlemans, OP said that JSBSIM Canadair Tutor has 1 fps, YASIM Canadair Tutor has 30 fps. How can in both cases installed same OSG or GPU driver drastically affect framerate ?
IMHO, problem is somewhere in the JSBSIM libs, I recommend full reinstall FGFS.
Fly high, fly fast - fly Concorde !
V12
 
Posts: 2757
Joined: Thu Jan 12, 2017 5:27 pm
Location: LZIB
Callsign: BAWV12

Re: FG not using GPU with jsbsim aircraft?

Postby wkitty42 » Fri Jan 28, 2022 6:44 pm

i fail to see how a reinstall putting the exact same code back in place can be a fix...
"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

Re: FG not using GPU with jsbsim aircraft?

Postby V12 » Sat Jan 29, 2022 6:31 am

I many times solved problem with reinstall.
Fly high, fly fast - fly Concorde !
V12
 
Posts: 2757
Joined: Thu Jan 12, 2017 5:27 pm
Location: LZIB
Callsign: BAWV12

Re: FG not using GPU with jsbsim aircraft?

Postby Thorsten » Sat Jan 29, 2022 7:36 am

Gentlemans, OP said that JSBSIM Canadair Tutor has 1 fps, YASIM Canadair Tutor has 30 fps. How can in both cases installed same OSG or GPU driver drastically affect framerate ?
IMHO, problem is somewhere in the JSBSIM libs, I recommend full reinstall FGFS.


Well, let's put it bluntly, you're going to have a hard time convincing anyone of a theory that blames JSBSim for a rendering issue - for the simple reason that JSBSim doesn't do any rendering, doesn't call any rendering routines and... doesn't even know that rendering exists (you can run JSBSim as standalone simulation framework using the same libs).

So nobody of the JSBSim developers is going to investigate rendering issues inside JSBSIm - because conceptually they can't exist (and, well, aren't seen by anyone else).

Thus eliminating the impossible, we can deduce that what remains, no matter how far-fetched, must contain the truth of the affair.

Now, it often is the case that

a) aircraft have vastly different complexity
b) complex aircraft tend to use JSBSim for FDM and systems because it actually allows complexity whereas YaSim kind of limits it
c) aircraft which get the care to have complex FDMs often also get care with effects and rendering

Of the list in the initial post, I'm only familiar with two craft - the C-172p and the Bristol Freighter, but they show the expected vast difference in complexity. The Bristol Freighter is a straightforward YaSim model with a 3d model an no fancy anything, the C-172p is a top of the line aircraft maintained by a team which makes sure it has all the latest and greatest - like damage simulation, different configurations, detailed glass reflections, lightmaps,...

So there's several reasons why these two craft should show drastic framerate differences. I'm also betting that the Space Shuttle will render slowly - but I'm fairly sure that has little to do with JSBSim as such either and mostly is the systems simulation.

Now - what about the same craft in Ya vs. JSBSim? I'm not familiar with the example, but often an aircraft is started in YaSim and when somebody decides to really work it out it is ported to JSBSim - it so happened with the F-14b which grew a lot in systems and damage complexity when Richard made a JSBSim version.

So likely that is what we're seeing here - the system can handle average aircraft fine, but top of the line craft are too much.

(P.S.: The plural of 'gentleman' is 'gentlemen' - the phrase 'ladies and gentlemen' is actually very common and worth memorizing)
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: FG not using GPU with jsbsim aircraft?

Postby V12 » Sat Jan 29, 2022 9:56 am

OP said :
"few days ago I suddenly started getting only 1fps when using the Cessna 172 (jsbsim), "

It is evidence, that something in his system has been badly changed few days ago. If JSBSIM C172 is terrible slow, JSBSIM Canadair Tutor is terrible slow, but YASIM Canadair Tutor is OK, then problem is somewhere in the JSBSIM. Solution is reinstall FGFS. Or delete all saved config files and test again.

On my system is C172 OK.

And thank You for the grammar minilesson.
Fly high, fly fast - fly Concorde !
V12
 
Posts: 2757
Joined: Thu Jan 12, 2017 5:27 pm
Location: LZIB
Callsign: BAWV12

Re: FG not using GPU with jsbsim aircraft?

Postby Thorsten » Sat Jan 29, 2022 1:03 pm

I don't necessarily disagree with the idea to reinstall everything, merely with the analysis of a fault inside the JSBSim lib.

"few days ago I suddenly started getting only 1fps when using the Cessna 172 (jsbsim), "


From hundreds of debug conversations I know the exchange

"What did you change?"
"Nothing, it suddenly stopped."

which turns out to be wrong in the end 99.9% of times. Rarely HW faults occur suddenly, but otherwise something always changes. A new driver, a new version of the aircraft or FG, a new config in the OS,...

So debug-wise it's a zero-information-content statement, it means just that the OP doesn't know what changed. I do not expect the C-172p to have the same framerate as the Bristol Freighter, it uses different effects and all, so there's lots of explanations to be sought outside JSBSim.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Next

Return to Graphics

Who is online

Users browsing this forum: No registered users and 6 guests