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

Windows end up behind panel when maximized, with certain fractional scaling values and/or monitor refresh rates #10198

Open
gkatev opened this issue Jul 8, 2021 · 4 comments

Comments

@gkatev
Copy link

gkatev commented Jul 8, 2021

 * Cinnamon 5.0.4
 * Arch Linux
 * AMD Navi 10 (5700XT) w/ amdgpu

Issue
Hi, I'm having an issue with a new monitor, that seems to be due fractional scaling and/or >60Hz refresh rate.
The problem is, when I maximize a window (or tile it), its lowermost part ends up behind the Cinnamon Panel instead of just above it.

Expected:
above-panel
Observed:
behind-panel

How I reproduce it

  1. Monitor is at 100% scaling, 2560x1440 @ 60Hz.
  2. Optionally enable Hi-DPI (2x).
  3. Use xrandr --scale 1.83x1.83.
  4. Switch to 165Hz (same result with 120, 144)
  5. Maximize a window, via button, shorcut, or drag-to-top
  6. The window ends up behind/below the panel

Unfortunately, while the problem is 100% consistent, it appears to be quite dependent on a number of factors.
Things that, if changed, may alter the observed behavior:

  • 60Hz refresh rate: Usually OK, unless if going 60 -> 165 -> 60
  • Different scaling value: OK (possibly ok with some, not with others)
  • Side monitors attached with no scaling: OK
  • Side monitors attached with specific scaling value: Not ok

Does this seem like something that could be reproduced/debugged? Let me know if I can help.
Or might this not be directly related to cinnamon or muffin? (but instead due to X?)

@mtwebster
Copy link
Member

Hi, does this happen if you use fractional scaling via the cinnamon-settings Display page?

@gkatev
Copy link
Author

gkatev commented Jul 14, 2021

No, it seems to be happening for specific scaling values, and I have not come across it with the predefined ones. But as I understand it, the "Display" settings page also uses xrandr behind-the-scenes? (after applying scaling with the xranrd command + hidpi switch, cinnamon shows a fractional scaling setting of 109%)

@mtwebster
Copy link
Member

Yes it does - not with the command-line tool, though I took the tool as a reference implementation for our own.

I wonder if there could be some interference from our randr daemon. You could try killing that (csd-xrandr) - if you even have it enabled in the first place. Some people with odd monitor setups disable it and opt for an x config file instead.

If it is running, you can try modifying ~/.config/cinnamon-monitors.xml with your custom scale, then restart csd-xrandr:

There's a 'scale' property for each monitor - you should be able to set that to your 1.83 - you may need to adjust the x position of any monitor to the right - the 'width' and 'height' values should always be the monitor's actual resolution, but the x and y positions of each monitor are based on their 'logical' size.

@gkatev
Copy link
Author

gkatev commented Jul 15, 2021

Indeed it is affected by csd-xrandr. After killing it and applying my configuration via xrandr, the problem stopped appearing.

If I apply the config via xrandr, but csd-xrandr is still running, the problem happens. And when it happens, it persists after killing csd-xrandr. After killing it, and using the xrandr command all is good.

The same is observed with the xml file. I kill csd-xrandr, edit the xml as desired, and start csd-xrandr. My desired config is applied automatically, but the problem occurs. Kill csd-xrandr, run xrandr command --> okay again.

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

2 participants