~emersion/kanshi#74: 
Profile stopped working for v1.3

My config profile no longer works with version 1.3, resulting in a "no profile matched" message. The profile, which works with version 1.2.0-4 from the Arch repos is:

profile home {
    output "Unknown Q27G2G4" position -2179,0 scale 1.175 mode 2560x1440@143.9Hz
    output "MSI MAG161V" position 0,360 scale 1.4
}

From swaymsg -t 'get_outputs' I get:

Output HDMI-A-4 'Unknown MSI MAG161V AA1H010800597' (focused)
  Current mode: 1920x1080 @ 60.000 Hz
  Position: 0,0
  Scale factor: 1.000000
  Scale filter: nearest
  Subpixel hinting: unknown
  Transform: normal
  Workspace: 1
  Max render time: off
  Adaptive sync: disabled
  Available modes:
    1920x1080 @ 60.000 Hz
    1920x1080 @ 60.000 Hz
    1920x1080 @ 59.940 Hz
    1920x1080 @ 50.000 Hz
    1920x1080 @ 50.000 Hz
    1680x1050 @ 60.000 Hz
    1280x1024 @ 60.020 Hz
    1440x900 @ 59.901 Hz
    1366x768 @ 59.949 Hz
    1280x800 @ 59.910 Hz
    1280x720 @ 60.000 Hz
    1280x720 @ 59.940 Hz
    1280x720 @ 50.000 Hz
    1024x768 @ 60.004 Hz
    800x600 @ 60.317 Hz
    720x576 @ 50.000 Hz
    720x576 @ 50.000 Hz
    720x480 @ 60.000 Hz
    720x480 @ 60.000 Hz
    720x480 @ 59.940 Hz
    720x480 @ 59.940 Hz
    640x480 @ 60.000 Hz
    640x480 @ 59.940 Hz
    640x480 @ 59.940 Hz

Output HDMI-A-5 'Unknown Q27G2G4 0x000064B2'
  Current mode: 2560x1440 @ 59.951 Hz
  Position: 1920,0
  Scale factor: 1.000000
  Scale filter: nearest
  Subpixel hinting: unknown
  Transform: normal
  Workspace: 2
  Max render time: off
  Adaptive sync: disabled
  Available modes:
    2560x1440 @ 59.951 Hz
    2560x1440 @ 143.912 Hz
    2560x1440 @ 119.998 Hz
    2560x1440 @ 99.946 Hz
    1920x1200 @ 59.951 Hz
    1920x1080 @ 120.000 Hz
    1920x1080 @ 119.880 Hz
    1920x1080 @ 60.000 Hz
    1920x1080 @ 60.000 Hz
    1920x1080 @ 59.940 Hz
    1920x1080 @ 50.000 Hz
    1600x1200 @ 59.951 Hz
    1280x1440 @ 59.913 Hz
    1680x1050 @ 59.951 Hz
    1280x1024 @ 75.025 Hz
    1280x1024 @ 60.020 Hz
    1440x900 @ 59.951 Hz
    1280x800 @ 59.951 Hz
    1280x720 @ 60.000 Hz
    1280x720 @ 59.940 Hz
    1280x720 @ 50.000 Hz
    1024x768 @ 119.989 Hz
    1024x768 @ 75.029 Hz
    1024x768 @ 70.069 Hz
    1024x768 @ 60.004 Hz
    832x624 @ 74.551 Hz
    800x600 @ 119.972 Hz
    800x600 @ 75.000 Hz
    800x600 @ 72.188 Hz
    800x600 @ 60.317 Hz
    800x600 @ 56.250 Hz
    720x576 @ 50.000 Hz
    720x576 @ 50.000 Hz
    720x480 @ 60.000 Hz
    720x480 @ 60.000 Hz
    720x480 @ 59.940 Hz
    720x480 @ 59.940 Hz
    640x480 @ 75.000 Hz
    640x480 @ 72.809 Hz
    640x480 @ 66.667 Hz
    640x480 @ 60.000 Hz
    640x480 @ 59.940 Hz
    640x480 @ 59.940 Hz
    720x400 @ 70.082 Hz

I tried various small changes like deleting the "Unknown" part or adding it before the MSI monitor code, or deleting the 144Hz setting, or changing to single quotes, but nothing simple like this seemed to have any effect.

Status
REPORTED
Submitter
~adigitoleo
Assigned to
No-one
Submitted
5 months ago
Updated
3 months ago
Labels
bug

~emersion 5 months ago

Ah, it seems like kanshi will try to match " MSI MAG161V AA1H010800597" and " Q27G2G4 0x000064B2" (yes, with a leading space). That's not very nice indeed.

We should probably update match_profile_output to use the string "Unknown" just like Sway does to avoid confusion.

~detegr 5 months ago

I have the same issue with following profile:

profile "home" {
    output eDP-1 disable
    output "ViewSonic Corporation XG2402 SERIES" enable mode 1920x1080@144 scale 1.0
}

Outputs are:

Output eDP-1 'Unknown 0x0791 0x00000000'
Output DP-4 'ViewSonic Corporation XG2402 SERIES V4K180200581' (focused)

Changing the profile to have the exact match it matches correctly:

profile "home" {
    output eDP-1 disable
    output "ViewSonic Corporation XG2402 SERIES V4K180200581" enable mode 1920x1080@144 scale 1.0
}

This behavior seems to be different from version 1.2, is it by design or is this a bug?

~emersion 5 months ago

The man page says:

The criteria can either be an output name, an output description or "*".

So yes, this was a bug in kanshi which got fixed.

Soumya Ranjan Patnaik 5 months ago · edit

I have a similar issue. I have two monitors with me. swaymsg -t get_outputs gets me the following two monitors:

Output eDP-1 'Najing CEC Panda FPD Technology CO. ltd 0x0050 Unknown'
Output HDMI-A-1 'LG Electronics LG ULTRAGEAR 204NTDV9E466' (focused)

I'm using this profile in my config.

profile {
    output 'LG Electronics LG ULTRAGEAR 204NTDV9E466' mode
2560x1440@96.005Hz position 1920,0 transform normal scale 1
    output 'Najing CEC Panda FPD Technology CO. ltd 0x0050 Unknown'
mode 1920x1080@120.003Hz position 0,1077 transform normal scale 1
}

But I get the output

no profile matched

If I change the same configuration to

profile {
    output 'LG Electronics LG ULTRAGEAR 204NTDV9E466' mode
2560x1440@96.005Hz position 1920,0 transform normal scale 1
    output eDP-1 mode 1920x1080@120.003Hz position 0,1077 transform
normal scale 1
}

The profile starts working. It appears that using names with Unknown serial doesn't currently work.

~adigitoleo 4 months ago

Forgot to follow up: using exact matches works for me, without spaces, even if they contain "Unknown", e.g.

profile home {
    output "Unknown Q27G2G4 0x000064B2" position -2179,0 scale 1.175 mode 2560x1440@143.9Hz
    output "Unknown MSI MAG161V AA1H010800597" position 0,360 scale 1.4
}

So yes, this was a bug in kanshi which got fixed.

Can you clarify what you mean by this: was it a bug that partial names were matching before, or is it a bug that only exact names are matching? I'm happy switching to exact names in the config, just making sure.

~emersion 4 months ago

Yeah, what I mean is that the partial matching in previous versions of kanshi was unintentional.

~emersion 4 months ago

Simon Ser referenced this ticket in commit eddaeac.

~jokeyrhyme 3 months ago

Is there a way to get kanshi 1.3.0 to match make and model without serial number? My office provides hotdesks with many of the same monitor, and I'd prefer to not have to add serial numbers for every monitor to my configuration

I'd also generally prefer to not store serial numbers in my dotfiles (which are a public git repository)

~emersion 3 months ago

~jokeyrhyme, this would be #49.

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