You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using input-remapper to remap a key combination on my xbox controller (L3 + R3) to ALT-F4 in order to more easily close applications on my HTPC.
Defined input-remapper in my nixos configuration:
# Enable input-remapper
services.input-remapper = {
enable = true;
## Enable built-in udev rules for when Xbox Controller is plugged in/connected through sunshine
enableUdevRules = true;
};
And set up the rules through the input-remapper-gtk graphical UI. This was working.
However, when rebooting the machine, the rules do not load in and systemctl status input-remapper says that it cannot autoload the rules:
[root@gamer:/home/gamer]# systemctl status input-remapper
● input-remapper.service - Service to inject keycodes without the GUI application
Loaded: loaded (/etc/systemd/system/input-remapper.service; enabled; preset: enabled)
Drop-In: /nix/store/nw5zirqqw9kiq03djnkfgdkkxx3i97jx-system-units/input-remapper.service.d
└─overrides.conf
Active: active (running) since Sun 2024-04-14 13:05:29 CEST; 38s ago
Main PID: 1110 (.input-remapper)
IP: 0B in, 0B out
IO: 2.5M read, 0B written
Tasks: 5 (limit: 38257)
Memory: 31.8M (peak: 32.3M)
CPU: 215ms
CGroup: /system.slice/input-remapper.service
├─1110 /nix/store/gd3shnza1i50zn8zs04fa729ribr88m9-python3-3.11.8/bin/python3 /nix/store/lfkk1vqblrg36saaa6chivl0w4j7709c-input-remapper-2.0.1/bin/.input-remapper-service-wrapped
└─1277 /nix/store/gd3shnza1i50zn8zs04fa729ribr88m9-python3-3.11.8/bin/python3 /nix/store/lfkk1vqblrg36saaa6chivl0w4j7709c-input-remapper-2.0.1/bin/.input-remapper-service-wrapped
Apr 14 13:05:29 gamer input-remapper-service[1110]: python-evdev 1.7.0
Apr 14 13:05:29 gamer systemd[1]: Started Service to inject keycodes without the GUI application.
Apr 14 13:05:32 gamer input-remapper-service[1110]: Request to autoload for "Mouse passthrough"
Apr 14 13:05:32 gamer input-remapper-service[1110]: ERROR: Request to autoload "Mouse passthrough" before a user told the service about their session using set_config_dir
Apr 14 13:05:32 gamer input-remapper-service[1110]: Request to autoload for "Mouse passthrough"
Apr 14 13:05:32 gamer input-remapper-service[1110]: ERROR: Request to autoload "Mouse passthrough" before a user told the service about their session using set_config_dir
Apr 14 13:05:32 gamer input-remapper-service[1110]: Request to autoload for "Logitech Wireless Mouse PID:4038"
Apr 14 13:05:32 gamer input-remapper-service[1110]: ERROR: Request to autoload "Logitech Wireless Mouse PID:4038" before a user told the service about their session using set_config_dir
Apr 14 13:05:54 gamer input-remapper-service[1110]: Request to autoload for "Microsoft X-Box 360 pad"
Apr 14 13:05:54 gamer input-remapper-service[1110]: ERROR: Request to autoload "Microsoft X-Box 360 pad" before a user told the service about their session using set_config_dir
If I try to stop and start the input-remapper service, it still gives me the same error. HOWEVER, when I stop the input-remapper service (systemctl stop input-remapper.service) and then start the program manually (with input-remapper-service) then the rules do load in when I connect my controller
[root@gamer:/home/gamer]# input-remapper-service
input-remapper-service 2.0.1 2.0.1 https://github.com/sezanzeb/input-remapper
python-evdev 1.7.0
Loaded config from "/home/gamer/.config/input-remapper-2/config.json"
Request to autoload for "Microsoft X-Box 360 pad"
Found "Sleep Button", "Microsoft Microsoft® Nano Transceiver v2.0", "ASRock LED Controller", "Logitech Wireless Mouse PID:4038", "Mouse passthrough", "Microsoft X-Box 360 pad"
Autoloading for "Microsoft X-Box 360 pad"
Request to start injecting for "Microsoft X-Box 360 pad"
Loading preset from "/home/gamer/.config/input-remapper-2/presets/Microsoft X-Box 360 pad/Quit Application.json"
Starting injecting the preset for "Microsoft X-Box 360 pad"
I am autologging into my gamer account (using services.autologin.user = "gamer"), don't know if that could be the cause of this? However, I find it strange that stopping and starting the service after I've logged in doesn't work, but manually starting the program does...
Steps To Reproduce
Steps to reproduce the behavior:
Set up user autologin with option services.autologin.user = ""; (don't know if this is required to trigger the error)
Set up input-remapper service with services.input-remapper.enable = true; and use udevrules with enableUdevRules = true;
Set up a rule through input-remapper-gtk
Reboot the machine
Expected behavior
I would expect the systemd service to autoload the rules just as it does when I manually start input-remapper-service from the command line
Screenshots
If applicable, add screenshots to help explain your problem.
The input-remapper remapper service that's part of the system doesn't know which config to use until a user logs in and sets a config folder to use. As far as I can tell this is an intentional design decision for input-remapper, it wants to be multi-user and when you log out and log in as a different user a different config can be loaded.
If you use home-manager something like this works to automate launching the user part of input-remapper on login, assuming your desktop environment supports xdg autostart. An autostart desktop file is the upstream supported way to set it up.
Thanks @LunNova for the quick response! I've used home-manager in order to run the input-remapper-autoload.desktop file to solve my issue.
I also tried to create an user systemd service that would load the config but there I encountered the same issue as mentioned in my first post, maybe it had to do with autologin... But anyway: doing it through home manager worked.
Describe the bug
I'm using input-remapper to remap a key combination on my xbox controller (L3 + R3) to ALT-F4 in order to more easily close applications on my HTPC.
Defined input-remapper in my nixos configuration:
And set up the rules through the input-remapper-gtk graphical UI. This was working.
However, when rebooting the machine, the rules do not load in and systemctl status input-remapper says that it cannot autoload the rules:
If I try to stop and start the input-remapper service, it still gives me the same error. HOWEVER, when I stop the input-remapper service (systemctl stop input-remapper.service) and then start the program manually (with
input-remapper-service
) then the rules do load in when I connect my controllerI am autologging into my gamer account (using services.autologin.user = "gamer"), don't know if that could be the cause of this? However, I find it strange that stopping and starting the service after I've logged in doesn't work, but manually starting the program does...
Steps To Reproduce
Steps to reproduce the behavior:
Expected behavior
I would expect the systemd service to autoload the rules just as it does when I manually start input-remapper-service from the command line
Screenshots
If applicable, add screenshots to help explain your problem.
Notify maintainers
@LunNova
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.Add a 👍 reaction to issues you find important.
The text was updated successfully, but these errors were encountered: