I was able to eliminate the 8582 and disallowed passive loss by changing what I entered from the partnership K-1. It had a Code T for depletion information under line 20. I removed the Code T data and the 8582 went away. Only the Schedule E line 18b depletion entry was used and that was correctly subtracted from the royalty income.