The Roku 4 original remote didn't have tv IR on board, that's way you get the error in the menu under remotes, there's no IR to program. What was prest was Roku cec commands, no matter what brand of tv or avr you have if it accepts cec signal these will work.
Now with newer remotes all you can program through setting menu is TV IR codes, no avr codes. But there is secret menu that either allows you to switch from tv IR to avr IR codes. Or switch from tv IR to Roku cec. We can't post it in open forum, but has been posted do a Google search or forum search.
Edmund Roku Community Streaming Expert
Help others find this answer and click "Accept as Solution." If you appreciate my answer, maybe give me a Kudo.
I had the very same issue as others here. I had a Roku 3000 for *many* years. (model 4200X).
That remote would send CEC through my AVR and control volume directly.
Now in 2023 I upgraded to a Roku Ultra (model 4802R) and the remote only wants to adjust the volume on my TV - that I don't even use for audio output. The main reason I bought the new Roku was for the mute button on the remote.
Thanks to Edmund's hint, I searched for a secret menu - and viola:
Home:5x, Fast forward, Play, Rewind, Play, Fast forward
This will enter the "Platform Secret" menu.
(Now, this menu is more than a bit dodgy - I saw the menu, and then a show started playing on top of it. However by using the up and down arrows, the menu selections over-wrote the video and I was able to see and then make the proper selections. Be patient.)
Next, RF Remote Menu > Universal CEC menu > Use CEC instead of IR
This enabled my new remote to work like the old one did and control the AVR (onkyo) directly, and the mute button works too! Exactly what I was after.
I also spent a lot of time on the Roku chat with no help. I nearly sent the unit back, but thank goodness I checked here first.