Closed Bug 1019796 Opened 10 years ago Closed 7 years ago

Firefox 29 and high mouse polling rate = laggy flash

Categories

(Core Graveyard :: Plug-ins, defect)

29 Branch
x86_64
Windows 7
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: xenoth4u, Unassigned)

Details

(Whiteboard: profile wanted)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0 (Beta/Release)
Build ID: 20140506152807

Steps to reproduce:

I use 500Mhz polling rate with my G400. When I move my mouse over flash content (like twitch.tv) the video starts to lag horribly. This lag is almost non-existent if I lower the polling rate to 125Mhz, but there's no way I could use that.

This does not happen with Chrome. I really dont want to move to Chrome since I like FF and it's addons more. Downgrading to another FF version didin't do anything. I'm using Windows 8.1. 


Actual results:

This does not happen with Chrome or IE.  Clean reinstall of adobe flash didn't do anything. I'm using Windows 7. Several other people noticed this also: http://www.reddit.com/r/firefox/comments/25xikr/firefox_29_and_high_mouse_polling_rate_laggy_flash/


Expected results:

It should not lag ?
I can confirm that I am experiencing this exact same issue on Windows 8.1 x64 and using the very latest version of Firefox (29.01). I'm using a Logitech G500S Mouse with a default polling rate of 500Mhz, but have also experienced this with an Anker Gaming Mouse with the same polling rate. Higher polling rates achieve the same result. As with the filer of the bug, the lag/choppiness is reduced a good amount by lowering the rate to 125Mhz. I have also experienced this issue on Firefox 29 and on the very latest Nightly releases. The x64 build of the latest Nightly finds the choppiness a little better but it's still there.

Any Twitch.tv channel that you click on will exhibit this issue where if you hover and move the cursor rapidly over the video it will suddenly become very choppy with the polling rate set at 500Mhz. The videos over at giantbomb.com - if clicked to play, then brought to fullscreen - will lag in the same way but only if made fullscreen. 

I have tested the Firefox ESR build as well as the Pale Moon x64 browser and both of these work fine, so the issue has been introduced since then. I hope this helps as it's a very frustrating issue.
Component: Untriaged → Plug-ins
Product: Firefox → Core
I don't know how common high polling rates are, but this sounds like it could just be a stupid thing we can fix. Vladan, does the performance team have a list volunteers who are willing/experienced at profiling this sort of thing?
Flags: needinfo?(vdjeric)
Whiteboard: profile wanted
Just to help nail this one down, I recently filed a bug with Adobe about this to see if it could also be looked at on the Flash side of things. There's a link to that here with a very good explanation of the issue: https://bugbase.adobe.com/index.cfm?event=bug&id=3799753. 

Additionally, there is a YouTube video that demonstrates the issue (not made by me) as well if that might help you to see the effects in realtime. It seems like it's not just high polling rates (though that is a big aspect of it) but Twitch.tv in particular has an issue with Flash dropping frames when you're in a channel watching a live stream. It seems to be a Firefox-only issue. Here's the YouTube video: https://www.youtube.com/watch?v=MZlxEy2ZK5E.

The issue continues to affect Firefox 31, the 32 Beta and all Nightlies I've tried.
I'm using an Nvidia Geforce 765M paired with an Intel HD 4600 (in an Optimus setup) if that helps.
Benjamin, we don't have volunteers for profiling (it would also be tricky in this case because it requires particular hardware), but I think this is something QA could/should be trained in.

Christopher and xenoth4u, could I ask you to capture a Firefox profile during the laginess on twitch.tv?
It might help if you also captured a profile on twitch.tv with a 125MHz refresh rate.

Instructions for capturing a Firefox profile:
https://developer.mozilla.org/en-US/docs/Mozilla/Performance/Reporting_a_Performance_Problem

You can also come by the #perf channel of irc.mozilla.org if you need help with this or have any questions. My nick is "vladan".
Flags: needinfo?(vdjeric)
Flags: needinfo?(xenoth4u)
Flags: needinfo?(chrisclayton83)
(In reply to Vladan Djeric (:vladan) from comment #5)
> Benjamin, we don't have volunteers for profiling (it would also be tricky in
> this case because it requires particular hardware), but I think this is
> something QA could/should be trained in.
> 
> Christopher and xenoth4u, could I ask you to capture a Firefox profile
> during the laginess on twitch.tv?
> It might help if you also captured a profile on twitch.tv with a 125MHz
> refresh rate.
> 
> Instructions for capturing a Firefox profile:
> https://developer.mozilla.org/en-US/docs/Mozilla/Performance/
> Reporting_a_Performance_Problem
> 
> You can also come by the #perf channel of irc.mozilla.org if you need help
> with this or have any questions. My nick is "vladan".

No problem! I'd be happy to do that. Just to ask you, in the instructions it mentions the Nightly build. Do you want the profiles taken from a Nightly or can we use the latest Firefox stable? The issue still exists in Firefox 32 as I've tested it. Either way, if you could let me know I'll get those profiles captured for you.
Flags: needinfo?(vdjeric)
(In reply to Christopher Clayton from comment #6)
> No problem! I'd be happy to do that. Just to ask you, in the instructions it
> mentions the Nightly build. Do you want the profiles taken from a Nightly or
> can we use the latest Firefox stable? The issue still exists in Firefox 32
> as I've tested it. Either way, if you could let me know I'll get those
> profiles captured for you.

Thank you! Nightly is preferable for profiling. We can capture proper C++ stacks on Nightly as it's built with different optimization options from the other channels.
Flags: needinfo?(vdjeric)
Thanks for the info! 

Right, I've captured the profiles at the 500mhz and 125mhz mouse rates, however upon trying to upload the profiles it tells me that they're too big (bigger than 9mb). I do have them downloaded as local files though if that would help. Is there any way for me to get them to you?
Flags: needinfo?(vdjeric)
Hello, 
I'm actually surprised someone took notice of my bug report :) In the end I also suspect this is adobe's problem but maybe you can do something about it. Lots of people have a problem with it. 
My files were also bigger then 9mb so I've uploaded them to the external hosting: http://speedy.sh/8zabs/Marlon.rar . In the rar you will find two profiles - one from 500 mhz and one for 125mhz. Hope this helps.
Flags: needinfo?(xenoth4u)
In that case I'll add a link to my uploaded profiles too! Here you go:

http://1drv.ms/1xc9Lyb.

Really hope this helps you get to the bottom of the issue!
Flags: needinfo?(vdjeric)
Flags: needinfo?(chrisclayton83)
I got the same problem, started some months ago. My mouse got a 1000 mhz polling rate (standard for gamers, so very common) and it can't be changed, so I could capture such a profile with 1000 mhz if needed.

I'm glad someone is looking into this very annoying issue and I hope it can be fixed soon.
Flags: needinfo?(vdjeric)
Forgot to add a detail: The same issue concerns html5-Player on YouTube (only some videos; MSE is disabled), so maybe it isn't a flash issue at all.
Thanks guy, I'll take a look at the profile and let you know what I find.

Christopher Jung, can I ask you to capture a profile as well?
I could'nt find a html5-Video with that issue so fast, because it's not very common. But if I find one I'll do another profile.

But here's my profile with flash with 1000 mhz polling rate:
http://www.mediafire.com/download/k2jadgwe4z7y5ji/ff-profile_flash.zip
Flags: needinfo?(vdjeric)
I would like to add few things I discovered lately. I had a chance to test other Logitech mouse on Windows 8.1x64 (Logitech M705) and the problem with laggy flash started after installing logitech software for mouse (setpoint). Since M705 is not a gaming mouse (it does not even have a setting for polling rate) I suspect it's set by default to 125mhz. Also on my other mouse (G400) I observed lags on 125Hz (lowest possible setting). I believe this bug might have something to do with logitech software/driver and flash or firefox.
I'm using a Revoltec Fightmouse Elite, so it can't be a logitech only issue.
Then again it only affects few hardware producers, if this would be just the issue of polling rate every gaming mouse user out there would be screaming on all kinds of forums. Since this is not the case, maybe Revoltec is using logitech's software or parts of it? Just a wild guess.
This definitely isn't a Logitech-only issue. I've tried a few different gaming mice and all exhibit the same issue. It's most definitely either a Firefox or Flash issue. If you try the recently-released extension 'GPU Accelerated Flash Player', it helps to solve the issue, meaning there's an underlying issue there related to either Firefox or Flash.
There is no software you could install for my Revoltec mouse, there is only a portable software (no installation possible) and I don't even downloaded the software. Driver is the default driver by windows. So there is not a single piece of logitech on my system.

If it is a logitech issue there would be much more screaming too since there are VERY MUCH logitech users out there.

Mhm, I installed the extension you mentioned but it didn't change anything for me.
The extension seems to help a great deal on Twitch, which is where I encounter the most issues with laggy video by mousing over the video. It changes the wmode setting of Flash. I don't think it's THE answer but it seems to be helping some people until that answer can be found.
This is not just a windows issue. I have a G400 mouse in Arch Linux and Flash videos on Twitch and certain videos on youtube will completely freeze whenever the mouse is moved. Audio will continue playing though. Luckily I am able to adjust the polling rate manually as per: https://wiki.archlinux.org/index.php/Mouse_Polling_Rate and the issue resolves itself at 100hz. A proper fix would still be nice to see though.
Just to let you all know I've also sent support ticket to the Logitech with as much info as I could. I guess more feedback from users would be nice as this is a huge corporation.
Today I updated flash to the newest version and so far all problems are gone. Can someone confirm ?
I spoke to soon.. still there.
Attached file Profiles.zip
This problem seems to be worse with e10s enabled.  I have attached three profiles with my mouse's polling rate set at 1000Hz, 500Hz, and 125Hz.  My mouse is a Razer DeathAdder 2013, which is a gaming mouse.
I reported this to adobe back when protected mode was first added, and they more or less ignored the report.

typical adobe behaviour.
Running Firefox 39 on Arch x64 with a Logitech G400. Flash video is fine but HTML5 video stutters badly with polling rate at 1000Hz; dropping the frequency to 125Hz fixes the issue.
This bug is still present even with the HTML 5 player on Youtube.

Windows 7 Ultimate (x64)
16GB DDR 3 Ram
GTX 970 4gb with latest Nvidia stable drivers installed
i7 2600k @ default clock
Sentinel Advance SGM-6001

Probably worth mentioning: CPU usage skyrockets when moving your cursor, so hopefully that narrows it down.

I really hope this gets fixed, Ive wanted to switch to FireFox for 2 years and this bug has basically made it as good as dead for me.
Just trying out Firefox, used to Opera.

This bug is on every page in Firefox, especially noticeable with video or scrolling, basically anything that moves..
When moving the mouse at 1000 hz, the page is extremely choppy or nearly frozen.

SW & HW:
Debian 8.3 (stable/Jessie).
Latest stable nvidia drivers (version 361.28).
- Firefox 44.0.2 (-no flash installed at all).

Intel i7-5960X. 32gb ddr4. 512gb Samsung 950 pro M.2. NVidia gtx 970.
- Mionix Naos7000 mouse, set to 1000 hz.

Regards.
Allan
Hello,

there may be a connection between the following observation and the issue listed here, specifically the "mouse-pointer redrawn" part may give a hint. This is what I just reported to JWPlayer as analysis and workaround of mouse-over issues. My test-system (bootcamped Macbook Pro) has the Logitech driver installed, but uses a 125 Hz Logitech mouse and built-in track-pad. My second system behaves differently, but see below after the quotation marks for more info.

First system:

Windows 8.1
AMD driver version 13.250.28.1000 (2013)
Firefox 42

"Moving the mouse-pointer over a JWPlayer embedded video leads to serious lag and video dropouts (not audio). This does not happen with other Flash or HTML5 based players on this system, including both variants of Youtube.

Analysis:

The issue is *not* a direct problem of hovering the mouse over the player, it is a problem of the mouse-pointer being redrawn as a hand symbol when Firefox is having active focus (being the active foreground window). This means that there is no lag when Firefox is not having active focus, even though the player bar still pops up with mouse-overs.

Lag/dropouts only happen once the Firefox window becomes the active foreground window, because then the mouse-pointer also changes to a hand symbol. The drawing of said hand shaped pointer seems to be what causes all the troubles. The severity varies with various web-sites, but one where can bring Firefox almost to a stop (and corresponding "want to stop scrip" message) is:

http://www.albaghdadia.com/live

It's noteworthy that the longer you move the mouse-pointer over the video the longer it takes for Firefox to return to normal. And in the case of the linked site you can even see the mouse-pointer blinking on and off slowly as it seems to be redrawn.

None of the following measures helps to alleviate the problem:

- Turning off/on hardware acceleration for mouse-pointer drawing.
- Turning off/on hardware acceleration in Firefox.
- Using Adobe Flash uninstall tool to do a clean reinstallation of flash.
- Making sure that the GPU (AMD 6750M) is clocked to maximum clock speed and utilized.

It does not happen when the video is played back in fullscreen-mode, though, only when it's embedded/windowed on the site.

Workaround:

Turning off Adobe Flash Protected Mode!

Obviously that workaround cannot be the real solution, which is why I provided all the information here."

Second system:

Windows 7
NVidia driver version 361.43
Firefox 44.0.2

First of all, the Adobe Flash protection mode workaround does *not* work on the second system!

Furthermore on this system I am using a Logitech mouse that allows me to switch poll rate via profiles. At 125 Hz no video lag happens upon mouse-over! At 500 Hz lag happens, but the time for Firefox to get back to normal is relatively short (pointer keeps blinking quickly on the web-site linked above). At 1000 Hz Firefox comes to a complete halt and the mouse-pointer keeps blinking (quickly) all the time.

Using the very same mouse and driver on the first system also leads to video lag at 1000 Hz even while Adobe Flash protection mode is off. BUT (!) with protection mode off it only happens at 1000 Hz and does not keep stalling and blinking once the mouse-pointer is removed from the video. AND with protection mode on (!) it is worse at 125 and 500 Hz with long pointer blinking afterwards, but better at 1000 Hz with pointer blinking quickly and short once the pointer leaves the video area.

Regards,
Timur
I confirm with mouse on 1000Hz video lags like 2 image per second on html5 youtube video when mouse is moved. A workaround is using mouse on 500Hz. 

But even on 500Hz or 125Hz the CPU usage will rise on moving the mouse fast. There must be a bug in the firefox message queue handling for which I opened 1263370 and attached a cpu profile.
I found the 1000Hz video lag problem was caused by NoSquint addon on my PC.
Maybe also other addons or firefox addon handling can cause this.
I solved this issue by uninstalling nvidia hd audio driver, it seems to conflict with my realtek HD audio driver in firefox
I have this issue with my Synaptics Touchpad (don't know the polling rate) and flash videos (not html5) on firefox esr 45.0.3 (not on IE and Chrome), CPU usage is not higher during the mouseover movement.

Example video: http://www.welt.de/politik/deutschland/article157886014/Der-Migrationsdruck-bleibt-immens.html

Also I have sometimes laggy scrolling problems, when I use the scrolling gestures, but here restart of firefox helps for a while.

New profile don't help.

Windows 8.1 64bit
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → INVALID
Was this really resolved or just removed from the tracker?
(In reply to Timur Born from comment #36)
> Was this really resolved or just removed from the tracker?

Smooth as silk here with Firefox 56.0.1 (64-bit) on Arch Linux and 1000hz mouse poll. :)

/Allan
Cannot reproduce laggy video using 1000hz mouse with flash video and html5 video on Windows 7 64bit and firefox 56.0 64bit.
But CPU usage goes up using 1 cpu core. CPU intel i5-2500k, GPU nvidia gtx 970, 16GB RAM, 1TB SSD
So guess this one is solved and that one not https://bugzilla.mozilla.org/show_bug.cgi?id=1263370
The bug is still exists.
Both of Twitch and Youtube are laggy while moving the mouse.

Confirming with Windows7/64bit (all available updates)
Radeon R9 380 (latest 2018 drivers)
Firefox 62.0.3 (64bit) (latest)
Logitech mouse (G400s) (latest drivers)

Video is pretty OK with 125 DPI but lagging with 250 and higher.
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: