Yes … switching losses could be the main reason for heating. Even at 1.2 A, a MOSFET can heat up if it’s not fully enhanced or switching slowly. At 31 kHz PWM, switching losses start to matter because:
Arduino pin has weak drive strength … results in slow gate rise/fall times
MOSFET spends more time in the linear region during transitions
This can dominate losses more than conduction loss at low current
Yes … gate driver help at this current. Even though 1.2 A is small … but a gate driver helps because:
Faster switching: reduced time in linear region
Lower switching losses at 31 kHz
Cleaner PWM edges: less heat and less EMI
A simple fix … helped me in one of my projects … a small totem-pole driver or dedicated low-side MOSFET driver IC will improve efficiency more than expected. Read it out: https://www.ti.com/lit/ab/slua877/slua877.pdf
PCB copper area for thermal dissipation … For 1–2 A PWM fan loads: Use a large copper area on drain side (especially if low-side switching) … read this guide on thermal dissipation: https://www.aivon.com/blog/pcb-knowledge/embedded-copper-structures-for-extreme-pcb-thermal-management/
Extend copper pour around MOSFET to act as a heatsink
Connect top and bottom copper with thermal vias under the pad … although its abt LED PCB but heat flow calculaitons are helpful: Thermal Resistance and Heat Flow in LED PCB Design: Understanding LED PCB Layout for Better Heat Dissipation - PCB Design & Layout - PCBway
Keep source return path short and wide
Avoid narrow traces between MOSFET and ground
In your case, the heating is more likely switching … gate drive limitation than load current. A proper logic-level MOSFET + stronger gate drive + decent copper pour usually eliminates the issue completely.