Can't change screen brightness after upgrading to Nvidia 460 driver on Ubuntu 20.04

Recently my graphics driver was updated to NVIDIA 460.32.03 on Ubuntu 20.04. Since the update, I can’t change the brightness using either my lenovo laptop’s function key or the brightness adjustment bar from system settings. Although, I am able to change the brightness using “xrandr” command. Also, the Nvidia 450 driver works fine. My kernel version is 5.8.0-36-generic.

I tried the fix here and it worked for me.