Frontend/Welcome Does Not Automatically Resize On Desktop Resolution Change? (TV Off vs On)

Have a MythTV related problem? Ask for help from other MythTV users here.

Moderator: Forum Moderators

Post Reply
mtvf2894
Junior
Posts: 81
Joined: Sat Apr 10, 2021 2:33 pm
Great Britain

Frontend/Welcome Does Not Automatically Resize On Desktop Resolution Change? (TV Off vs On)

Post by mtvf2894 »

If TV is not switched on when the PC boots MythTV starts in 1024x768 the resolution my AMD graphics driver must default to in this situation.

When the TV is switched on the Linux desktop is automatically resized to 1920x1020 but MythTV does not automatically resize with it so it is a small 1024x768 "window" at the top left of the screen.

I have worked around this by setting the MythTV GUI Dimensions setting to 1920x1080 (instead of full screen 0x0) but when you VNC into the machine when the TV is not switched on you only see the top left 1024x768 of the MythTV interface when using GUI dimensions so you can't use MythTV as you can only see the top left of the screen as the screen resolution is only 1024x768 and I am forcing MythTV to be 1920x1080.

Is it possible to get MythTV to automatically resize with/when the Linux desktop automatically resizes when it detects the TV is switched on?

Or is it possible to force the AMD graphic driver to just use 1920x1080 all the time instead of relying on the information it is retrieving from the TV (or not as it is switched off)? I have tried 100's of combinations of xorg.conf configuration but I am not convinced it is possible with the AMD driver.

Thanks
Current: v32 now v33.1 / Lubuntu 22.04 / AMD APU
Previous: v31 / Lubuntu 20.10 / AMD APU
Historic: Mythbuntu / NVIDIA GFX
wmorrison
Senior
Posts: 165
Joined: Sat Dec 01, 2018 12:05 am
United States of America

Re: Frontend/Welcome Does Not Automatically Resize On Desktop Resolution Change? (TV Off vs On)

Post by wmorrison »

Interesting. Are there any BIOS/EFI settings for graphics?
mtvf2894
Junior
Posts: 81
Joined: Sat Apr 10, 2021 2:33 pm
Great Britain

Re: Frontend/Welcome Does Not Automatically Resize On Desktop Resolution Change? (TV Off vs On)

Post by mtvf2894 »

wmorrison wrote:
Fri Aug 12, 2022 4:13 am
Interesting. Are there any BIOS/EFI settings for graphics?
Nothing apart from a setting how much memory is assigned to the integrated graphics.

I have now just set MythTV GUI Dimensions to Full Screen and I just exit and reopen the frontend/welcome when I switch on the TV.

I do not know if there is a system event that frontend/welcome could detect and resize appropriately when Linux itself detects the TV has been switched on and resizes the desktop and leaves frontend/welcome stuck at the top left of the desktop?

Thanks
Current: v32 now v33.1 / Lubuntu 22.04 / AMD APU
Previous: v31 / Lubuntu 20.10 / AMD APU
Historic: Mythbuntu / NVIDIA GFX
wmorrison
Senior
Posts: 165
Joined: Sat Dec 01, 2018 12:05 am
United States of America

Re: Frontend/Welcome Does Not Automatically Resize On Desktop Resolution Change? (TV Off vs On)

Post by wmorrison »

I take it you have no display connected other than your TV or you probably would have mentioned that. How's it connected? Mobo have HDMI out? Or an adapter to HDMI?

If direct HDMI does mobo also have other video ports? Can these be disabled?

Interesting that when you VNC in, it gives you a 1024x768 window. Seems there's something on the system defaulting to that.

You mentioned you've tried lots of configuration settings. Just in /etc or in ~/.config? (Could per-user setting be overriding system settings?)

You didn't by chance build this machine connected to a 1024x768 monitor? (Which maybe saved that info somewhere as the default?)

Just guesses. I'm on Xubuntu and when I turn it on with the TV off, then turn the TV on after it's completely booted, it's already 1920x1080. TV conected to mobo HDMI out. I does have a DVI port but I've never connected it.
mtvf2894
Junior
Posts: 81
Joined: Sat Apr 10, 2021 2:33 pm
Great Britain

Re: Frontend/Welcome Does Not Automatically Resize On Desktop Resolution Change? (TV Off vs On)

Post by mtvf2894 »

wmorrison wrote:
Fri Aug 12, 2022 10:03 pm
I take it you have no display connected other than your TV or you probably would have mentioned that. How's it connected? Mobo have HDMI out? Or an adapter to HDMI?

If direct HDMI does mobo also have other video ports? Can these be disabled?

Interesting that when you VNC in, it gives you a 1024x768 window. Seems there's something on the system defaulting to that.

You mentioned you've tried lots of configuration settings. Just in /etc or in ~/.config? (Could per-user setting be overriding system settings?)

You didn't by chance build this machine connected to a 1024x768 monitor? (Which maybe saved that info somewhere as the default?)

Just guesses. I'm on Xubuntu and when I turn it on with the TV off, then turn the TV on after it's completely booted, it's already 1920x1080. TV conected to mobo HDMI out. I does have a DVI port but I've never connected it.
1. Connected via motherboard HDMI, originally installed OS via this connection on the TV.
2. Before switching on TV VNC connects to a desktop at 1024x768 as soon as the TV is switched on VNC connects at 1920x1080. As soon as TV has been switched on once it is fine turning it off 1920x1080 is kept until a restart.
3. I have been trying settings in xorg.conf. I can see it being read in the xorg.log but I am not convinced anything will help if it can't find the wanted resolution in the list of supported resolutions reported by the "tv/monitor" it will not work. When I was using a NVIDIA card this allowed you to force a resolution regardless of what is or isn't connected AMD doesn't support this or I can't find xorg.conf settings for this.
4. How do you know your desktop is at 1920x1080 before you switch on the TV - are you saying you autostart mythfrontend, have it set to full screen and you have no problems? I believe for me the act of switching on the TV causes EDID information to be available to the "graphics card" and that tells Linux desktop to sorts itself out.

Thanks for your suggestions though I think I just have to live with this after all it is only a minor annoyance.
Current: v32 now v33.1 / Lubuntu 22.04 / AMD APU
Previous: v31 / Lubuntu 20.10 / AMD APU
Historic: Mythbuntu / NVIDIA GFX
wmorrison
Senior
Posts: 165
Joined: Sat Dec 01, 2018 12:05 am
United States of America

Re: Frontend/Welcome Does Not Automatically Resize On Desktop Resolution Change? (TV Off vs On)

Post by wmorrison »

mtvf2894 wrote:
Sat Aug 13, 2022 10:17 am
4. How do you know your desktop is at 1920x1080 before you switch on the TV - are you saying you autostart mythfrontend, have it set to full screen and you have no problems?
You mean like, how do I know the refrigerator light isn't on until I open the door? :) Good point.

If it weren't 1920x1080, I would expect the same problem with MythWelcome you described (not filling screen) unless it does have some auto-size setting of which neither of us is aware. Yes, I have no problems when I boot with TV off, autostart mythwelcome, and turn on the TV later.

Two other ideas.

Is it possible to set up HDMI-CEC to turn on the TV when the computer is booting? Would probably have to be before xorg loads, though, and I have no idea how, I just know "about" CEC.

Some people put xrandr commands changing screen resolution in ~/.xprofile, but again this would have to happen before mythwelcome/mythfrontend starts so maybe not in ~/.xprofile but somewhere that executes before mythwelcome/mythfrontend.

Edit: Oh, one more, if all else fails, how about only autostarting mythbackend, not the frontend, and only starting frontend after you've turned on the TV? Still an annoyance, but may less so that having to restart it, choose your poison. :)

Edit edit: If you can find the right xrandr commands to set your resolution, maybe create a script that sets the resolution, then starts mythwelcome or mythfrontend (whichever way you are set up) and replace the autostart of the frontend with this script. I already do this, but it's not for resolution, I wait up to a certain interval for the database to be available, then another interval for the backend to be available, before starting mythwelcome, to reduce the number of times mythfrontend can't connect to backend and shows "retry" when I turn on the TV.
mtvf2894
Junior
Posts: 81
Joined: Sat Apr 10, 2021 2:33 pm
Great Britain

Re: Frontend/Welcome Does Not Automatically Resize On Desktop Resolution Change? (TV Off vs On)

Post by mtvf2894 »

Thanks.

HDMI CEC may work for some but as electricity prices being as it is I do not want the TV turning on when it is not needed and it wouldn't make sense for me as it shutdowns and wakes up as required and it turning on the TV at the same time wouldn't make sense for my usage.

I am just using the built in AMD GPU drivers are you doing anything special?

My xorg.log has the following line (booting no TV on):

Code: Select all

[     9.201] (WW) AMDGPU(0): Unable to find connected outputs - setting 1024x768 initial framebuffer
When I turn on the TV the following gets added to xorg.log listing all the modelines supported by the TV:

Code: Select all

[   131.245] (II) AMDGPU(0): EDID vendor 
[   131.245] (II) AMDGPU(0): Using EDID range info for horizontal sync
[   131.245] (II) AMDGPU(0): Using EDID range info for vertical refresh
[   131.245] (II) AMDGPU(0): Printing DDC gathered Modelines:
[   131.245] (II) AMDGPU(0): Modeline "1920x1080"x0.0  148.50  1920 2008 2052 2200  1080 1084 1089 1125 +hsync +vsync (67.5 kHz eP)
....
At this point Linux sorts itself out and the desktop must be automatically resized.

I have tried xrandr but I am probably using it wrong or got confused with all the permutations I am trying as unless the TV is on it does not know about any resolutions so it cant set any resolution it doesn't know about. I perhaps need to use xrandr to add resolutions first that are separate from the autodetected ones? I have tried this but I could swear the AMD driver is just ignoring anything it doesn't know about though. So it doesn't matter what I try if it isn't a EDID resolution/modeline it will just fail.

As it works for you though perhaps the flavour of Ubuntu I am using is causing issues.

As I use welcome I think I am just going to put up with the welcome screen stuck at the top left of the screen when the Start Frontend button is pressed the TV is obviously on by then so I get a full screen frontend.
Current: v32 now v33.1 / Lubuntu 22.04 / AMD APU
Previous: v31 / Lubuntu 20.10 / AMD APU
Historic: Mythbuntu / NVIDIA GFX
User avatar
paulh
Developer
Posts: 909
Joined: Thu Feb 06, 2014 6:09 pm
Great Britain

Re: Frontend/Welcome Does Not Automatically Resize On Desktop Resolution Change? (TV Off vs On)

Post by paulh »

I had this problem on one system with embedded NVidia graphics I maintain and I seem to remember using a metamodes option in the xorg.conf to force the resolution that I wanted. Something like this in the Screen section

Code: Select all

Option         "metamodes" "1920x1080_50 +0+0"
Don't remember having to do anything else to get it to work.
wmorrison
Senior
Posts: 165
Joined: Sat Dec 01, 2018 12:05 am
United States of America

Re: Frontend/Welcome Does Not Automatically Resize On Desktop Resolution Change? (TV Off vs On)

Post by wmorrison »

mtvf2894 wrote:
Sun Aug 14, 2022 10:03 am
I am just using the built in AMD GPU drivers are you doing anything special?
Intel, but no, nothing special that I recall.
mtvf2894 wrote:
Sun Aug 14, 2022 10:03 am
My xorg.log has the following line (booting no TV on):

Code: Select all

[     9.201] (WW) AMDGPU(0): Unable to find connected outputs - setting 1024x768 initial framebuffer
I'm taking a look at my Xorg.0.log (booted with TV off and ssh'd to box.)

Interestingly, I see these lines (edited)

Code: Select all

[    21.607] (II) modeset(0): Output HDMI-1 has no monitor section
[    21.618] (II) modeset(0): Output HDMI-2 has no monitor section
[    21.618] (II) modeset(0): Output DP-1 has no monitor section
[    21.628] (II) modeset(0): Output HDMI-3 has no monitor section
[    21.628] (II) modeset(0): Output DP-2 has no monitor section
[    21.656] (II) modeset(0): EDID for output HDMI-1
[    21.656] (II) modeset(0): Manufacturer: VIZ  Model: 1004  Serial#: *****
(cut)
[    21.656] (II) modeset(0): Printing probed modes for output HDMI-1
[    21.656] (II) modeset(0): Modeline "1920x1080"x60.0  148.50  1920 2008 2052 2200  1080 1084 1089 1125 +hsync +vsync (67.5 kHz eP)
(cut other 1920x1080 and other resolution lines)
[    21.667] (II) modeset(0): EDID for output HDMI-2
[    21.667] (II) modeset(0): EDID for output DP-1
[    21.678] (II) modeset(0): EDID for output HDMI-3
[    21.678] (II) modeset(0): EDID for output DP-2
[    21.678] (II) modeset(0): Output HDMI-1 connected
[    21.678] (II) modeset(0): Output HDMI-2 disconnected
[    21.678] (II) modeset(0): Output DP-1 disconnected
[    21.678] (II) modeset(0): Output HDMI-3 disconnected
[    21.678] (II) modeset(0): Output DP-2 disconnected
[    21.678] (II) modeset(0): Using exact sizes for initial modes
[    21.678] (II) modeset(0): Output HDMI-1 using initial mode 1920x1080 +0+0
(cut)
Note lines that say "Printing probed modes for output HDMI-1" and "Output HDMI-1 connected."

HDMI-1 is my TV. I don't have anything else connected.

I think this means, even though the TV is off, it can query it with CEC and find the resolution? If so, maybe support for that varies by TV? Or, maybe in your TV setup menu, it is something that can be enabled/disabled?

Obviously it finds the resolution when you turn the TV on. I meant I wonder if support for CEC when TV is off varies or is configurable on the TV. And you aren't by chance turning the TV completely off with a power strip (switched outlet,) are you?
mtvf2894
Junior
Posts: 81
Joined: Sat Apr 10, 2021 2:33 pm
Great Britain

Re: Frontend/Welcome Does Not Automatically Resize On Desktop Resolution Change? (TV Off vs On)

Post by mtvf2894 »

Yes I have no problems with NVIDIA or Intel it is since I changed to AMD.

I was hoping the upgrade from 20.10 to 22.04 would have helped due to newer drivers but it just looks like a "feature" of AMD drivers or something specific to my setup.

The TV is just put into standby.

I will see if there is a CEC option in the TV but it is quite a dumb TV (by choice I didn't need a Smart TV) so menu options are not great.
Current: v32 now v33.1 / Lubuntu 22.04 / AMD APU
Previous: v31 / Lubuntu 20.10 / AMD APU
Historic: Mythbuntu / NVIDIA GFX
mtvf2894
Junior
Posts: 81
Joined: Sat Apr 10, 2021 2:33 pm
Great Britain

Re: Frontend/Welcome Does Not Automatically Resize On Desktop Resolution Change? (TV Off vs On)

Post by mtvf2894 »

Tried turning on all the CEC options in the TV menu and it unfortunately makes no difference.

I have got this sort of working using xrandr though.

Before starting welcome I have created a script that uses xrandr to add the appropriate mode, add it to the appropriate HDMI output and then set the HDMI output to the new mode and this changes the resolution so if the TV is not on and you VNC into the machine you now get a 1920x1080 resolution and welcome correctly starting at 1920x1080. :D

The only problem - the linux desktop/"start" menu is stuck at 1024x768 in the top left when you exit welcome. When opening any normal application like Firefox it works fine and is 1920x1080 but the "start" menu is stuck where it would be in 1024x768 mode. Not ideal. I wonder if there is a bash command to "refresh" the desktop to get it to redraw. Wonder why xrandr doesn't already do it?

You can probably guess when the TV is switched on the desktop resizes/fixes itself (even within the VNC window).

I can't win! (at least it is preferable to how it was)
Current: v32 now v33.1 / Lubuntu 22.04 / AMD APU
Previous: v31 / Lubuntu 20.10 / AMD APU
Historic: Mythbuntu / NVIDIA GFX
Post Reply