I followed these instructions (in Portuguese) here: https://lerlinux.blogspot.com/2023/02/controle-de-xbox-one-s-no-linux.html

It was detected as:

[23580.708952] usb 3-5.2.3: New USB device found, idVendor=045e, idProduct=02ea, bcdDevice= 5.0b
[23580.708964] usb 3-5.2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[23580.708968] usb 3-5.2.3: Product: Controller
[23580.708972] usb 3-5.2.3: Manufacturer: Microsoft
[23580.708974] usb 3-5.2.3: SerialNumber: xxxxxxxxxxxxxxxxxx
[23580.716883] input: Microsoft X-Box One S pad as /devices/pci0000:00/0000:00:14.0/usb3/3-5/3-5.2/3-5.2.3/3-5.2.3:1.0/input/input36

$ sudo git clone https://github.com/paroj/xpad.git /usr/src/xpad-0.4

$ sudo dkms install -m xpad -v 0.4

$ sudo apt install xboxdrv

Initially I was getting error:

$ sudo xboxdrv
xboxdrv 0.8.8 - http://pingus.seul.org/~grumbel/xboxdrv/ 
Copyright © 2008-2011 Ingo Ruhnke <[email protected]> 
Licensed under GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> 
This program comes with ABSOLUTELY NO WARRANTY. 
This is free software, and you are welcome to redistribute it under certain conditions; see 
the file COPYING for details. 


-- [ ERROR ] ------------------------------------------------------
No Xbox or Xbox360 controller found

$ sudo rmmod xpad

Plugged and unplugged the USB cable and then noticed that js0 was created:

$ ls /dev/input/js0
/dev/input/js0

Then jstest displayed it:

$ jstest /dev/input/js0
Driver version is 2.1.0.
Joystick (Microsoft X-Box One S pad) has 8 axes (X, Y, Z, Rx, Ry, Rz, Hat0X, Hat0Y)
and 11 buttons (BtnA, BtnB, BtnX, BtnY, BtnTL, BtnTR, BtnSelect, BtnStart, BtnMode, BtnThumbL, BtnThumbR).
Testing ... (interrupt to exit)
Axes:  0:     0  1:     0  2:     0  3:     0  4:     0  5:     0  6:     0  7:     0 Buttons: Axes:  0:     0  1:     0  2:     0  3:     0  4:     0  5:     0  6:     0  7:     0 Buttons: Axes:  0:     0  1:     0  2:     0  3:     0  4:     0  5:     0  6:     0  7:     0 Buttons: Axes:  0:     0  1:     0  2:     0  3:     0  4:     0  5:     0  6:     0  7:     0 Buttons: Axes:  0:     0  1:     0  2:     0  3:     0  4:     0  5:     0  6:     0  7:     0 Buttons: Axes:  0:     0  1:     0  2:     0  3:     0  4:     0  5:     0  6:     0  7:     0 Buttons: Axes:  0:     0  1:     0  2:     0  3:     0  4:     0  5:     0  6:     0  7:     0 Buttons: Axes:  0:     0  1:     0  2:     0  3:     0  4:     0  5:     0  6:     0  7:     0 Buttons: Axes:  0:     0  1:     0  2:     0  3:     0  4:     0  5:     0  6:     0  7:     0 Buttons: Axes:  0:     0  1:     0  2:     0  3:     0  4:     0  5:     0  6:     0  7:     0 Buttons: Axes:  0:     0  1:     0  2:     0  3:     0  4:     0  5:     0  6:     0  7:     0 Buttons: Axes:  0:     0  1:     0  2:     0  3:     0  4:     0  5:     0  6:     0  7:     0 Buttons: Axes:  0:     0  1:     0  2:     0  3:     0  4:     0  5:     0  6:     0  7:     0 Buttons: Axes:  0:     0  1:     0  2:-32767  3:     0  4:     0  5:     0  6:     0  7:     0 Buttons: Axes:  0:     0  1:     0  2:-32767  3:     0  4:     0  5:     0  6:     0  7:     0 Buttons: Axes:  0:     0  1:     0  2:-32767  3:     0  4:     0  5:     0  6:     0  7:     0 Buttons: Axes:  0:     0  1:     0  2:-32767  3:     0  4:     0  5:-32767  6:     0  7:     0 Buttons: Axes:  0:     0  1:     0  2:-32767  3:     0  4:     0  5:-32767  6:     0  7:     0 Buttons: Axes:  0:     0  1:     0  2:-32767  3:     0  4:     0  5:-32767  6:     0  7:     0 Buttons:  0:off  1:off  2:off  3:off  4:off  5:off  6:off  7:off  8:off  9:off 10:off