Black screen after enabling HDR on Wayland

Hello there! I just updated my install and to my pleasant surprise Plasma 6 is now out and I’m defaulted to Wayland. All seemed good, but my monitor’s settings were forgotten. I open display settings, set the resolution and scale, and seeing the option I decide to give HDR a go on one of my two monitors. Instant black screen no signal.

I wait for it to reverted, and it doesn’t seem to. I rebooted, logged back in, and immediately it’s all black again. I unplugged the HDR enabled monitor and still no luck. Luckily since the login screen works fine I can set my session to be the still working X11, but I have no idea how/if I can turn that setting off from here.

This very much sounds like a bug to properly report and get fixed (I’m using a GTX 1080, on that note), but for now I’d just like to try turning off that setting so I can use Wayland without issue. Any help would be much appreciated.

I think I had that happen during the beta once, but it never happened again, so I didn’t report it. Try removing the $HOME/.local/kscreen directory and try enabling it again to see what happens.

A lot of one time problems I had were caused because of me going back and forth between x11 and wayland.

I see. Maybe I just got unlucky then. I can’t find the kscreen directory you mentioned. .local doesn’t have it and if I search I see a whole bunch of them, so not sure which to delete. This is also assuming I can do this all from the X11 session without issue (don’t see why not but trying not to assume things).

My apologies. I messed up the directory that I gave you. It should be $HOME/.local/share/kscreen.

Gave it a go, no luck. Restarted back into plasma and saw my vertical monitor forgot it’s orientation, so it did do something, at least.

Yeah, that directory normally controls everything related to monitors, so removing it should reset everything. Was everything still black or did it turn black once you enabled hdr again?

Still black the instant I logged in.

Are panels there, can you see the mouse or right click the desktop?

The monitors stop receiving a signal and go into standby.

Ok, I believe that is a different problem than the one I encountered then. What version of the nvidia driver are you using?

Not entirely sure which package(s) are the important ones here, but nvidia-dkms is on version 550.54.14-4

That is the one that matters. This means you are on the latest driver. Let me see if I can find if the hdr setting lives in a different place and see if that can be removed or reset.

1 Like

I found it with some shell scripting magic. $HOME/.config/kwinoutputconfig.json. Inside of this file search for highdynamicrange. I believe it uses camelcasing which looksLikeThis. change the value from true to false and then reboot. Lets see if that works.

I opened it and does indeed have the setting there and only set for the monitor I actually set it for, so seems like the right thing. Sadly it’s not quite the solution, since after I try it, it’s still the same result and looking back at the file after rebooting in X11 shows it’s been set back to true. Tried twice to make sure I definitely set it to false first.

I see perhaps it is being overwritten by something else.

Two ides come to mind. We could try disabling kscreen to see if that is what is overwriting it. You would do this by going to system settings → session → background service. Another thing to try would be to make the file immutable after you change it. With chattr +i [file name]. I’ll continue too look to see what controls this file though.

Going to have to try the second one, since it does save properly and stay set to false until I reboot (unsure if it happens when rebooting into X11 though. I only tried into Wayland). I’ll try it as immutable.

1 Like

That worked! Messaging from Wayland as we speak. Opening the display settings shows it as disabled, so that’s not a separate value setting the one we set, but I’m still not sure if there’s anything to do before trying to make it mutable again to make sure it’s not overwritten again. Any ideas or should I just go for it and see if it’s sorted itself out?

I’m currently looking though the merge requests that prompted these changes as we speak. If found that here:

I’m assuming you are not a developer, so you probably don’t care about this stuff. I have been working as a developer for a couple years now. I’m not super amazing or anything, but I can read code. From what I see they stopped using kscreen for management on wayland in order to add new features like hdr. So looks like the kscreen thing wouldn’t have worked anyways.

All in all, it looks like it will take me a bit longer to look through the merge request and relevant code to see how this can be controlled.