libretro / RetroArch

Cross-platform, sophisticated frontend for the libretro API. Licensed GPLv3.
http://www.libretro.com
GNU General Public License v3.0
10.31k stars 1.83k forks source link

[Android] Incorrect Refresh Rate on European Philips TV #8598

Open ghost opened 5 years ago

ghost commented 5 years ago

Description

I have a European Philips TV with Android TV integrated (Oreo 8.0). The TV can work at 24hz, 50hz and 60hz but retroarch always works at 50hz. I tried to force it to 60hz but it was not possible.

Expected behavior

Retroarch works at the correct refresh rate (60hz for NTSC games and 50hz for PAL games)

Actual behavior

The menu always works at 50fps.

When running a game that should work at 60fps, 2 things can happen. If "threaded video" option is set to "false", the game runs in slow motion at 50fps. If “threaded video" option is set to "true", the game runs at the correct speed but with a lot of stuttering (retroarch shows that it works at 60fps but really works at 50fps eliminating 10 frames every second)

Steps to reproduce the bug

  1. Install Retroarch on a European Philips TV
  2. Start Retroarch.

    How to fix it temporarily

  3. Install and start an unofficial youtube app called “Smart Youtube TV” (this trick does not work with the official application)
  4. Play a video that works at 60 fps.
  5. Start Retroarch and now it works at real 60fps (also menu)

If you play any TV channel you will return to 50hz again.

Version/Commit

Tested with Play Store version and with latest retroarch nightly (2019-04-18)

Environment information

RobLoach commented 5 years ago

Threaded Video is usually avoided unless you can't get full speed. Try with all vsync options off, and see what you' get then.

ghost commented 5 years ago

@RobLoach Then why is it the default on Android?

ghost commented 5 years ago

@cbc12345 Does your TV normally run Android at 60hz? At what point does it change to 50? Only after starting RetroArch? Or before then? How are you verifying these refresh rates being used?

ghost commented 5 years ago

Threaded Video is usually avoided unless you can't get full speed. Try with all vsync options off, and see what you' get then.

I have tried with all options available in Retroarch but the problem always persist.

It seems like if Retroarch takes the refresh rate that is assigned in the operating system and does not switch it automatically.

I think that as the operating system works by default at 50hz because the TV is European, retroarch takes this refresh rato and also works at 50hz.

However if the refresh rate is changed to 60hz with another app and later open Retroarch, it takes the new refresh rate (60hz) and works well at 60fps.

It seems that the unofficial youtube app can change the refresh rate automatically but retroarch don't do it and always takes the refresh rate that is assigned in the operating system.

ghost commented 5 years ago

Does your TV normally run Android at 60hz? At what point does it change to 50? Only after starting RetroArch? Or before then? How are you verifying these refresh rates being used?

Does your TV normally run Android at 60hz? At what point does it change to 50? Only after starting RetroArch? Or before then?

My tv usually runs android tv at 50hz and it changes to 60hz or 24hz depending on the content that is played but retroarch never changes the refresh rate.

How are you verifying these refresh rates being used?

With my eyes. When I use the trick to change the refresh rate to 60hz, retroarch works very fluid and the menu shows a refresh rate of 60fps. However, if I open Retroarch without doing the trick, the gameplay have a lot of stuttering and the menu shows a rate of 50fps.

ghost commented 5 years ago

Right, RetroArch does not automatically try to change refresh rates when it starts up... it will use whatever the normal OS is using like most any other application.

ghost commented 5 years ago

Right, RetroArch does not automatically try to change refresh rates when it starts up... it will use whatever the normal OS is using like most any other application.

True, but it also does not change the refresh rate from 50 to 60fps when loading an NTSC rom.

ghost commented 5 years ago

Correct, and I don't know of any mainstream emulation product that does that either. We don't even know what the display's refresh rate is, there is no code to even check it.