~emersion/kanshi#60: 
Scale factor applied to output is different from the provided in the config file

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).

Status
REPORTED
Submitter
github.com:Gochkin (unverified)
Assigned to
No-one
Submitted
9 months ago
Updated
9 months ago
Labels
No labels applied.

github.com:Gochkin (unverified) 7 months ago · edit

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.

Register here or Log in to comment, or comment via email.