pop-os / cosmic-epoch

Next generation Cosmic desktop environment
2.81k stars 78 forks source link

Cannot re-enable internal laptop display after disabling it #492

Open sgued opened 1 month ago

sgued commented 1 month ago

Hi,

Testing around the alpha, I tried toggling the "Enable display" toggle in the display settings for my internal laptop display (I have a separate monitor that is still enabled), but I cannot toggle it back.

The error comes from cosmic-randr:

$ cosmic-randr enable eDP-2
Error: "configuration failed"

I have a dual-gpu setup (lenovo Legion 16, with Ryzen 5800H with integrated CPU, and Radeon 6600).

Both external and internal displays were initially properly enabled, and are detected by the settings app and cosmic-randr:

$cosmic-randr list
HDMI-A-1 (enabled)
  Model: HP 24o
  Physical Size: 530 x 300 mm
  Position: 1920,0
  Scale: 100%
  Transform: normal
  Adaptive Sync: false

  Modes:
    1920x1080 @  60.000 Hz (current) (preferred)
    1920x1080 @  59.940 Hz
    1920x1080 @  50.000 Hz
    1680x1050 @  59.883 Hz
     1600x900 @  60.000 Hz
     1440x900 @  59.901 Hz
    1280x1024 @  60.020 Hz
     1280x800 @  59.910 Hz
     1280x720 @  60.000 Hz
     1280x720 @  59.940 Hz
     1280x720 @  50.000 Hz
     1024x768 @  60.004 Hz
      800x600 @  60.317 Hz
      720x576 @  50.000 Hz
      720x480 @  60.000 Hz
      720x480 @  59.940 Hz
      720x400 @  70.082 Hz
      640x480 @  60.000 Hz
      640x480 @  59.940 Hz
eDP-2 (disabled)
  Model: 1701
  Physical Size: 340 x 190 mm
  Position: 0,0
  Scale: 100%
  Modes:
    1920x1080 @ 165.004 Hz (preferred)
    1680x1050 @ 165.004 Hz
     1440x900 @ 165.004 Hz
    1280x1024 @ 165.004 Hz
     1280x800 @ 165.004 Hz
     1280x720 @ 165.004 Hz
     1024x768 @ 165.004 Hz
      800x600 @ 165.004 Hz
      640x480 @ 165.004 Hz

Killing and restarting cosmic-session does not fix the issue. I'll test if a full reboot does later.

This is expected instability for an alpha, but the things that work show a really promising future for a tiling DE that "just works" like the main DEs and has good default and discoverable options. I'm thrilled! Keep up the good work!

Drakulix commented 1 month ago

You can always reset your output configuration by deleting ~/.local/state/cosmic-comp/outputs.ron. (We probably should add an option to cosmic-settings to do that, though that is a separate issue.)

But instead of simply resetting could you try using wdisplays to re-enable your laptop screen? If that works, this points to an issue with cosmic-randr. If not the issue is more likely to be caused by cosmic-comp. That would be very helpful for further debugging!

sgued commented 1 month ago

wdisplays did not work (it said the compositor failed to apply). Rebooting did not work. Removing outputs.ron worked. The display was marked as enabled in outputs.ron.

Drakulix commented 1 month ago

In that case, could you upload the logs from this command: journalctl --user _COMM=cosmic-comp? That should hopefully give us more context for why the compositor wasn't able to enable the screen. Thanks!

sgued commented 1 month ago

Trying to enable the display leads to the following log line being produced:

Aug 08 20:21:03 archlinux cosmic-comp[2016]: Failed to apply config. Resetting
diegobfernandez commented 1 month ago

I am having the same issue on a Apple Silicon M1 Pro, so no dual GPU.

Tried deleting outputs.ron but same issue.

Output of journalctl --user _COMM=cosmic-comp:

-- No entries --

Output of cosmic-randr enable eDP-1:

Error: "configuration failed"

Similar "configuration failed" error with other wlroots display manager programs.

First time seeing this issue. Before I was using Hyprland with a similar display setup and I could enable it back.

diegobfernandez commented 1 month ago

Just used comic-greeter to init a Hyprland session and tried using wdisplays and it works to disable/enable the internal display.

diegobfernandez commented 1 month ago

This seems to be a duplicate of #431

The extra step described on that ticket helped me solve the issue.

Aftere deleting ~/.local/state/cosmic-comp/outputs.ron you have to log out in order for it to work.