Kodi Community Forum

Full Version: Kodi resets HDMI output after some time if receiver and TV are turned off
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Kodi 18.0 RC2

My HTPC is always on, but I turn off my TV and receiver when not in use. This has worked fine with v17 and earlier versions.

With v18: If I turn my TV/receiver off for some time (1+ hours) and turn them back on the receiver shows "HDMI 1" instead of "Integrated gfx" and there is no audio output any more. This is not seen if I do a quick turn off / turn on. It takes time for Kodi to disrupt the HDMI output.

There is no change with the X server or Pulseaudio or the receiver or TV.

If I downgrade back to v17.6 the behavior returns back to normal. I can leave the TV/receiver off overnight and turning them back on returns audio and "Integrated gfx" on the receiver.

Anyone else seen this? Is a new v18 setting set wrong? I've tried setting the "send audio output" setting from "1 minute" to "Always" but that did not help.
I primarily use Kodi by using a kodi session (no Gnome or any other DE).

After 5 minutes, if Kodi is idle and the TV / receiver are on, Kodi changes Pulseaudio from 5.1 output to 2.1 output. The only way to get 5.1 output back is to reboot.

If I login to Gnome and run Kodi that way Kodi will not reset the HDMI output overnight, but it will downgrade the audio output from 5.1 to 2.1. I can use Gnome to reset the audio back to 5.1.

It appears Kodi is man-handling Pulseaudio for some reason and forcing it to change even though there is no video or music playing.
Wrong. Kodi is registering a pulseaudio stream only. It has no ability to change anything on the PA server side. Whenever your turn off your TV the HDMI audio device will be _gone_ - kodi gets called by pulseaudio to scan new devices - and those are the ones left after HDMI is off. So - in short: kodi does what pulseaudio is doing.

Just keep kodi set on the pulseaudio default device and it will act like any other desktop application. Fixating it to the 5.1 device which will be turned off when HDMI turns off will produce issues.
(2018-12-07, 21:33)fritsch Wrote: [ -> ]Wrong. Kodi is registering a pulseaudio stream only. It has no ability to change anything on the PA server side. Whenever your turn off your TV the HDMI audio device will be _gone_ - kodi gets called by pulseaudio to scan new devices - and those are the ones left after HDMI is off. So - in short: kodi does what pulseaudio is doing.

Just keep kodi set on the pulseaudio default device and it will act like any other desktop application. Fixating it to the 5.1 device which will be turned off when HDMI turns off will produce issues.
 Yeah, Kodi is doing something. Here's why:

* Without Kodi running nothing is changed.
* Kodi 17.6 doesn't have this issue.
* Running Kodi inside of Gnome the problem may appear as switching to 2.0 channels, but easily fixed by setting back to 5.1 -- and it sticks at 5.1
* Kodi has power saving options set to Off. Screensaver set to None.
* I have my audio settings set to the "Default" audio device.

I don't have all the time in the world to debug and find the problem, but here is what I've seen:

* After 5 minutes Kodi sets the PA stream state to 'SUSPENDED' / 'IDLE'
* After 10 minutes Kodi corrupts PA and PA thinks there are no audio devices
* If I leave Kodi 18 playing TV constantly and turn off the receiver and TV the PA stream is never changed or destroyed even after hours of being off.

So.. Kodi is doing something. Still looking... when I have time.
The core issue is that DPMS is being turned back on. Disabling DPMS resolves the issue. The adapter never gets disabled and audio never gets lost.

This has been reported before and shrugged off that Kodi isn't responsible, but it *is* responsible if the Power Saving options inside of Kodi are off and Kodi 17.x handled DPMS settings before.

Previous report: https://forum.kodi.tv/showthread.php?tid=334186

Now to find time to hunt through code commits.
Your desktop manager is responsible. Disable DPMS if you don't want it.
(2019-01-14, 21:08)fritsch Wrote: [ -> ]Your desktop manager is responsible. Disable DPMS if you don't want it.
 Wrong. I'm not using a desktop manager. Haven't found the time to find the commit that caused this behavior change, but I will.
Kodi without Desktop-Manager is not supported anyways.
If you start it from Xorg directly then disable DPMS in xorg.conf