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

Disabled display stays disabled even if it's the only display in system #37

Open
romangg opened this issue Nov 2, 2020 · 7 comments
Open
Labels

Comments

@romangg
Copy link
Member

romangg commented Nov 2, 2020

In GitLab by @chermnyx on Nov 2, 2020, 12:23

Precondition: System with two or more displays; one of them is disabled in settings.

If all the displays but the disabled one were disconnected, the disabled display stays disabled (unlike stock kscreen behavior which enables the display back and disables when any other display gets connected)

@romangg
Copy link
Member Author

romangg commented Nov 2, 2020

Thanks for the report. Some more info please. Hardware? X11? Desktop environment?

@romangg
Copy link
Member Author

romangg commented Nov 2, 2020

In GitLab by @chermnyx on Nov 2, 2020, 15:22

I'm using KDE 5.20.2 with disman 0.520.0 on X11. Looks like the problem only appears after relogin/reboot. Both screens (internal laptop screen and external one) are connected to the intel gpu; but I use PRIME offloading form nvidia (with proprietary drivers). My xorg configuration:

Section "Files"
        ModulePath "/usr/lib/nvidia"
        ModulePath "/usr/lib32/nvidia"
        ModulePath "/usr/lib32/nvidia/xorg/modules"
        ModulePath "/usr/lib32/xorg/modules"
        ModulePath "/usr/lib64/nvidia/xorg/modules"
        ModulePath "/usr/lib64/nvidia/xorg"
        ModulePath "/usr/lib64/xorg/modules"
EndSection

Section "ServerLayout"
        Identifier "layout"
        Screen 0 "nvidia"
        Inactive "intel"
EndSection

Section "Device"
        Identifier "nvidia"
        Driver "nvidia"
        BusID "PCI:1:0:0"
        Option "TripleBuffer" "true"
EndSection

Section "Screen"
        Identifier "nvidia"
        Device "nvidia"
        Option "AllowEmptyInitialConfiguration"
        Option "AllowExternalGpus"
EndSection

Section "Device"
        Identifier "intel"
        Driver "modesetting"
        BusID "PCI:0:2:0"
EndSection

Section "Screen"
        Identifier "intel"
        Device "intel"
EndSection

Section "ServerFlags"
        Option "IgnoreABI" "1"
EndSection

The problem does not appear with kscreen.

@romangg
Copy link
Member Author

romangg commented Dec 4, 2020

In GitLab by @Kodehawa on Dec 4, 2020, 19:40

Reading the code this doesn't make sense to me. We shouldn't be saving any sort of "disabled" attribute to the global controls, and the display settings are saved in a per-arrangement basis (aka, a single display is a different config -- unless you somehow managed to disable it on the single-display config)

Mind sending the files on ~/.local/share/disman? They don't contain any confidential info, unless you believe your display config is such :)

Thanks.

@romangg
Copy link
Member Author

romangg commented Dec 4, 2020

In GitLab by @chermnyx on Dec 4, 2020, 22:26

disman.tar.zst

@romangg
Copy link
Member Author

romangg commented Dec 4, 2020

In GitLab by @chermnyx on Dec 4, 2020, 22:30

Looks like it is disabled for single screen layout. Could this occur if disman was started with laptop screen disabled (via another screen manager or xrandr)?

@romangg
Copy link
Member Author

romangg commented Dec 4, 2020

Could this occur if disman was started with laptop screen disabled (via another screen manager or xrandr)?

Disman actually tries to always load the config it has on an hotplug event (or generate a new one if such does not exist) so it is more likely it sets the wrong value itself.

From your configs it looks like the laptop screen was disabled in the two-screen config and then also became disabled in the one-screen config.

I could imagine two reasons for that:

  • You started out with the two-screens config and never were in the one-screen config. When disconnecting the external screen the new generated config this did not work correctly (did not enable the display).
  • You started out with the one-screen config, then changed to two-screen config and disabled the internal display. At this moment there should still be enabled = true in the one-screen config. But then you went into standby or closed the laptop lid, disconnected the external display and only then woke the laptop up again or respectively opened the lid. And Disman does not handle the standby/lid correctly when now loading the one-screen config.

@romangg
Copy link
Member Author

romangg commented Dec 4, 2020

In GitLab by @Kodehawa on Dec 4, 2020, 23:08

As a workaround, you can set disabled to false on the single display config :)

Something is definitely going wrong here, it's probably what Roman pointed out. Or that you started disman with the screen already disabled (but unlikely, as Roman said), and there was no other display on your system (probably, not sure here)

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

No branches or pull requests

1 participant