Modal and non-modal linear stability analyses are employed to investigate the effect of internal and external heating on disturbance temporal growth for the Darcy–Bénard convection with throughflow. A matrix-forming approach is employed for both purposes, where the generalised eigenvalue problem is built using the generalised integral transform technique. Although the disturbance equations are not self-adjoint, the non-modal analysis indicates that there is no transient growth. Hence, any disturbance growth in time must be induced by modal mechanisms. An absolute instability analysis reveals that viscous dissipation has a destabilising effect and introduces new modes that are eventually destabilised by increasing the Péclet number. Beyond critical values of the Péclet number, where codimension-two absolutely unstable points exist, these modes become more unstable than the classical mode found in the absence of viscous dissipation, which is stabilised by an increasing Péclet number. This internal heating mechanism generated by viscous dissipation is so strong at high enough Péclet numbers that instability becomes possible through heating from above.