Skip to content
This repository has been archived by the owner on Sep 15, 2021. It is now read-only.

Scale factor applied to output is different from the provided in the config file #94

Open
Gochkin opened this issue Jan 15, 2021 · 1 comment

Comments

@Gochkin
Copy link

Gochkin commented Jan 15, 2021

I have encountered a strange problem. In my config file I set:
output eDP-1 mode 1920x1200@59.95Hz scale 1.2 position 0,0

But the applied scale factor is different, here is the output from sway -t get-outputs command:

Output eDP-1 'Sharp Corporation 0x14F9 0x00000000' (focused)
  Current mode: 1920x1200 @ 59.950001 Hz
  Position: 0,0
  Scale factor: 1.199219
  Scale filter: linear
  Subpixel hinting: unknown
  Transform: normal
  Workspace: 2: general
  Max render time: off
  Adaptive sync: disabled
  Available modes:
    1920x1200 @ 47.959999 Hz
    1920x1200 @ 59.950001 Hz

Firstly I thought that my laptop screen is somehow not supporting the resolution with 1.2 scale factor, but then I have tried apply the same command through swaymsg and it worked as supposed to:

$ swaymsg 'output eDP-1 mode 1920x1080@60Hz scale 1.2 position 0 0'
$ swaymsg -t get_outputs
Output eDP-1 'Sharp Corporation 0x14F9 0x00000000' (focused)
  Current mode: 1920x1200 @ 59.950001 Hz
  Position: 0,0
  Scale factor: 1.200000
  Scale filter: linear
  Subpixel hinting: unknown
  Transform: normal
  Workspace: 2: general
  Max render time: off
  Adaptive sync: disabled
  Available modes:
    1920x1200 @ 47.959999 Hz
    1920x1200 @ 59.950001 Hz

It is not a huge problem, but it force me to recalculate and apply "ugly" pixel offset for external monitors (in my case 1920 / 1.199219 = 1601.042 instead of just 1600).

@Gochkin
Copy link
Author

Gochkin commented Mar 3, 2021

Is there any insight on what is happening here and if this is a bug on kanshi side? As I said before, applying the same configuration through swaymsg works as expected. For now I apply an additional exec swaymsg command to apply right scale factor.

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

No branches or pull requests

1 participant