GithubHelp home page GithubHelp logo

Comments (6)

johanmalm avatar johanmalm commented on September 26, 2024

Thanks for reporting. Agree, that doesn’t seem right. Will try with scale 1.5 to see if I can reproduce.

from labwc.

ahesford avatar ahesford commented on September 26, 2024

Even without scaling, you should see all windows coalesce on one display. Furthermore, if the display sleep/wake ordering is just right, you might see the relative positions (e.g., left/right) change after waking.

from labwc.

Consolatis avatar Consolatis commented on September 26, 2024

Maybe we should just ignore wlopm events and simply *not* change any state at all. I am not sure if we still get frame request at that point though. In some setups we may also get a destroy signal for the display in those cases (in my case for example when just selecting another output or physically turning the monitor off).

from labwc.

ahesford avatar ahesford commented on September 26, 2024

The plot thickens. I tested on two laptops, each with Intel graphics of different generations, and could not reproduce the issue (although one of the test setups triggered some other corner case). This could be a quirk of the displays (those that cause problems are Samsung U28E570 and U28E590 units) or an amdgpu issue (as noted before, this is a Radeon RX 580).

The first laptop has 12th-generation Intel Xe graphics and a 1920x1200 display connected to eDP-1. I run that with scale 1.25 and, after a power cycle using wlopm, nothing changed. All open windows remained where I placed them, and the display scale was not reset.

The second laptop has 9th-generation Intel graphics and a 3840x2160 display. I can run this standalone and get the same results as the other laptop; power-cycling the display leaves the window positions and scale 2.0 unchanged. I also run this laptop with the internal display disabled and two LG 4K displays connected---one on an internal HDMI connector (which I believe passes through an Nvidia GPU that is disabled at boot using an acpi_call invocation) and another connected to the DP port on a Thunderbolt dock. In this configuration, I can power cycle both external displays and the display arrangement, scale and window placement survives as expected.

The corner case was observed when I turned on the internal display alongside the two external displays. In that test, I put all three displays to sleep with wlopm --off '*', waited for things to shut down, and woke them up with wlopm --on '*'. All three displays went dark, but the two external displays would not power on again. I tried another wlopm cycle (this time directed at a particular display), switching kanshi profiles, and even manually running wlr-randr to try to kick them on, but it required restarting the labwc session to get my displays back. I suspect this is an unrelated (or only marginally related) issue.

from labwc.

Ph42oN avatar Ph42oN commented on September 26, 2024

I have this happening when i switch beetween adaptive sync and MPRT mode on my monitor, or if i turn them off and on with power button. I can use kanshi to automatically set monitor positions, refresh rate and rotation, but window arrangement will still be lost.

from labwc.

ahesford avatar ahesford commented on September 26, 2024

This does not seem to be a labwc bug. I'm not even sure this is a wlroots bug, although it may be possible to modify wlroots behavior to work around the problem. Attached is a debug log wherein I:

  1. Launch labwc with two DisplayPort outputs
  2. The autostart script launches kanhsi with both displays in the desired arrangement, each set to scale 1.5
  3. Launch two foot terminals via a keybind action, placing one on each output
  4. After waiting a minute, issue the command wlopm --off DP-2; this is annotated in the log with a ####### header
    • Note that backend/drm/drm.c in wlroots reports "connector DP-2: Turning off"
  5. Launch another terminal, run wlr-randr to confirm that both displays are still "enabled"
  6. Launch wdisplays to confirm the same, and also observe that DP-2 shows up as solid gray in the preview window; wdisplays knows that, although the display is enabled, it is not showing a picture
  7. Issue the command wlopm --on DP2; this is again annotated in the log with a ####### header
    • Note that it is only after the display-on action that wlroots reports "udev event for card0 (change)" and, later, "Received hotplug event for /dev/dri/card0"

At this point, wlroots destroys the DP-2 output and recreates it; this triggers a labwc layout change, and all windows that were originally on DP-2 are then relocated to DP-1 and centered. The recreation does not trigger kanshi, so the display opens in its preferred resolution with scale 1.0 rather than the previously set scale 1.5.

labwc.debug.log

from labwc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.