Key secondary hypotheses: Disability, impulsivity, and attentional deficits recover after TKA surgery follow a log of time pattern, and are predicted by C-A state and its interaction with pupil diameter. Gabapentin increases resting pupil diameter in patients scheduled for TKA who are receiving high doses of opioids.