Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

X-Plane in headless mode saving GPU power? #1

Open
opt12 opened this issue Apr 29, 2019 · 2 comments
Open

X-Plane in headless mode saving GPU power? #1

opt12 opened this issue Apr 29, 2019 · 2 comments
Labels
question Further information is requested

Comments

@opt12
Copy link

opt12 commented Apr 29, 2019

Hello adderbyte,
very interesting work! I'm really curious to try out your GYM environment as I'm about to code something very similar.

I just wonder, whether using X-Plane in headless mode really saves any GPU resources. As far as I understood, X-Plane still renders the entire scene, but instead of displaying it, it just dumps the graphics to /dev/null. Is that understanding correct?
Thanks a lot,
Felix

@adderbyte
Copy link
Owner

adderbyte commented May 1, 2019

Hi opt12,
Thanks for the feedback !

Yes you are right. I ought to have mentioned the changes to be made in XPlane settings before launching in headless mode (it is these settings that might help save GPU resources). Headless mode is just to launch XPlane from a docker or other terminals (amazon cloud for example) without display (which might be needed when launching different models or agents in parallel).

To save GPU resources, the graphics settings in XPlane might help. This improves the frame rate which is important for the simulation and reduce GPU resource usage. The following are the settings changes made before launching the headless mode:

  • navigate to settings then choose graphics (Settings -> Graphics):

Change the visual effects and other parameters under this : (I select this to be minimal):

illustartion2

Change the monitor Usage (Under monitor configuration) to 2D panel only:
illustration

On selecting the 2D panel only, the graphics rendering is reduced to a black display (for Cessna aircraft --as shown below) improving frame rate from 19 /sec to ~60 /sec which helps the simulation run faster while consuming less GPU resources :

2DPanel

Use the map icon in the 2D panel only to view progression of the aircraft

aircraft

  • Make sure to disable Display main menu on startup option ( under settings -> General settings) before launching in headless mode
  • After the above changes are made, then launch in headless mode. Note that in this case there would be no display at all and no map to check the progression of the aircraft.
  • Use the headless mode when launching in cloud (or other terminals without display) or after you have verified all settings are correct and you need the agent to train for long period.

XPlane saves these settings in its Preferences and makes sure it is same when launched in headless mode.

Hope this helps !
Please do let me know if there is any other thing I could add or elaborate more.

Best Regards.

@adderbyte adderbyte added help wanted Extra attention is needed question Further information is requested and removed help wanted Extra attention is needed labels Dec 26, 2019
@chnclsr
Copy link

chnclsr commented Jun 9, 2023

you can use vglrun to visualize with GPU.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants