Try below way to changes setup variable to switch memory profile.
Grub efi file-->
here
1.
Copy folder "EFI" to a usb pen drive that already format to fat32 then reboot system ,then boot this usb device as uefi model ,it will enter to GRUB shell environment.
2.
Type setup_var 0x8C5 0x2 or 0x8C5 0x3 to changes memory to XMP profile 1 or XMP profile 2.
You can see related address and variable in below.
Setting: Memory profile, Variable: 0x8C5 {05 91 89 16 8A 16 AC 27 01 00 C5 08 14 10 00 03 00}
0x47E19 Option: Default profile, Value: 0x0 {09 07 8B 16 30 00 00}
0x47E20 Option: Custom profile, Value: 0x1 {09 07 8E 16 00 00 01}
0x47E27 Suppress If: {0A 82}
0x47E29 Variable 0xD92 equals 0x1 {12 86 92 0D 01 00}
0x47E2F Variable 0xD92 equals 0x3 {12 06 92 0D 03 00}
0x47E35 Or {16 02}
0x47E37 Not {17 02}
0x47E39 End {29 02}
0x47E3B Option: XMP profile 1, Value: 0x2 {09 07 8C 16 00 00 02}
0x47E42 End If {29 02}
0x47E44 Suppress If: {0A 82}
0x47E46 Variable 0xD92 equals 0x2 {12 86 92 0D 02 00}
0x47E4C Variable 0xD92 equals 0x3 {12 06 92 0D 03 00}
0x47E52 Or {16 02}
0x47E54 Not {17 02}
0x47E56 End {29 02}
0x47E58 Option: XMP profile 2, Value: 0x3 {09 07 8D 16 00 00 03}
0x47E5F End If {29 02}
3.Exit GRUB shell then see if any changes with memory freq.
This way didn't need flash bios ,you can try it.