Hypoventilation - Failure to take deep breaths can result in the collapse of part of the lungs. This is very common during surgery, especially with general anesthesia, and when breathing is shallow due to pain (such as with rib fractures). Hypoventilation is the most common cause of atelectasis.