Capital loss carryover

I have $40 K capital loss carryover from last year and it increased a little this year. As I understand I can only apply this to offset $3K of ordinary income (IRA RMD withdrawals). Is the only way I can benefit from this capital loss carryover by selling stock with high profit i.e. relatively low cost basis? I recall previously I was able to apply some of this to ordinary income.