Hi fellow wiki editors!

To help newly registered users get more familiar with the wiki (and maybe older users too) there is now a {{Welcome to the wiki}} template. Have a look at it and feel free to add it to new users discussion pages (and perhaps your own).

I have tried to keep the template short, but meaningful. /Johan G

Difference between revisions of "Troubleshooting problems"

From FlightGear wiki
Jump to: navigation, search
m (Slow Framerate with OpenGL Card - Frame Rate Throttle)
m (cat: FlightGear)
Line 197: Line 197:
 
* [[About graphic drivers]]
 
* [[About graphic drivers]]
 
* [[Howto: Get rid of common errors]]
 
* [[Howto: Get rid of common errors]]
 +
 +
[[Category:FlightGear]]

Revision as of 15:34, 10 January 2014

Cleanup.png This article may require cleanup to meet the wiki's quality standards. Please improve this article if you can.

If you are having problems getting FlightGear to work for you, this page is dedicated to helping you.

  • Request technical help from volunteers in the FlightGear community


Common FlightGear Problems and Solutions

1rightarrow.png See Howto: Get rid of common errors for the main article about this subject.


Slow Framerate with OpenGL Card

a) If you have a card that fully supports OpenGL and FlightGear is still running slow, then there may be a somewhat esoteric fix to your problem.

Change the color depth to match that of your OS's desktop!

b) Identify if your graphic card use software OpenGL support

When Flightgear was launched, it display a message like this in FlightGear launcher's console window: (before you need to enable log in info mode, FlightGear launcher (fgrun.exe) -->button "advanced" in the third window --> tab "debuuging", select info for "log level" --> click button OK )

Finished command line arguments Initializing splash screen GeForce4 MX 440 with AGP8X/AGP/SSE2/forceSW Max texture size = 2048 Depth buffer bits = 16 Loading Airport Database ... Data file version = 810

Warning! If you see anything like "ForceSW" or "Software Emulation", it was a bad thing for you because you do not have HARDWARE OpenGL support, or your drivers are not configured properly. If you have SOFTWARE OpenGL support, your CPU work a lot to display the graphics. Source : http://ocw.mit.edu/ans7870/6/6.370/contestants/software.htm#issues

c) Optimize FlightGear settings for slower graphics cards

d) check that the Throttle Frame Rate is not set to low values. Check via Rendering Options or sim/frame-rate-throttle-hz. Default value is 30, but can set up to 100.

Slow Framerate with Graphic Card with Nvidia chip

a) First, Identify if your graphic card use software OpenGL support

When Flightgear was launched, it display a message like this in FlightGear launcher's console window: (before you need to enable log in info mode, FlightGear launcher (fgrun.exe) -->button "advanced" in the third window --> tab "debuuging", select info for "log level" --> click button OK )

Finished command line arguments Initializing splash screen GeForce4 MX 440 with AGP8X/AGP/SSE2/forceSW Max texture size = 2048 Depth buffer bits = 16 Loading Airport Database ... Data file version = 810

Warning! If you see anything like "ForceSW" or "Software Emulation", it was a bad thing for you because you do not have HARDWARE OpenGL support, or your drivers are not configured properly. If you have SOFTWARE OpenGL support, your CPU work a lot to display the graphics. Source : http://ocw.mit.edu/ans7870/6/6.370/contestants/software.htm#issues

b) Second, use this workaround for Windows 2000/XP to correct this problem.

I have a nvidia Geforce 4 MX440-AGP 8x and this workaround correct the slow framerate with my graphic card. The detailed problem analysis is here : http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg14993.html This workaround is to downgrade your nvdia driver to 45.33 or 4.5.3.3. You can find it here : http://www.nvidia.com/object/pc_winxp-2k_45.33.html This 45.33 driver supports over five generations of NVIDIA GPUs - from TNT to GeForce FX(Geforce Fx = Geforce5).

Don't use driver upper than 45.33, because in the upper version, there is a software OpenGL support. It was not the GPU (nvidia chip) that work to support the software OpenGL features but your CPU. And with this configuration, your CPU is used at 98% by fgfs.exe or the flightgear binary.

Note : I do tests with Graphic card with Nvidia Geforce 6200-AGP8X-256MB (NV44A2) and with 7.7.7.2 and 9.4.2.4 nvidia drivers on Windows 2000 SP4 (CPU : Celeron D 2,66Ghz, RAM : 512 MB). I made tests with Flightgear 0.9.10 and 1.0.0, I have only 1 fps with these 2 drivers and 2 FlightGear versions. This card is not yet powerful for flightgear and there is no workaround for it.


Corrupt Textures on ATi Cards

Several users have reported corrupted textures running FlightGear on ATi graphics cards. The ATi drivers are the subject of intensive improvement, but can still be problematic for some users. Try this:

Start FG in the normal way. Select 'View' drop-down menu (one from the left- you may not be able to read the labels!) Select 'Rendering Options' (fourth choice) Uncheck 'Use Point Sprites for Runway Lights' (fourth check-box)

When you come to quit FG, do so by menu: File...Exit, rather than closing the window to save this setting.

If you can't read the Menu titles (because of corrupted graphics) you can manually edit the config files $FG_HOMEautosave.xml and/or $FG_ROOT/preferences.xml before even starting FlightGear. The file autosave.xml is created the first time FlightGear is closed and settings in it override the defaults in $FG_ROOT/preferences.xml. Use your operating system's search facilities to find the files if you don't know where to look for them. Close Flightgear and change the line

<point-sprites type="bool">true</point-sprites>

to

<point-sprites type="bool">false</point-sprites>

in both files (if you don't have an autosave.xml it is sufficient to make the change in preferences.xml) and start FlightGear again. This is the same as changing the above mentioned option in the rendering dialog but does not require FlightGear running.

Examples of corrupted graphics with an ATI card:

ATI point-sprites corrupted 1.jpg ATI point-sprites corrupted 2.jpg


USB Joystick Fails to Work

FlightGear is designed to recognize automatically any USB joystick that it is aware of (has a configuration on file for it). Configuration for USB joysticks is located in the Inputs folder. For example:

Input/Saitek/X45.xml

The name reported by the joystick through the hardware of your system must match the name specified in the configuration file. If the stick identifies itself as

Saitek Saitek X45 Flight Control Stick

but the configuration file specifies

Saitek X45 USB Flight Stick

FlightGear will fail to recognize it.

This happens with some frequency. It has been known for the same stick in a manufacturer's line to report different identifier strings. If you encounter a problem getting your usb stick to be recognized by FlightGear, it is helpful to first check to see

  • a configuration file matching the name of your stick exists
  • the configuration joystick name matches the name the stick actually reports to your computer


USB Joystick exhibits permanent offset / requires repeated recalibration

USB Joystick drivers should automatically zero and calibrate the joystick on plugin. Some examples of some types of joystick can be faulty where the fault is exhibited as an offset from the zero position when this process is completed. In Kubuntu this can be fixed for the session by use of the Joystick calibration tool under "Keyboard and Mouse" of "System Settings", or equivalent tools with other distributions, but the problem will recur.

In some cases this may be caused by improper connector seating or other loose connections within the joystick. This can sometimes be remedied by unscrewing the base or other case element to access the circuit board and then reseating the connectors. Also check for faulty solder joints and discrete components bent over onto the circuit board. Before attempting any repair unplug the device and remove any batteries.


Configuring CH Products Under Windows Vista

The CH Products Yoke and Pedals are among the most popular flight sim controls. FlightGear provides excellent configuration files for both the Yoke and Pedals manufactured by CH. Windows Vista recognizes and configures the USB versions of these products by default. However, it reports them as "Generic Controls." This creates an issue when FlightGear tries to assign the appropriate controller configuration.

To overcome this you need to edit your Joystick.xml (Filghtgear\Data\Joystick.xml) file to manually assign a configuration file for FlightGear to use.

Eg:

If you have the Yoke as MS-Windows Controller 0 and Pedals as Controller 1 then you include the following lines:

  <js n="0" include="Input/Joysticks/CH/pro-yoke-usb.xml"/>
  <js n="1" include="Input/Joysticks/CH/pro-pedals-usb.xml"/>


[Enter] does not work for rudder control

First of all: if [0] doesn't work, check if toggling num-lock solves the issue.

Open file $FG_ROOT/keyboard.xml with your preferred Editor. and search for those lines (it's close to the top, around line 40):

     ## uncomment this line to get keycode reports printed to the terminal window
     #setlistener("devices/status/keyboard/event", func(n) debug.dump(n.getValues()));

Read the first one and uncomment the second one. To uncomment it remove the leading "#".
Save the file and run FlightGear as usual but with the log-level set to "alarm" (no need to do anything if it wasn't used/changed before!).
When FlightGear is running press [Enter] and immediately after this, without doing anyting on the keyboard, click on FlightGears log window and you'll see something like this in the last two lines of the log:

{ key: 13, modifier: { meta: 0, shift: 0, alt: 0, super: 0, ctrl: 0, hyper: 0 }, pressed: 1 }
{ key: 13, modifier: { meta: 0, shift: 0, alt: 0, super: 0, ctrl: 0, hyper: 0 }, pressed: 0 }

The first line is for pressing the [Enter]-Key, the second for releasing it. Keep the first number, named "key", in this exaple shown as "13", in mind.

Open file $FG_ROOT/keyboard.xml again and search for "enter". You should find following:

<key n="10">
 <name>Enter</name>
 <desc>Move rudder right</desc>

Now replace the value of key n= with the one you had to keep in mind earlier. Save file and run FlightGear to test it.

If the [Enter] key doesn't work at all for some reason one solution would be to assign the key right hand next to (not the num-block-)[0], if it is not already assigned to something else. Procedure is the same as shown with the [Enter] key.

Last thing to do, in any case, disbable the keycode reports by replacing the "#" which we removed earlier.


Possible pitfalls when modifying base package files

At some point, most users will probably want to modify FlightGear in some way or another. Many interesting modifications can be done by editing base package resources, such as for example aircraft files, instrumentation files, GUI files, Nasal scripts etc.

However, once you do modify the base package, it is important to keep track of your changes and to make sure that files are modified properly. Here are some things to watch out for:

  • When referencing file names or paths, always make sure that files and paths actually do exist
  • When referencing file names or paths, make sure that they're used properly i.e. watch out for whitespaces, separators and case:
    • On most modern operating systems, filenames and paths are indeed case sensitive, so make sure to watch out for this, as well
  • Also, most modern multi-user operating systems feature support for file permissions, so that files and paths need to have the proper permissions set in order to be accessible
  • Once you start editing XML files, you will want to ensure that your edits are valid and don't corrupt the XML syntax, that is make sure that tags are properly closed - if you are not sure whether your edits were properly done or not, you may want to use a so called "xml validator", there are numerous free/open source tools available to help you validating XML documents, under *nix you could for example simply use "xmllint". Invalid XML files cannot be used by FlightGear anymore (there are also various web-based validator available, where you can simply paste contents or upload files to be checked).
  • Also, while the majority of FlightGear XML files follows the basic PropertyList format, the various individual FlightGear components support different functionality and features, so tags and attributes that may be available and usable in one type of files such as i.e. GUI files are usually not necessarily also available in files for different subsystems/components, as features are so far being individually implemented for each single component rather than globally. So, even if a certain syntax or feature is supported in a different part of FlightGear, it may simply not yet be available in other ones.

Please note that it is easily possible to corrupt your base package simply by modifying files in the wrong way, so that FlightGear may no longer work without getting a fresh base package, thus you may want to keep your modifications separate from the rest of the base package. Or at least consider using a Source Code Management system such as for example svn or git.

If you do encounter problems getting your modifications to work for you, you may want to run FlightGear with an increased log/warning level, so that you get to see more completely which parts of FlightGear could be successfully completed and which ones failed, this can be achieved by using the --log-level=bulk parameter


Related