(2020-01-08, 13:30)black_eagle Wrote: (2020-01-08, 12:20)ThumbOne Wrote: I have to set it to the primary display (which Kodi is on) first, and respond yes, to the prompt, then change it back to the secondary one and respond yes to the prompt before it moves to the secondary monitor.
Need to know more about how you have stuff configured really. For instance, on my setup, the Xserver has two different screens, one on HDMI-0 and one on DVI-0. The HDMI one is connected to my amp and then on to my TV, the DVI output is my desktop monitor.
Both of the Xserver screens are completely independent of each other. Perhaps a debug log (wiki) of you starting Kodi (when it starts on the wrong display) would be beneficial.
Thanks for this too and apologies for my tardy response. All no rush clearly. Highly intermittent issue, and of late rather uncommon. Posted kodi-xrandr output already and description of connection, but for the sake of completeness:
1) Kodi running on an MintBox 2 with Linux Mint 29.3 on it.
2) The Mintbox has two ports out back a a displayport and an HDMI port.
3) I have a TV plugged into one, and a Yamaha AVR into the other.
4) The Yamaha AVR drives surround sound speakers and a projector and it takes HDMI input for that.
5) The TV just takes HDMI input
6) I see them as TV=HDMI-1 and Yamaha=HDMI-2 on the Mintbox.
7) I'm using stock standard X-windows as Mint 19.3 comes packaged with and it uses from memory LightDM but probably slowly irrelevant detail
8) The Mintbox, in spit e of having a TV and Projector (via a Yamaha AVR) attached is essentially headless from my perspective as neither of these is generally on. They are turned on as and when needed to view something.
9) But I use Kodi primarily as a music player and so the screens are mostly off and Kodi is playing music for me.
10) I connect to and maintain the HTPC (MintBox) using Nomachine which works well. There's a neat coincedence that works in my favour, in that both Mintbox displays and my desktop display are all 1920x1080 pixels. Nomachine I can setup so that by default I am looking right at HDMI-2 which is my workspace on the HTPC. HDMI-1 is off-screen and has Kodi on it. Noamchin is so slick I can just move my mouse up and when it goes offscreen it moves the remote displays down, in short I can scroll up and down from HDMI-1 to HDMI-2 on the HTMP just by moving my mouse up and down past the top and bottom display boundary.
11) HDMI-2 is the Primary display meaning it has the task bar and system menus. I'm using the Cinnamon desktop, which has a totally ordinary Windows 7 like look and feel.
12) Common use case is: I connect to the HTPC, I'm looking at HDMI-2, I start Kodi, Kodi starts on HDMI-1 and I carry on, I don't need to see Kodi. If I want to see Kodi I just turn the TV on and sometimes I do, to interact with it.
13) The intermittent and puzzling issue is that it starts on HDMI-2. Respecting the Fullscreen config it masks my entire primary display including task bar and menu.
14) I then go to the Kodi settings and see it's configured fro HDMI-1. So I have to press enter and it switches formally to HDMI-2 (which does nothing in practice except take a moment and prompt me with Ary you sure?), Then I press enter again and it switches back to HDMI-1 this time actually moving to HDMI-1. Then I'm done. It's a bizarre start up sequence, when it fails.
I can get a debug log easily enough with one caveat. It's not so easy. It's not so easy because debug mode is so ugly and verbose on screen, and the problem so intermittent, that I have always put it on, and turned it off again before I got the odd behaviour ;-). It is frustrating intermittent.
Which is why I sort of wondered though if there was some way to start Kodi with a command line option that forces it to HDMI-1 say. But I suspect there isn't. If there was I could fix my shortcuts to use that. As it stands it looks like an intermittent Kodi bug/feature.
It may relate indeed to something we see in xrandr when it's happened. But it could be some system transience that isn't well captured in that or a debug log. I'm imagining that as Kodi starts for some reason at a system level HDMI-1 fails to be there so it opts for HDMI-2 but HDMI-1 is there by the time it's fully started. I only muse in this direction because one the things I most hate about HDMI is the way it feeds back to the host the on/off status of the screen. In short when I turn the TV off or on Mint knows about it. And sometimes weird X refreshes happen because of such state changes.
In fact it's a total aside, but the reason I'm on Mint and Mintbox is that I was running Win 7 on a NUC as and HTPC and this HDMI back signalling from display to host just caused regular blue screens. So I eventually trashed Win 7 and installed Mint and things were better for ages then went pair shaped again for no obvious reason with state changes of the Yamaha (switching the projector on/off) causing the NUC to crash. Oft times unable to reboot, my having to open it and bridge two jumpers to reset the danged thing. All because of switching an HDMI projector on/off.
So I trashed the NUC and got a Mintbox and it's been pretty smooth ever since. No more HDMI shenanigans and the worst I see is X doing some weird repainting stuff as one of the outputs changes state but it always settles back down in under a minute (it's a little slow but not painfully so so probably 10 or 15 seconds all up) and it's business as usual, no system crashes (lesson learned: avoid NUCs for HTPC use).
And only reason I share that is as backstory to this: I'm very wary that state changes in attached HDMI devices can cause transient oddities at the system (X windows) level.
The only caveat is, I don't correlate Kodi's intermittent wrong display startup with any state changes in attached HDMI devices.
So it remains an intermittent mystery. For better or worse which hasn't raised it's head in a while. I'm waiting patiently for Kodi 19 before do any serious add-on work as I have no desire to start in Python2 and Kodi-19 promises Python3 finally.