Stutter/Slowdown using MHL 2.0 adapter to play on TV

Hello,

I finally got my MHL 2.0 Adapter to hook my Galaxy S4 up to my Samsung 40" LCD TV. I put the TV into GameMode (to avoid input lag).

All the games that I’ve tested work great/smooth on my device but as soon as I plug into my MHL adapter to play on the TV, everything slows down and stutters. Sound and gameplay are like half the speed. Now sometimes, it speeds up for a moment and then it goes back to slow-motion.

As soon as I disconnect the MHL, everything goes back to normal on my GS4. I’m using DualShock 3 and Sixaxis and that all works well.

Can anyone shed some light? Is my GS4 still not powerful enough to emmulate using the MHL adapter?

This happens playing SNES games such as Super Mario World and Super Street Fighter 2. Also tried on other cores such as Bubble Bobble 2 on MAME and Street Fighter Alpha 2 Gold on PSX. All run awesome on my device itself but then choke when I plug the MHL adapter in.

Thanks in advance for any help! :slight_smile:

The performance you get out of HDMI/MHL TV output is device-dependent and OS-dependent.

Android 4.0 will be a total crapshoot - so don’t even try for RetroArch.

Android 4.1 and above should be a lot better - but there will still be exceptions to the rule.

The Shield outputs at 720p over HDMI but audio/video latency is great - no issues at all.

I am leaning on the problem here being this MHL 2.0 adapter that you bought. Can you give me a link to this device?

Truth be told, Samsung has always been notorious when it comes to the speed of their displays and the crappy way HDMI-Out works on that SOC work (the Exynos 4412 Prime is a prime example of that - also used in the Galaxy S3 - on the Odroid U2, it is physically incapable of delivering smooth vsynced 1080p/720p graphics without glitches on ARM Linux). I would not be surprised if there are similar issues with Galaxy S4 this time.

Thanks for the reply Squarepusher

The adapter I purchased is this one:

My Galaxy S4 is an SGH-1337M running 4.2.2 (baseband version *MG1) so yeah, like I said everything runs like a dream on it when not connected. I wasn’t sure if it was my TV or the Adapter. Unfortunately, AFAIK this is the only MHL 2.0 adapter available, so if it’s the culprit, there probably isn’t much I can do is there?

Do you have threaded video turned on?

Perhaps statically syncing at the monitor’s refresh rate (by setting Forced Refreshrate to the refreshrate your monitor is using) would yield better results through MHL/HDMI?

But really, I think this is just a case of that adapter probably being the culprit - much like the HDMI Out on the Exynos 4412 Prime SoC I have in my Odroid U2 then.

For the record - the Lightning Digital AV adaptors for iPad 4/Mini seem to have big problems with latency too. Ironically enough the 30-pin Digital AV adaptor for the iPad 2/3 was just fine though.

I’m having similar sounding issues with RetroArch Cascades 1_0_0_1 (for BlackBerry 10). Games run perfect speed, extremely fluid and no noticeable sound issues like crackling, garbled audio or stuttering, however when I hook it up to a TV using a Micro HDMI to HDMI cable it’s a different story. The first time I tried using the HDMI output to play, I used the Nestopia core and it was slow, choppy gameplay and garbled and dropping in and out audio from the start. I switched to the FCEUmm core and things were much better, however after a few minutes the same audio issues would come back. I suspected background tasks or the emulator wasn’t running on the highest priority or maybe some aggressive power management going on or just an increased CPU load when using the HDMI output as a potential source of the issue.

At least the NES emulation was playable. I tried the Mednafen core and loaded up my backup of my favourite game, Lords of Thunder and from the intro music it was crackling, stuttering and garbled not to mention the framerate was terrible. I went home and tried it on another TV the next morning. I didn’t reboot my phone or anything. When I started up Lords of Thunder the music sounded fine and the framerate was excellent. Still not quite as silky smooth as on the Z10 screen but it was definitely running at full speed. I thought great, maybe it was just the TV and some synching issues and proceeded to play. After some minutes into the first level the same audio issues returned. One of the issues is a complete dropping out of the audio then coming back in only to drop out again. On this TV the issue was only occurring after a good few minutes of gameplay unlike the one before which had had me wondering if the Z10 may not have been powerful enough to run the game and do HDMI output at the same time. After it ran so well for almost the whole first level on this TV I dismissed that theory of a lack of processing power. I then suspected some power management issues as I noticed that it almost never happened when playing on the touch screen. The touchscreen is noticeably smoother and looks like almost more than 60fps or maybe that’s just how perfectly synched 60fps with little to no noticeable input lag on the Z10 screen seems. In order to test this I used the touchscreen to play instead of my Wii Remote so as to not allow any touchscreen inactivity to trigger off any power saving mode. Well that didn’t do anything.

I tried adjusting all the video settings you suggested and tried all of the different Z10 output resolution options. The output resolution options made no difference but the video settings adjustment did, I just had to figure out which one. I finally concluded that anytime the sound and slowdown issues occurred I could pause the game and press toggle full screen a couple times and it would cause a slight flash on the phone screen and the sound and video would resync and the issue would be gone until the next few minutes until it comes back again. So that’s a workaround until it can be fixed. I really hope it is fixed though. This emu has been like a dream come true for me. A portable console with me at all times that I can play my favourite games at full speed, on a big TV, using a controller!!! Just needs some polish. I’m willing to help in anyway that I can. I’ve noticed some other bugs but I’ll save those for another time and maybe section. Great work to all who have made this possible and thanks!

My hardware is a BlackBerry Z10, Model: STL100-1, Software Release: 10.1.0.2312.

Hopefully on Blackberry Z10 this can be overcome with threaded video with adaptive jitter - which I’m going to enable by default.

On Blackberry unfortunately OpenAL implementation sucks big time - if we were able to use native ALSA things would be a lot better.

We have a native ALSA driver for QNX but the underruns are terrible and make things even worse than OpenAL and there was nobody who could figure it out - so we moved back to OpenAL.

Anyway, I’m still leaning on HDMI Out/MHL Out just being particularly shoddily implemented on those devices. It isn’t a problem related to RetroArch itself at least or at least I believe so.

Thanks for the quick reply. I hope my post helps in finding the source of the issue. I’ll have to do some retesting when I get my new HDMI cable but the native BlackBerry games I’ve played seemed to work fine using the HDMI output. I tried Shadowgun, Mass Effect: Infiltrator, Modern Combat 4 and Air Attack and I don’t remember noticing the same audio issues. I didn’t play them for long though but I will retest and see early next month. Thanks again!

I wonder if the issue would occur if the display was set to “external only” once the game has been loaded?

Games these days don’t really run at a fixed framerate nor do they even use Vsync - so they place much less of a demand on things than emulators since they have to tightly synchronize against the original machine’s refreshrate and you can’t ever skip a beat or it will be reflected in pretty awful audio crackling or frame dropping as you’re seeing here.

It’s a bit like Eurogamer’s Digital Foundry describes here (just read ‘emulators’ in place of PS2):

Unlike many modern games, the PlayStation 2 titles developed by Kojima Productions do not make use of frame skipping, where the speed of the action is decoupled from the frame-rate. Each of its games ties gameplay speed directly to engine performance, so a failure to reach the intended performance level results in a corresponding loss of game speed. In order to help alleviate this problem, the engine drops v-sync under stress, not unlike a number of modern games - techniques such as triple-buffering were not available to use on PlayStation 2 as a result of memory constraints. Games from this era typically handled performance drops by either disengaging vertical sync, as with ZOE 2, or simply dropping to a frame-rate evenly divisible by 60Hz (which, in this case, would have resulted in a jump from 60fps to 30fps had the developers not employed the use of soft v-sync). The HD release works in much the same way and is the primary reason why the initial HD release feels almost unplayable - it almost never reaches full speed!

In our case it doesn’t really do this - that is, disengaging vertical sync, or dropping the framerate when not being able to deliver on audio/video sync requirements - so any and all performance drops are reflected in simply audio crackles or frame rate drops.

I am still leaning on the HDMI Out hardware probably being inadequate to do the job properly if it works just fine on the phone’ screen itself.

Anyway, for the next Blackberry releases I’ll try enabling threaded video with adaptive jitter by default to avoid some of the issues I saw earlier with the Blackberry ports. Let me know after that release whether things improved on your end with HDMI Out. I suspect not but it never hurts to try.

“Real” games don’t synchronize their audio/video for one. Video FPS and audio performance are not tied to each other. Also, they can work with variable frame rates. Emulators work in frames. No more, no less. And each frames equals a certain number of audio samples (on average).

Among games, emulators have the hardest synchronization requirement. It’s far more “real time” than ordinary games will ever be. libretro and RetroArch do support modes to act like normal games, but emulators cannot use them.

I tried every combination of settings I could find to see if I could get it going on the TV but yes, by default I had Threaded video driver enabled.

One thing I noticed while playing around last night was that when I run the refresh rate calibration on my S4 without the adapter plugged in, I get 59.993…Hz to 60.053…Hz (i get a different value every time I run it) BUT when I run the refresh rate calibration when the adapter is plugged in, I get 29.874…Hz or around there. Effectively half the reported framerate while the adapter is unplugged.

I will play around a little more with the refresh rates and trying to match them to my TV when I get home. Maybe I’ll try to hook up to my 27" monitor as well to see if perhaps it’s the TV that’s causing the issue and not the adapter. Although, at this point it seems like it’s the adapter’s fault. :frowning:

hmmmmm probably you’re running an interlaced video mode, can you check the video mode on your TV? sounds like you’re running 1080i

This is likely yeah if he really says that the refreshrate he is getting back is close to 30Hz.

I’ve been out of town for a few days so haven’t been able to continue with tests.

I can say for sure though, that the TV is reporting 1080p in Game Mode. Come to think of it, although I remember seeing 60Hz reported on another setting, Game Mode might be running 120Hz. I wonder if this is causing an issue; Although, I would think it would only improve performance unless there is some sort of frequency mismatch, no?

At any rate, I’ll report my finding when I get back to test.

For reference, this is the TV I’m using: Samsung LN40C610N http://www.samsung.com/ca/consumer/tv-video/tv/lcd/LN40C610N1FXZC

Well, I’ve tried on another TV and was happy for about 10 minutes. Everything was working smooth, just as if I didn’t even have it plugged in. And then it started the sluggishness again. So I give up haha… Maybe the adapter is crapping out or maybe it just sucks to begin with. For now, I’ll just use it as an awesome handheld gamer.

Is anyone having great success outputting their GS4 to TV and playing with RetroArch?

Hmmm…that seems just like my experience when I tried another TV Licker. When it starts to get sluggish go into the menu and click on “Video Options” then click on “Toggle Fullscreen” a couple times, the screen on your phone should flash. See if the sluggishness goes away when you do that. That consistently worked for me until it eventually came back and I just rinsed and repeated.

Interesting!

Thanks Cyber - I’ll give that a shot!

Son of a Bitch!

So I tested on my U2711 Monitor and it did the same thing (even tried Cyber’s solution to no avail). So at this point I figured it might be a faulty Adapter (as we were leaning towards earlier). But then I thought, wait a second, lets see if there are knockoffs floating around… I mean everything is being knocked off now-a-days so why not this?

Lo and Behold!

So now I’m pissed that I wasted my and your time on this… I bet once I get an authentic adapter, these issues of mine will be a thing of the past.

Anyone considering purchasing one of these adapters - Take a look at the links and don’t get fooled by the sub par knockoffs!! I only wish I knew about this when I purchased mine - alas, I got it too soon after it’s release so no one caught on yet…

Anyway thanks for your time Square and Cyber. I’m off to find out where the hell in Canada I can buy one of these GENUINE adapters!

I am also noticing lag(by input) when using my iPad 3 with hdmi.

We are currently trying to determine the best way to find out if the an adapter is REAL or FAKE in this thread:

Some are suggesting I have a real adapter so I thought I would raise this thread here back from the dead to ask a simple question:

Is there any app or test I can run that will give me the frequency, resolution and speed of the MHL? So that we can test once and for all if the adapter is the issue?

When I mentioned above that the frequency calibration in RetroArch reported half the frequency while the adapter was plugged in, I forgot to mention that was ONLY while the phone was in horizontal orientation. It reported around 60Hz while the phone was in portrait.