My Logitech F710 controller don't work correctly in Linux. How can I fix it? - eviltoast

I have a Logitech F710 controller that I tested on Windows, and it worked properly. However, when I tested it on Linux, it didn’t work correctly. Some buttons were not functioning, and some buttons were mapped incorrectly. However, it works fine on Steam.