  We report high-energy mid-infrared pulse generation by Q-switching of
dysprosium-doped fiber lasers for the first time. Two different modulation
techniques are demonstrated. Firstly, using active acousto-optic modulation,
pulses are produced with up to 12 {\mu}J energy and durations as short as 270
ns, with variable repetition rates from 100 Hz to 20 kHz and central
wavelengths tunable from 2.97 to 3.23 {\mu}m. Experiments are supported by
numerical modeling, identifying routes for improved pulse energies and to avoid
multi-pulsing by careful choice of modulator parameters. Secondly, we
demonstrate passive Q-switching by fabricating an inkjet-printed black
phosphorus saturable absorber, simplifying the cavity and generating 1.0 {\mu}J
pulses with 740 ns duration. The performance and relative merits of each
modulation approach are then critically discussed. These demonstrations
highlight the potential of dysprosium as a versatile gain medium for
high-performance pulsed sources beyond 3 {\mu}m.
