Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
natsume42 opened this issue Aug 10, 2024 · 3 comments
Open

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

natsume42 opened this issue Aug 10, 2024 · 3 comments

Comments

@natsume42
Copy link

natsume42 commented Aug 10, 2024

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

  • Disabling an output device also deletes all associated mode information.
  • Renabling an output device again therefore uses position (0,0), conflicting with the area of the other output.
  • Renabling an output device after setting its mode sometimes work on CLI, sometimes both displays go black.
  • Suspend/Resume seems to reinitialize things as well.

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

  • Disabling a device should not delete its settings, so it can be reenabled more easily.
  • Enabling an additional output should not impact existing outputs.

Question

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

@liljom
Copy link

liljom commented Sep 30, 2024

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

@CodingHashira
Copy link

This might help if you're still having problems

pop-os/cosmic-epoch#1040

@natsume42
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants