Board index FlightGear Support Graphics

External Monitor

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.

External Monitor

Postby NeoMemory » Mon Dec 13, 2021 7:12 am

I have an external monitor and an NVIDIA RTX 2060. Every time I run the game it appears on my laptop monitor. I have checked the NVIDIA Control Panel and there is no way to specify which app runs on which monitor. I am launching the game with these options:
--launcher --enable-terrasync

I don't think taking a screenshot would help resolve this. Any help would be greatly appreciated.

Thanks
Dawson M. Schaffer
NeoMemory
 
Posts: 2
Joined: Mon Dec 13, 2021 6:58 am

Re: External Monitor

Postby wkitty42 » Mon Dec 13, 2021 2:13 pm

i'm not sure how FG determines which monitor to appear on... i have two monitors here, too... one is a 4K while the other is a 1080... i'm on a desktop PC running linux...

when i first set things up, i had only the 4k (using the displayport connector) so the system saw it as the first and only monitor (monitor0 or display0 on DP-0)... then i added the 1080 as the second monitor using HDMI (monitor1 or display1 on HDMI-0 i think! i'm not sure how they are being numbered and referenced in my OS' configuration... it is another alien world inside my system that i have yet to delve into)... as it was, everything still loaded up on the 4K since it was the primary monitor but i need that for monitoring and control so most things like games and the FG simulator :!: need to be loading on the 1080 instead... what i ended up doing was to configure my X system (remember i'm on linux) so that the 1080 was the primary monitor by ticking the box for it that says "make this the primary monitor"... most all of my games and applications started loading on it with no further ado other than maybe needing to be resized to fit on the 1080 screen... FG, on the other hand, needed some poking, prodding, and a bit of hammering... i don't know if this is the proper way of doing this but it is how i did it...

my physical monitor layout is with the 4K on the left and the 1080 on the right... both are 28inch (71.12cm) monitors of equal height... my virtual screen layout is one screen (X screen 0) with dimensions 5760x2160... the monitors are currently placed in the virtual screen space with absolute positioning... the 4K is placed at +0+0 while the 1080 is placed at +3840+1080... this places the 1080 at the bottom right quadrant of Xscreen0 with their bottom borders aligned and the left side of the 1080 flush against the right side of the 4K... yes, i need another 1080 mounted above it to fill the 1920x1080 sized hole in the top right of the virtual screen space but that will come later...

Code: Select all
                    virtual screen 0 5760x2160

  0,0
    -------------------------------------------------------------
    |                             |        empty area           |
    |                             |     because no monitor      |
    |       4K                    |          here               |
    |    coverage                 |-----------------------------|
    |      area                   |          1080               |
    |                             |        coverage             |
    |                             |          area               |
    -------------------------------------------------------------
                                                                5760,2160


with this setup, i then turned to FG... i had a look around at how the multi-monitor setups are done... generally those are done for running FG across all monitors but in my case, i want it positioned on only the 1080... to do that, i created an RC file that i load FG with using the "--config" command line option... i derived my settings from an existing XML file that someone else had posted in these forums... i prefer to use properties so i converted the example file i used from XML to a --prop file format which also explains why i named it somethingsomething.rc instead of somethingsomething.xml...

this is the file i came up with for my system... you can see i still have the original XML statements in it but they are commented out:

Code: Select all
# this file sets FG to appear on the bottom right 1080p monitor in borderless window mode

--prop:/sim/rendering/camera-group/window/name="FlightGear 1080"
--prop:/sim/rendering/camera-group/window/display=0
--prop:/sim/rendering/camera-group/window/screen=0
--prop:/sim/rendering/camera-group/window/fullscreen=0
--prop:/sim/rendering/camera-group/window/decoration=0
--prop:/sim/rendering/camera-group/window/x=3840
--prop:/sim/rendering/camera-group/window/y=1080
--prop:/sim/rendering/camera-group/window/width=1920
--prop:/sim/rendering/camera-group/window/height=1080
--prop:/sim/rendering/camera/window/name="FlightGear 1080"
--prop:/sim/rendering/gui/window/name="FlightGear 1080"

#<sim>
#  <rendering>
#    <camera-group>
#        <window>
#            <name>505FG</name>
#            <display>0</display><!-- graphics card no. 1 -->
#            <screen>1</screen><!-- monitor no. 2 -->
#            <fullscreen>1</fullscreen>
#            <decoration>0</decoration>
#            <x>0</x>
#            <y>0</y>
#            <host-name type="string"></host-name>
#            <width>500</width>
#            <height>500</height>
#        </window>
#        <camera>
#          <window>
#            <name>505FG</name>
#          </window>
#        </camera>
#        <gui>
#        <window>
#          <name type="string">505FG</name>
#        </window>
#      </gui>
#    </camera-group>
#  </rendering>
#</sim>


NOTES:
  1. all the information i have here about my virtual screen and the displays comes from my system's "NVIDIA X Server Settings" app and the corresponding "X Server Settings" tool in my kubuntu 20.04 installation...

  2. i had to specifically give the window a name...
    without a specific name, it defaulted to being named "FlightGear" and was placed on the 4k monitor instead of the 1080 where i wanted it...
    this also meant that i had to adjust my recording/streaming software to look for this specific window name for my FG content...

  3. i placed the FG window at the same absolute coordinates that the 1080 is set to:

    +3840+1080 which is: x=3840 y=1080

  4. i specified the exact size of the window to match the monitor resolution:

    width=1920
    height=1080

  5. i had to specify that FG was to run in a borderless window otherwise it insisted on running fullscreen which was all of screen0 which covers both monitors:

    fullscreen=0
    decoration=0

  6. i'm not sure what FG is doing with the "display=0" property or if it is doing anything at all with it...
    i thought it would be used with the fullscreen setting to restrict FG to the 1080 monitor when i enabled fullscreen but that's not what i saw...
    perhaps it should have been display1 or HDMI-0 or some combination of them but i really don't know right now...

  7. i'm not exactly sure what roles the camera-group name, camera window name, or gui window name play but i named them all the same as was done in the original XML example i used...
    i'm fairly sure that the gui window name is what i had to point my recording/streaming software to...

  8. since i'm on linux, i build my own FG using the download_and_compile.sh script (aka dnc)...
    using this script means that i start my FG with the dnc created run_fgfs.sh script...

  9. to use this config file, i start FG with the following command line:

    $HOME/fg/next/run_fgfs.sh --launcher --config=$HOME/myflightgear/fg-monitor-1080.rc

    ("$HOME" is interpreted by my shell and replaced with the path to my actual home directory)

  10. i do actually have some additional rc files that i load for other settings...
    they are loaded on the same command line using additional --config entries...

  11. none of this affects the placement of the launcher!
    the launcher uses more modern code (it is written in Qt) that detects and remembers the monitor it is run on so i just dragged it onto the 1080 one time and it always starts there now...

  12. all of this may have to be changed when FG (finally) gets around to removing PUI and switching to a more modern graphical library (like Qt) for its gui display code...

  13. i may have forgotten a few things or not explained them properly if my understanding of them is incorrect...

the above works for me and my setup at this time... i offer it only in the hope that it may help guide you in doing something similar for your setup and desire to run FG on your secondary monitor instead of on your laptop's (primary) monitor/screen...
"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: 9162
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 22.04

Re: External Monitor

Postby NeoMemory » Mon Dec 13, 2021 7:24 pm

Thanks much I had to do similar things when I was running Linux. I'll see if I can find an equivalent for windows however I'm pretty sure they don't since the RC file is for the XServer at least I'm pretty sure. :)
NeoMemory
 
Posts: 2
Joined: Mon Dec 13, 2021 6:58 am

Re: External Monitor

Postby wkitty42 » Mon Dec 13, 2021 8:01 pm

you should be able to do it for windows, too... everything i presented here is for FG... nothing i posted has anything to do with my x server's configuration... it is just were i got the needed data from... also, instead of calling the file blahblah.rc, it could be called foobar.txt and FG will process it the same...
"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: 9162
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 22.04

Re: External Monitor

Postby MariuszXC » Mon Dec 13, 2021 11:09 pm

wkitty42 wrote in Mon Dec 13, 2021 2:13 pm:[*] i'm not sure what FG is doing with the "display=0" property or if it is doing anything at all with it...
i thought it would be used with the fullscreen setting to restrict FG to the 1080 monitor when i enabled fullscreen but that's not what i saw...
perhaps it should have been display1 or HDMI-0 or some combination of them but i really don't know right now...


The 'display' refers to what Xserver considers a display. In your setup it is the whole desktop. Run xrandr to learn more on how displays are configured in your server.
For example, I am typing now from a laptop with an external monitor connected to a VGA connector:
Code: Select all
$ xrandr
Screen 0: minimum 320 x 200, current 3200 x 1080, maximum 8192 x 8192
eDP-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 309mm x 174mm
   1920x1080     60.02*+  60.01    59.97    59.96    59.93    47.99 
   1680x1050     59.95    59.88 
   1600x1024     60.17 
   [more mode lines deleted]
VGA-1 connected 1280x1024+1920+0 (normal left inverted right x axis y axis) 376mm x 301mm
   1280x1024     60.02*+  75.02 
   1152x864      75.00 
   1024x768      75.03    60.00 
   [more mode lines deleted]
HDMI-1 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-2 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
HDMI-3 disconnected (normal left inverted right x axis y axis)
INOP
MariuszXC
 
Posts: 1062
Joined: Tue May 18, 2021 5:38 pm
Location: Europe
Callsign: SP-MRM
Version: 2020.4
OS: Ubuntu 16.04

Re: External Monitor

Postby wkitty42 » Tue Dec 14, 2021 12:04 am

ahhh! thanks! i kinda thought that was what it was talking about but wasn't sure... so a display is a monitor, i guess?
"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: 9162
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 22.04

Re: External Monitor

Postby MariuszXC » Tue Dec 14, 2021 1:00 am

Not quite. It is one logical layer up.
Display in this context is an X Screen (I think).
An X Screen may be one logical window composed of several physical monitors...
INOP
MariuszXC
 
Posts: 1062
Joined: Tue May 18, 2021 5:38 pm
Location: Europe
Callsign: SP-MRM
Version: 2020.4
OS: Ubuntu 16.04

Re: External Monitor

Postby wkitty42 » Tue Dec 14, 2021 1:10 pm

ok yeah... like my (poor) ASCII drawing above showing two monitors making up one X screen with room for another 1080 to fill in the top right quadrant...

what really sucks is the duplicity of terms used in so many things... i mean monitors are known as displays and screens :lol:
"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: 9162
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 22.04


Return to Graphics

Who is online

Users browsing this forum: No registered users and 2 guests