Suddenly can't save files to /sys/class/power_supply/BAT0/ in dom0

Thank you for the help, apparatus. I followed the instructions for changing the default kernel here:
www.qubes-os.org/doc/how-to-install-software-in-dom0/#changing-default-kernel

I changed from kernel-latest 6.6.2-1 to kernel-latest 6.5.8-1, which solved the battery charging threshold problem. It didn’t fix the keyboard backlight problem, however. I don’t use that feature very often so I suspect that some previous kernel update broke it. Probably changing to an even earlier kernel would solve it, and maybe I’ll try that later.