Board index FlightGear Support Graphics

Lag Spiking in Flightgear

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.

Lag Spiking in Flightgear

Postby reece0306 » Sun Oct 18, 2020 6:21 pm

I am having an issue with my Flightgear when you move around the cockpit, the frame rate drops. I am running Windows 10 64bit. I was using 2018.3.6 Flightgear version, my graphics card is an NVIDIA GeForce 930M with Intel HD Graphics 5500. Is there any way to fix this? My graphics settings are already at the lowest in the sim.
reece0306
 
Posts: 13
Joined: Tue Apr 16, 2019 5:05 pm

Re: Lag Spiking in Flightgear

Postby wkitty42 » Sun Oct 18, 2020 6:28 pm

which craft? some are quite detailed and do consume FPS at times...
"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: 9149
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: Lag Spiking in Flightgear

Postby legoboyvdlp » Sun Oct 18, 2020 7:30 pm

Make sure you are in fact using the Nividia, not the Intel graphics card.
User avatar
legoboyvdlp
 
Posts: 7981
Joined: Sat Jul 26, 2014 2:28 am
Location: Northern Ireland
Callsign: G-LEGO
Version: next
OS: Windows 10 HP

Re: Lag Spiking in Flightgear

Postby reece0306 » Mon Oct 19, 2020 6:01 am

I was setting FlightGear to use NVIDIA Graphics.
reece0306
 
Posts: 13
Joined: Tue Apr 16, 2019 5:05 pm

Re: Lag Spiking in Flightgear

Postby Parnikkapore » Tue Oct 20, 2020 12:13 am

I'm on Intel graphics, but I have similar lag spikes when turning around too. You can reproduce by turning the camera around once right after opening the simulator.

Subsequent camera turns don't result in lag though, so maybe the lag is caused by the scenery loading process?
There are free alternatives to (almost) every program you encounter. You just have to find them.
Parnikkapore
 
Posts: 929
Joined: Thu Oct 29, 2015 11:16 am
Callsign: HS-FGS
Version: next
OS: Kubuntu

Re: Lag Spiking in Flightgear

Postby wkitty42 » Tue Oct 20, 2020 12:50 am

yes, this ^^^^^

i generally wait several minutes when i load FG before i start doing much of anything... especially if i have AI enabled... loading 200000+ flights takes a while... at some point, i generally switch views and look around... then i go back to my standard view and start my workflow in my craft...
"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: 9149
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: Lag Spiking in Flightgear

Postby Johan G » Tue Oct 20, 2020 1:16 am

wkitty42 wrote in Tue Oct 20, 2020 12:50 am:a[...] at some point, i generally switch views and look around... then i go back to my standard view and start my workflow in my craft...

That is a tip I have seen now and then over the years.

Another tip I have seen to remove some lag spikes is to throttle the fps in the rendering options dialog.
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Some YouTube videos
Johan G
Moderator
 
Posts: 6629
Joined: Fri Aug 06, 2010 6:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 2020.3.4
OS: Windows 10, 64 bit

Re: Lag Spiking in Flightgear

Postby wkitty42 » Tue Oct 20, 2020 2:00 pm

throttling the FPS to the vertical sync is possible and valid if your GPU achieves 60 FPS to start with... if it cannot, throttling won't do any good at all ;)
"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: 9149
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: Lag Spiking in Flightgear

Postby Johan G » Tue Oct 20, 2020 5:41 pm

What it throttling at say 25 or even 15 fps?
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Some YouTube videos
Johan G
Moderator
 
Posts: 6629
Joined: Fri Aug 06, 2010 6:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 2020.3.4
OS: Windows 10, 64 bit

Re: Lag Spiking in Flightgear

Postby wkitty42 » Tue Oct 20, 2020 6:24 pm

i'm only aware of throttling to vertical sync... not sure i've seen actual numbers being given...

so if a monitor's vertical sync is at 60Hz, 60FPS is max... if the vsync is 70Hz, then 70FPS is the max...

i think i got that right... today's monitors are a little different than the CRTs of yesteryear...
"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: 9149
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: Lag Spiking in Flightgear

Postby Parnikkapore » Wed Oct 21, 2020 12:18 am

My "startup routine" is to turn around in cockpit view, go to helicopter view, turn around there, then go back to cockpit view.
There are free alternatives to (almost) every program you encounter. You just have to find them.
Parnikkapore
 
Posts: 929
Joined: Thu Oct 29, 2015 11:16 am
Callsign: HS-FGS
Version: next
OS: Kubuntu

Re: Lag Spiking in Flightgear

Postby V12 » Wed Oct 21, 2020 4:08 am

I looked around in the cockpit, in my case that helped much.
There is not very well documented trick with OSG parameter OSG_NUM_DATABASE_THREADS, specialy on modern 4 and more core CPU. In windows use this environmental parameter with
SET OSG_NUM_DATABASE_THREADS=X
on Linux
EXPORT OSG_NUM_DATABASE_THREADS=X
where X is thread count. I tested with X between 2 and 16, best result for my 8 core CPU was 6. It removed almost all stuttering on scenery load.
Fly high, fly fast - fly Concorde !
V12
 
Posts: 2757
Joined: Thu Jan 12, 2017 5:27 pm
Location: LZIB
Callsign: BAWV12

Re: Lag Spiking in Flightgear

Postby Husky Dynamics » Thu Oct 22, 2020 6:47 am

^^ Details on how to do this?

Also, I typically look around in the cockpit first, then swap to helicopter or model view and do a 360 degree pan, then toggle through all the other views (some of which lag quite a bit themselves, *cough cough* 707 engineering panel)
Get my custom FG liveries here: https://flightgearhusky.altervista.org/

I'm off at college so I've stopped making liveries (for the time being, at least), but I'm continuing to ensure compatibility for the ones I've already published.
User avatar
Husky Dynamics
 
Posts: 143
Joined: Mon Oct 12, 2020 10:33 pm
Location: United States
Version: LTS
OS: Windows 10

Re: Lag Spiking in Flightgear

Postby V12 » Thu Oct 22, 2020 7:57 am

Set environment variable. That is all.
In windows - right mouse on This computer, Properties, Advanced properties (I'm not sure, I have not EN Win), then click on Environment variables, add new OSG_NUM_DATABASE_THREADS
In Linux I tested it from console :
EXPORT OSG_NUM_DATABASE_THREADS=X
fgfs --launcher
Fly high, fly fast - fly Concorde !
V12
 
Posts: 2757
Joined: Thu Jan 12, 2017 5:27 pm
Location: LZIB
Callsign: BAWV12

Re: Lag Spiking in Flightgear

Postby wkitty42 » Thu Oct 22, 2020 3:36 pm

you really only need to set it in the one session running FG, not the entire system ;)
"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: 9149
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Next

Return to Graphics

Who is online

Users browsing this forum: No registered users and 2 guests