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 configuration lost on sway reload #4687

Closed
jeffmakes opened this issue Oct 30, 2019 · 1 comment
Closed

Display configuration lost on sway reload #4687

jeffmakes opened this issue Oct 30, 2019 · 1 comment

Comments

@jeffmakes
Copy link

sway version 1.2, default configuration (plus a few extra key bindings), Fedora 30 (copr gumieri/sway)

I have a Lenovo X1 laptop with Intel HD Graphics 520. It only has enough bandwidth to drive two DP 4k monitors at 30Hz, plus its internal panel.

It's driving these outputs nicely:

Output eDP-1 'Unknown 0x183D 0x00000000'
  Current mode: 1920x1080 @ 60.049000 Hz
Output DP-5 'Samsung Electric Company U28E590 HTPJ203148'
  Current mode: 3840x2160 @ 30.000000 Hz
Output DP-6 'Unknown MAG321CURV DA2A019160072' (focused)
  Current mode: 3840x2160 @ 30.000000 Hz

If I reload (mod+Shift+c), sway defaults back to driving the monitors at 60Hz, which doesn't work.
There is no output configuration in my sway config file. That's what I want - I will configure via kanshi because I need hotplugging to work nicely.

Steps to reproduce:

$ swaymsg output DP-5 mode 3840x2160@30Hz
$ swaymsg output DP-6 mode 3840x2160@30Hz

everything looks good...

$ swaymsg reload

everything is broken.

In the log file below I start sway, run the two swaymsg output lines above, then reload sway.
swaymsg -t get_outputs >/tmp/get_outputs.log get_outputs.log
sway -d 2> /tmp/sway-monitor-reset.log sway-monitor-reset.log
cat ~/.config/sway/config > config.txt config.txt

rpigott pushed a commit to rpigott/sway that referenced this issue Nov 5, 2019
For most output config options, applying a config with the option unset
does not change the current value, but a modeset is always attempted
even if the output has no mode configured. This unexpectedly causes a
config reload to reset output modes, even if none are configured.

Change it to leave unconfigured outputs that already have a mode alone.

Fixes swaywm#4687
@emersion
Copy link
Member

emersion commented Nov 5, 2019

This is by design -- reloading removes all configuration applied at runtime (ie. not in the config file).

This particular kanshi issue is being discussed at emersion/kanshi#43

@Xyene Xyene closed this as completed Apr 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

3 participants