Skip to content

Unable to start injection with Python 3.14Β #1163

Closed

Description

@HiImJake

After upgrading to Fedora 43 I am unable to run input-remapper. It looks like the injections cannot be started. I tried creating a new preset to see if that would start and had the same issue.

Share some logs please:

  1. input-remapper-control --version
    input-remapper 2.1.1 https://github.com/sezanzeb/input-remapper
    python-evdev 1.9.1

  2. which linux distro (ubuntu 20.04, manjaro, etc.)
    Fedora 43 Prerelease

  3. echo $XDG_SESSION_TYPE
    wayland

  4. which desktop environment (gnome, plasma, xfce4, etc.)
    gnome 49.rc

  5. sudo ls -l /proc/1/exe
    lrwxrwxrwx. 1 root root 0 Sep 18 08:36 /proc/1/exe -> /usr/lib/systemd/systemd

  6. paste the affected preset .json file from ~/.config/input-remapper-2/presets

Close tab.json

  1. sudo pkill -f input-remapper-service && input-remapper-gtk -d, apply the preset and hit your key. Then share that log.
    remapper_output.log

  2. sudo evtest while the previous command is running, to see how events are injected. Devices starting with input-remapper ... are of interest.
    no output when Applying preset or hitting the mapped button afterward

evtest_output.log

Activity

  1. IzsakiRobi commented on Sep 20, 2025

    @IzsakiRobi

    Fedora 43 use Python3.14, this is the problem πŸ˜•
    Also not work for me…
    Please fix this πŸ™

    Thx!

  2. alxpl commented on Oct 13, 2025

    @alxpl
    Contributor
  3. sezanzeb commented on Oct 18, 2025

    @sezanzeb
    Owner

    So we just have add this above the Injector class (or wherever, somewhere where we can find it later, so I suppose this is a good place) to make it work? Could someone with python 3.14 please verify if that works?

    multiprocessing.set_start_method('fork')
    
    class Injector(multiprocessing.Process):

    (inputremapper/injection/injector.py)

  4. sezanzeb commented on Oct 18, 2025

    @sezanzeb
    Owner

    Or maybe in __init__ of Injector, because I dislike imports that do weird things, even though nothing was called yet.

  5. changed the title [-]Unable to start injection in Fedora 43[/-] [+]Unable to start injection with Python 3.14[/+] on Oct 19, 2025
  6. sezanzeb commented on Oct 19, 2025

    @sezanzeb
    Owner

    Fix is in #1184, could someone please install from that branch to check if it works? (I don't know how that is ideally done in Fedora, I suppose you have to uninstall it first and then use the instructions at the bottom of the readme, checking out to the python314_fix_tests branch https://github.com/sezanzeb/input-remapper?tab=readme-ov-file#other-distros)

  7. maurice-w commented on Oct 19, 2025

    @maurice-w

    I tested it on Fedora Silverblue 43 like this; it works! No need to uninstall it first.

    git clone https://github.com/sezanzeb/input-remapper.git
    cd input-remapper
    git checkout python314_fix_tests
    sudo ostree admin unlock
    sudo python3 setup.py install
    
  8. sezanzeb commented on Oct 19, 2025

    @sezanzeb
    Owner

    Thank you!

    You might have installed input-remapper on your system twice now though. sudo find /usr -iname "*input*remapper*" can help you to uninstall stuff

  9. maurice-w commented on Oct 19, 2025

    @maurice-w

    I use Fedora Silverblue, an immutable system. /usr is read-only. ostree admin unlock creates a temporary r/w overlay, for testing only. After a reboot, the modifications are gone.

    It's different in traditional Fedora Workstation.

  10. HiImJake commented on Oct 19, 2025

    @HiImJake
    Author

    @sezanzeb I was able to reinstall from this branch and the fix worked for me, thanks!

  11. IzsakiRobi commented on Oct 19, 2025

    @IzsakiRobi

    In Fedora 43 (Beta, Daily) works fine now!

    sudo dnf install python3-evdev gtksourceview4 python3-devel python3-pydantic python3-pydbus python3-psutil 
     
    git clone https://github.com/sezanzeb/input-remapper.git
    cd input-remapper
    sudo python3 setup.py install
    sudo systemctl enable --now input-remapper`
    

    πŸ‘

  12. mjg commented on Oct 24, 2025

    @mjg
    Contributor

    In Fedora 43 (Beta, Daily) works fine now!

    sudo dnf install python3-evdev gtksourceview4 python3-devel python3-pydantic python3-pydbus python3-psutil 
     
    git clone https://github.com/sezanzeb/input-remapper.git
    cd input-remapper
    sudo python3 setup.py install
    sudo systemctl enable --now input-remapper`
    

    πŸ‘

    Does something like

    input-remapper-control --list-devices
    

    work for you (on F43)? There still seems to be a problem with pydantic, i.e. the usage of V1 core functionality. V1 is not going to be ported to python 3.14 as per pydantic upstream. (I know this issue is specifically about injection, but since we have testers here ...)

  13. HiImJake commented on Oct 24, 2025

    @HiImJake
    Author

    In Fedora 43 (Beta, Daily) works fine now!

    sudo dnf install python3-evdev gtksourceview4 python3-devel python3-pydantic python3-pydbus python3-psutil 
     
    git clone https://github.com/sezanzeb/input-remapper.git
    cd input-remapper
    sudo python3 setup.py install
    sudo systemctl enable --now input-remapper`
    

    πŸ‘

    Does something like

    input-remapper-control --list-devices
    

    work for you (on F43)? There still seems to be a problem with pydantic, i.e. the usage of V1 core functionality. V1 is not going to be ported to python 3.14 as per pydantic upstream. (I know this issue is specifically about injection, but since we have testers here ...)

    That didn't work for me:
    input-remapper-control --list-devices /usr/local/lib/python3.14/site-packages/inputremapper/configs/input_config.py:30: UserWarning: Core Pydantic V1 functionality isn't compatible with Python 3.14 or greater. from pydantic.v1 import BaseModel, root_validator, validator ERROR: Did not find any input device

  14. sezanzeb commented on Oct 25, 2025

    @sezanzeb
    Owner

    V1 is not going to be ported to python 3.14 as per pydantic upstream

    Thanks for mentioning. Tracking this in #1190

  15. remlap commented on Oct 30, 2025

    @remlap

    Thanks for the fix all, working great from HiImJake instructions.

  16. MihaMarkic commented on Oct 31, 2025

    @MihaMarkic

    Thank you!

    You might have installed input-remapper on your system twice now though. sudo find /usr -iname "*input*remapper*" can help you to uninstall stuff

    @sezanzeb can you tell us how would be the proper way to install it without duplicating it?

  17. sezanzeb commented on Nov 1, 2025

    @sezanzeb
    Owner

    First uninstall the system one, then install it from git.

    I'll probably switch to meson soon btw

  18. sezanzeb commented on Nov 1, 2025

    @sezanzeb
    Owner
  19. MihaMarkic commented on Nov 3, 2025

    @MihaMarkic

    Works just fine, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions