Just to notice you that to add a controller for mupen64plus on Ubuntu you just have to find the name of your controller and then copy, paste, add and adjust the following with the good name in the file « /usr/share/games/mupen64plus/InputAutoCfg.ini » :
[Your Controller Exact Name]
plugged = True
plugin = 2
mouse = False
AnalogDeadzone = 4096,4096
AnalogPeak = 32768,32768
DPad R = hat(0 Right)
DPad L = hat(0 Left)
DPad D = hat(0 Down)
DPad U = hat(0 Up)
Start = button(9)
Z Trig = button(7)
B Button = button(0)
A Button = button(2)
C Button R = axis(3+)
C Button L = axis(3-)
C Button D = axis(2+)
C Button U = axis(2-)
R Trig = button(6)
L Trig = button(4)
Mempak switch =
Rumblepak switch =
X Axis = axis(0-,0+)
Y Axis = axis(1-,1+)