Hello, you can configure the cec settings via settings -> system -> input devices -> peripherals. Revert any changes and start with the config.txt under /flash
These are the steps that worked for me:
Remount /flash as writeable:
mount -o remount,rw /flash
Edit the config.txt
nano /flash/config.txt
i added hdmi_edid_file=1 and uncomment hdmi_force_hotplug=1 , change or uncommnet nothing else
exit nano and write changes.
Next create the edid file with direct connection to your tv:
tvservice -d edid.dat
and copy the file to /flash
cp edid.dat /flash
make /flash readonly
mount -o remount,ro /flash
I have rebooted the pi several times, with tv on/off, avr on/off and have always all needed screenmodes like 24hz.