Ivan's course to death is a long and tedious one. In his last three days he screams day and night. It began as the words "I won't!" and became fixed on the "O." In Chapter 11, Ivan realizes that all he lived for was "falseness and deception." With this realization came a new "grinding and suffocating" pain, which is what precipitated his screaming.
Then, "some force struck him in the chest and side" and he fell through the black bag he had been struggling against and saw a light. Simultaneously with this, and in some ways (perhaps in all ways) precipitating this, Ivan was flailing his arms; his small son came; caught one of Ivan's flailing hands and kissed it and began to weep. At this moment Ivan see the light and realizes that his life, which looked like it was right and good, was in fact not the right thing.
This realization, coming at the moment his son kissed his hand and wept, made him ask "What is the right thing?" It is this question, a response to his epiphany of revelation, to which he listened for an answer that caused him to stop screaming and be quiet. Ivan felt the boy's kiss and tears; he saw that he had not lived rightly; he knew it could still be remedied; he listened to hear the answer to what the right thing is; and he, while listening for the way to proceed, quit screaming.