https://bugs.kde.org/show_bug.cgi?id=460341

--- Comment #92 from Steven Robbins <st...@sumost.ca> ---
I've made some progress on this issue -- at least for my case, which is
switching the monitor between two computers (see comment #81).

With debug logging [1] I was able to immediately see that when the monitor was
connected, it was marked as disabled in the configuration received.  I made a
straightforward change to KScreenDaemon::configChanged() that simply forces all
connected outputs to be enabled.  In version 5.26.4 this looks as follows; I
added the lines marked **:

void KScreenDaemon::configChanged()
{
    qCDebug(KSCREEN_KDED) << "Change detected";
    m_monitoredConfig->log();
    qCDebug(KSCREEN_KDED) << " -- after log";

    // Modes may have changed, fix-up current mode id
    bool changed = false;
    const auto outputs = m_monitoredConfig->data()->outputs();
    for (const KScreen::OutputPtr &output : outputs) {
**        if (output->isConnected())
**            output->setEnabled(true);
    ....

I don't understand the configuration mechanism well -- specifically I don't
know what module is generating the configuration after connecting the monitor
so I would bet that the above change is not suitable in general.  However, it
fixes my itch so I thought I'd share it here.

[1] https://community.kde.org/Solid/Projects/ScreenManagement

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to