An experimental analysis on the quality of 40-GHz radio-frequency signals generated by various passively mode-locked semiconductor lasers is addressed. The analysis is performed considering the frequency linewidth of 40-GHz optically generated signals and the number of longitudinal modes selected by the cavity of each laser under study. Four of these devices are multi-quantum wells InAlGaAs Fabry–Pérot lasers. They have been engineered to exhibit a specific number of longitudinal modes: 4, 5, 10, and 22 modes, respectively. Another device under test is a bulk distributed Bragg reflector laser exhibiting 3 lasing modes. The last device under study is a quantum-dash Fabry–Pérot laser characterized by 40 lasing modes. From our experimental results it appears that, regardless the nature of the device cavity and active media, the strength of the passively mode-locked mechanism might be enhanced with the number of longitudinal modes oscillating into the laser cavity, allowing a reduction in the frequency linewidth.