pop-os / cosmic-randr

Library and utility for displaying and configuring Wayland outputs
Mozilla Public License 2.0
28 stars 4 forks source link

Display(s) go black when enabling second monitor #22

Open natsume42 opened 2 months ago

natsume42 commented 2 months ago

Description of Issue

I have two displays attached: one monitor and a TV set. When executing cosmic-randr enable HDMI-A-1 to enable the TV set, both screens go black. This is true also for doing the same using the Settings UI.

Disabling HDMI-A-1 again does not bring the first output back. Only after a reboot the display is back again.

Further Observations

Here is what I used: cosmic-randr enable HDMI-A-1 && cosmic-randr mode --refresh 29.972 --pos-x 3072 --pos-y 0 --test HDMI-A-1 1920 1080

Expected Behavior

Question

Is there a different way of disabling/reenabling outputs in a more reliable manner, which I am not aware of?

liljom commented 2 weeks ago

Same happens to me. Got a laptop plus external display. If I disable the external diplay, then enable it again, then both go black. When I unplug the external one, then laptop display returns

iamkartiknayak commented 2 weeks ago

This might help if you're still having problems

https://github.com/pop-os/cosmic-epoch/issues/1040

natsume42 commented 2 weeks ago

Thanks for hinting at ~/.local/state/cosmic-com/outputs.ron. Turns out that I had two sets of display configurations in it. I removed the duplication, but this did not resolve the issue either.

Also logging out and logging in again as a work-around to bring back the black displays does work for me as well. This avoids the need for a complete reboot.

In order to avoid the need for a session logout, I discovered that switching from the cosmic (wayland) session to another terminal session and back again also does the trick of bringing back the black displays. (For me switching between terminal sessions is done using ctrl+alt+Fx with Fx being the function key of the respective tty session.)

Additional note: I am using cosmic-randr-cli 0.1.0.