Linux OpenELEC 4.0.x: Display refresh rate not adjusting anymore
#1
I've been a happy OpenELEC user for a while but recently I realised that it's been a while since the TV has switched refresh rates upon playback. I used to get that 1080/24p popup - but I don't anymore.

I don't see any flicker either (which used to be there when the refresh rate changed), so I have checked xrandr output:

Code:
# DISPLAY=:0.0 xrandr
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 8192 x 8192
DisplayPort-0 disconnected (normal left inverted right x axis y axis)
HDMI-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 1600mm x 900mm
   1920x1080     60.00 +  50.00    59.94*   24.00    23.98  
   1920x1080i    60.00 +  50.00    59.94  
   2880x576      50.00  
   2880x576i     50.00  
   2880x480      60.00    59.94  
   2880x480i     60.00    59.94  
   1280x1024     60.02  
   1280x720      60.00    50.00    59.94  
   1440x576      50.00  
   1440x576i     50.00  
   1024x768      60.00  
   1440x480      60.00    59.94  
   1440x480i     60.00    59.94  
   800x600       60.32  
   720x576       50.00  
   720x480       60.00    59.94  
   640x480       60.00    59.94  
VGA-0 disconnected (normal left inverted right x axis y axis)

Adjust display refresh rate to match video is set to 'Always'.

Could this have anything to do with the switch to VDPAU for AMD hardware decoding? Zotac AD10 (E-350).

The XBMC log shows this:

Code:
# grep -i display .xbmc/temp/xbmc.log
20:22:37 T:140326468958016  NOTICE:         m_displayName     : HD-Audio Generic
20:22:37 T:140326468958016  NOTICE:         m_displayNameExtra: @@@
20:22:37 T:140326468958016  NOTICE:         m_displayName     : HDA ATI SB
20:22:37 T:140326468958016  NOTICE:         m_displayNameExtra: ALC892 Analog
20:25:35 T:140325188245248   ERROR: VAAPI - unable to initialize display -1 - unknown libva error
20:25:36 T:140325188245248   ERROR: VAAPI - unable to initialize display -1 - unknown libva error
20:25:36 T:140325188245248  NOTICE: Display resolution ADJUST : HDMI-0: 1920x1080 @ 59.94Hz (22) (weight: 0.000)
20:25:36 T:140325188245248  NOTICE: CVDPAU::Check waiting for display reset event
20:25:58 T:140325372819200   ERROR: VAAPI - unable to initialize display -1 - unknown libva error
20:25:58 T:140325372819200   ERROR: VAAPI - unable to initialize display -1 - unknown libva error
20:25:58 T:140325372819200  NOTICE: Display resolution ADJUST : HDMI-0: 1920x1080 @ 59.94Hz (22) (weight: 0.000)
20:25:59 T:140325372819200  NOTICE: CVDPAU::Check waiting for display reset event
21:36:04 T:140325205030656   ERROR: VAAPI - unable to initialize display -1 - unknown libva error
21:36:04 T:140325205030656   ERROR: VAAPI - unable to initialize display -1 - unknown libva error
21:36:04 T:140325205030656  NOTICE: Display resolution ADJUST : HDMI-0: 1920x1080 @ 59.94Hz (22) (weight: 0.000)
21:36:05 T:140325205030656  NOTICE: CVDPAU::Check waiting for display reset event

Don't ask me why it's setting 59,94 Hz, I have no clue.
* MikroTik RB5009UG+S+IN :: ZyXEL GS1900-8HP v1 :: EAP615-Wall v1 :: Netgear GS108T v3 running OpenWrt 23.05
* LibreELEC 11:  HTPC Gigabyte Brix GB-BXA8-5545 with CEC adapter, Sony XR-64A84K :: Desktop AMD Ryzen 7 5800X / Sapphire Nitro+ Radeon 6700XT  / 27" Dell U2717D QHD
* Debian Bookworm x86_64: Celeron G1610, NFS/MariaDB/ZFS server
* Blog
Reply
#2
Please don't post truncated logs as code snippets. Only full debug logs on pastebin or xbmclogs.com.
Reply
#3
Sorry about that.

Here's the full XBMC log.

At 21:36 I have stopped the movie to check the refresh rate settings, since before I had set them to 'adjust display refresh rate' but somehow it had gotten disabled, but it was still on and set to 'always', after which I resumed the movie.

Do you want me to turn on debugging? I don't see any errors or warnings concerning the refresh rate.
* MikroTik RB5009UG+S+IN :: ZyXEL GS1900-8HP v1 :: EAP615-Wall v1 :: Netgear GS108T v3 running OpenWrt 23.05
* LibreELEC 11:  HTPC Gigabyte Brix GB-BXA8-5545 with CEC adapter, Sony XR-64A84K :: Desktop AMD Ryzen 7 5800X / Sapphire Nitro+ Radeon 6700XT  / 27" Dell U2717D QHD
* Debian Bookworm x86_64: Celeron G1610, NFS/MariaDB/ZFS server
* Blog
Reply
#4
That's no debug log, hence useless. You need to enable debug logging in advanced settings.
Reply
#5
Yeah, sorry, should have known.

Debug log

I see with a 25 fps movie it does switch to 50 Hz (checked through Xrandr) (first movie, started at 18:41:29):

Code:
# DISPLAY=:0.0 xrandr
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 8192 x 8192
DisplayPort-0 disconnected (normal left inverted right x axis y axis)
HDMI-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 1600mm x 900mm
   1920x1080     60.00 +  50.00*   59.94    24.00    23.98

Wtf... I start a 24p movie, no flicker, seemingly no refresh rate switching, but now Xrandr reports 24p:

Code:
# DISPLAY=:0.0 xrandr
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 8192 x 8192
DisplayPort-0 disconnected (normal left inverted right x axis y axis)
HDMI-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 1600mm x 900mm
   1920x1080     60.00 +  50.00    59.94    24.00    23.98*

And now I just tried playing the movie I watched the other night, and it's switching to 24p as well... I don't get it.
* MikroTik RB5009UG+S+IN :: ZyXEL GS1900-8HP v1 :: EAP615-Wall v1 :: Netgear GS108T v3 running OpenWrt 23.05
* LibreELEC 11:  HTPC Gigabyte Brix GB-BXA8-5545 with CEC adapter, Sony XR-64A84K :: Desktop AMD Ryzen 7 5800X / Sapphire Nitro+ Radeon 6700XT  / 27" Dell U2717D QHD
* Debian Bookworm x86_64: Celeron G1610, NFS/MariaDB/ZFS server
* Blog
Reply
#6
My TV doesn't display any popup when it switches refresh rate.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#7
OK... Yet mine used to. I don't know if something changed with the switch from the binary ATi drver to radeon (would surprise me, but I lack the technical background). At least it looks like it's switching, even though it clearly did not yesterday. Who knows.
* MikroTik RB5009UG+S+IN :: ZyXEL GS1900-8HP v1 :: EAP615-Wall v1 :: Netgear GS108T v3 running OpenWrt 23.05
* LibreELEC 11:  HTPC Gigabyte Brix GB-BXA8-5545 with CEC adapter, Sony XR-64A84K :: Desktop AMD Ryzen 7 5800X / Sapphire Nitro+ Radeon 6700XT  / 27" Dell U2717D QHD
* Debian Bookworm x86_64: Celeron G1610, NFS/MariaDB/ZFS server
* Blog
Reply
#8
So was this notification from the TV or from XBMC? Some of the TVs in our house give a notification all by themselves, some are able to turn this on and off. The LGs don't seem to do it at all (or I found a way to turn it off). I have to say I have too many TVs. That's cos I'd rather have the kids in their rooms than annoying me.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#9
It was a TV notification. It's a Sony. I might have turned it off accidentally but I don't recall so (nor did I ever see an option in the menus for doing so). E.g. lowering the volume does give a TV notification (just like it gives a receiver notification on the TV, it's done through CEC), so you'd think it would still be present.

I don't blame you for wanting to get your kids out of the way sometimes Wink.
* MikroTik RB5009UG+S+IN :: ZyXEL GS1900-8HP v1 :: EAP615-Wall v1 :: Netgear GS108T v3 running OpenWrt 23.05
* LibreELEC 11:  HTPC Gigabyte Brix GB-BXA8-5545 with CEC adapter, Sony XR-64A84K :: Desktop AMD Ryzen 7 5800X / Sapphire Nitro+ Radeon 6700XT  / 27" Dell U2717D QHD
* Debian Bookworm x86_64: Celeron G1610, NFS/MariaDB/ZFS server
* Blog
Reply
#10
Turns out I wasn't seeing things. I watched a movie two days ago, and while the content should be 24p, the refresh rate was at 59,94 Hz again...

Debug log
* MikroTik RB5009UG+S+IN :: ZyXEL GS1900-8HP v1 :: EAP615-Wall v1 :: Netgear GS108T v3 running OpenWrt 23.05
* LibreELEC 11:  HTPC Gigabyte Brix GB-BXA8-5545 with CEC adapter, Sony XR-64A84K :: Desktop AMD Ryzen 7 5800X / Sapphire Nitro+ Radeon 6700XT  / 27" Dell U2717D QHD
* Debian Bookworm x86_64: Celeron G1610, NFS/MariaDB/ZFS server
* Blog
Reply
#11
Anyone?
* MikroTik RB5009UG+S+IN :: ZyXEL GS1900-8HP v1 :: EAP615-Wall v1 :: Netgear GS108T v3 running OpenWrt 23.05
* LibreELEC 11:  HTPC Gigabyte Brix GB-BXA8-5545 with CEC adapter, Sony XR-64A84K :: Desktop AMD Ryzen 7 5800X / Sapphire Nitro+ Radeon 6700XT  / 27" Dell U2717D QHD
* Debian Bookworm x86_64: Celeron G1610, NFS/MariaDB/ZFS server
* Blog
Reply
#12
I've just been looking at your log. The detected available video modes seem to start at line 323. There is no 24p (neither straight 24 nor 23.97x).

I can see xrandr switching between various rates. Significant events seem to be (preceded by line numbers)

(3564) start playing capt america
(3668) xbmc decides 50Hz is not right for a 23.976 movie and decides to switch to 59.94
(3690) xrandr switches to mode 0x58 - [email protected]
(4302) xrandr goes to mode 0x55 - 1080i@30

All up, I think the reason is that 23.97x is not seen by XBMC as a valid frame rate for your TV. Take a look at /var/log/Xorg.0.log and see if it holds any clues.

This could be a driver error, a TV EDID error, or the need for a modeline in your X config file.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#13
The TV's firmware hasn't changed between Frodo and Gotham, and like I posted the frame rate switching (or modeline detection) seems to be on and off. Xrandr also sees 23,98 Hz as a valid refresh rate. Nor has any of the hardware changed; the only variable being XBMC/OpenELEC.

The modes XBMC does decide to pick are bogus as well...
* MikroTik RB5009UG+S+IN :: ZyXEL GS1900-8HP v1 :: EAP615-Wall v1 :: Netgear GS108T v3 running OpenWrt 23.05
* LibreELEC 11:  HTPC Gigabyte Brix GB-BXA8-5545 with CEC adapter, Sony XR-64A84K :: Desktop AMD Ryzen 7 5800X / Sapphire Nitro+ Radeon 6700XT  / 27" Dell U2717D QHD
* Debian Bookworm x86_64: Celeron G1610, NFS/MariaDB/ZFS server
* Blog
Reply
#14
Most likely TV / AVR was off when you started xbmc - possible?
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#15
It's all turned on by CEC. I start the HTPC, it turns on the receiver and the TV. If the order matters, I can do a cold boot and check.
* MikroTik RB5009UG+S+IN :: ZyXEL GS1900-8HP v1 :: EAP615-Wall v1 :: Netgear GS108T v3 running OpenWrt 23.05
* LibreELEC 11:  HTPC Gigabyte Brix GB-BXA8-5545 with CEC adapter, Sony XR-64A84K :: Desktop AMD Ryzen 7 5800X / Sapphire Nitro+ Radeon 6700XT  / 27" Dell U2717D QHD
* Debian Bookworm x86_64: Celeron G1610, NFS/MariaDB/ZFS server
* Blog
Reply

Logout Mark Read Team Forum Stats Members Help
OpenELEC 4.0.x: Display refresh rate not adjusting anymore0