Need to configure output with unstable names
My laptop, ROG Flow X13, is 360-convertible and has a touchscreen, but its output name is unstable; depending on some dynamic factors (seen [1] for longer explanation) it may be eDP-1 or eDP-2. So I need to configure its scaling (can be done with kanshi, but IMO a builtin method could be better?), and to configure touchscreen input binding (input-device.*.output = eDP-?). For now I need to edit config file for the binding part. We can either
- expose IPC interface to configure input device -> output binding, or
- add builtin matching rules for output.
Which do you prefer?
Btw binding stylus to eDP-* doesn't work, should this be a separate issue?
[1] the laptop has a mux-switch for its nvidia GPU, and the name changes when I turn on/off dGPU and reboot.
You can do 1) already, because you can set any configuration options. Though I suppose you'd also want #2763 to expose output-configuration changes to IPC, so that you know you need to update the option.
However I admit it would be better if we could just configure this in the config file. If you have any ideas, PRs welcome.
You can already make two [output:<name>] sections, one for eDP-1 and another for eDP-2, and set the scale in both. For input-device output binding, would it make more sense if we had a input-device = <device> in the [output] section(s) instead of output = <output> in the input-device section?
Thank you all, didn't know that I can set any config via IPC or that I can configure nonexistent outputs. W.r.t output.*.input-device, can this support repeating? Indeed I have
type=touch ELAN9008:00 04F3:40FD
type=tablet_tool ELAN9008:00 04F3:40FD Stylus
and for now only the first one binds successfully, i.e. finger works, but the stylus does not (orientation does not change, and can generate events on another output).