MN 128: The Discourse on Defilements (imperfections)
Once the venerable Anuruddha lived in the Eastern Bamboo Park together with his cousin Nandiya (Th 25) and the Sakyan noble Kimbila (Th 118; AN 5:201, 6:40, 7:56; SN 54:10). These three monks were so mature in the practice of the teaching that each of them could live alone for himself, devoted to his spiritual practice. Only every fifth night would they meet to discuss the Dhamma, undisturbed by things or people. The harmony existing between these three forest hermits has become legendary and stands in sharp contrast with the quarrelsome monks of Kosambi.
When the Buddha visited the three monks, he asked Anuruddha how it was that he lived in peace and harmony with his two companions. Anuruddha replied: “In deeds, words and thoughts I maintain loving kindness towards these venerable ones, in public and in private, thinking: ’Why should I not set aside what I am minded to do and do only what they are minded to do?’ And I act accordingly. We are different in body, venerable sir, but only one in mind.”
After the Buddha had inquired about their life in concord, he asked Anuruddha whether they had gained any spiritual attainment transcending average human capacity. Then Anuruddha told of a difficulty they had experienced in a very sublime meditation they had practised. They had perceived an inner light and radiance  and had a vision of sublime forms.  But that light and vision of forms disappeared very soon, and they could not understand the reason.
The Buddha explained that one who wanted to experience these subtle states of mind in full and have a steady perception of them should free himself from eleven imperfections (upakkilesa).
The first is uncertainty about the reality of these phenomena and the significance of the inner light, which might easily be taken for a sensory illusion.
The second imperfection is inattention: one no longer directs one’s full attention to the inner light, but regards it as something unremarkable or inessential, and thus dismisses it as unimportant.
The third imperfection is lethargy and drowsiness.
The fourth, anxiety and fright, which occurs when threatening images or thoughts arise from the subconscious regions of the mind.
(The fifth)  When these imperfections have been mastered, elation may arise, which excites body and mind. Such exultation is often a habitual reaction to any kind of success.
(The sixth) When that elation has exhausted itself, one may feel drained of that happy emotion and fall into inertia, a heavy passivity of mind.
(The seventh) To overcome it, one makes a very strong effort, which may result in an excess of energy.
(The eighth) On becoming aware of this excess, one relaxes and, in a repeated alternation of extremes, falls again into sluggish energy.
(The ninth) In such a condition, when mindfulness is weak, strong longing may arise for desirable objects of the celestial or the human world, according to the focusing of the inner light which had been widened in its range.
(The tenth) This longing will reach out to a great variety of objects and thus lead to another imperfection, a large diversity of perceptions, be it on the celestial or the human plane. Having become dissatisfied with that great diversity of forms, one chooses to contemplate one of them, be it of a desirable or undesirable nature.
(The eleventh) Concentrating intensely on the chosen object will lead to the eleventh imperfection, the excessive meditating on these forms.
Addressing Anuruddha and his two companions, the Buddha thus described vividly, from his own experience, the eleven imperfections that may arise in the meditative perception of pure forms, and he explained how to overcome them (MN 128).