Open Bug 1783584 Opened 2 years ago Updated 2 years ago

VA-API holds Nvidia GPU awake on Optimus devices with PCI Express Runtime Power Management

Categories

(Core :: Audio/Video: Playback, defect, P3)

Firefox 103
defect

Tracking

()

UNCONFIRMED

People

(Reporter: akrosi8, Unassigned, NeedInfo)

References

(Blocks 1 open bug)

Details

(Keywords: regression)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:103.0) Gecko/20100101 Firefox/103.0

Steps to reproduce:

  • Change settings in about:config to enable H.264 and VP8/9 video acceleration using Intel GPU
  • Restart browser
  • Play a video

Actual results:

The video plays using the Intel GPU's decoder, but the Nvidia GPU will suddenly wake up and remain active until Firefox is closed. No processes appear to be running on it. PCI calls waking the device is expected behavior (e.g. lspci), but it should return to a low-power state very quickly—this suggests that VA-API causes Firefox to continuously attempt to access the Nvidia GPU once it is initialized, or otherwise lock its state in some way.

Expected results:

The GPU should remain dormant or, more likely, wake up briefly during initialization for device probing and then return to its D3cold state.

The Bugbug bot thinks this bug should belong to the 'Core::Audio/Video: Playback' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Audio/Video: Playback
Product: Firefox → Core

I don't think this behavior occurs in all versions of Firefox with VA-API. I have downgraded to 101.0.1, and VA-API accelerated decoding works without the Nvidia GPU being woken up.

The latest ESR version available to me (91 I believe) initializes VA-API but never actually use the GPU decoder nor exhibit the bug.

The severity field is not set for this bug.
:jimm, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(jmathies)
Severity: -- → S4
Flags: needinfo?(jmathies)
Priority: -- → P3

Are there any potential workarounds for this until it's fixed, other than disabling VA-API? The battery life reduction makes Firefox near-unusable on any post-Coffee Lake Optimus laptops configured according to Nvidia's recommendations. The extra CPU load of decoding video in software makes this a lose-lose situation—either you have 5-10W higher CPU power consumption, or the GPU eats a similar amount sitting idle.

I don't know any workarounds, but identifying the code change that caused the change in behavior would provide some clues.
mozregression simplifies that process:
https://mozilla.github.io/mozregression/install.html
https://mozilla.github.io/mozregression/quickstart.html

Keywords: regression
Flags: needinfo?(akrosi8)

Also please test latest nightly - we changed a way how dmabuf frames are downloaded from GFX card.

You need to log in before you can comment on or make changes to this bug.