Remember that MKV is just a container. Within that container are audio and video codecs, and sometimes caption tracks. Roku devices only support a limited number of video and audio codecs, as well as only a few containers.
Video must be the H.264/AVC/MP4 codec, and the newer players and all TVs support MPEG-2. If it's a 4K Roku device, then it also supports H.265. For audio there's a few more options, namely PCM, AC3 (Dolby Digital), AAC (2 channel only). If you are connected to an AVR via HDMI with the proper support, you can also bitstream DTS from the MKV or TS container. Video must be in a MKV/MP4/MOV/TS container.
You might find it far less effort to simply use a DLNA server on a computer on your network, and let it transcode any unsupported codec or container. I use Serviio, but there are others available. You can also use Plex or Emby, which both have their own channel for Roku devices and offer a Netflix-like user interface.
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 am not a Roku employee, just another user.