Screen dims when idle, but doesn't restore to its last setting when no longer idle


I'm experiencing a weird issue that I'm assuming is a bug.

I'm running Ubuntu MATE 21.10 on a Dell Latitude 9520.

When the system is idle on battery, the screen backlight dims (to be expected). However, when I wake up the machine (touching the touch pad, pressing a key, etc.), the backlight doesn't get restored back to the value it was before it auto-dimmed. Instead, it just goes back to some default value.

Any tips would be appreciated. For now, I had to disable the "Dim When Idle" feature, but that's not ideal.

I can't help you with a solution (other than the one you're already using) but I can tell you that this bug is at least 8 years old, because I first ran into it that long ago. (Also on a Dell, but I don't remember the exact model: it was a work machine).
That doesn't mean it'll never get fixed, but it's not looking promising.

If you want to dig into it yourself, the place to start is probably /usr/lib/pm-utils/power.d/ - one or more of the scripts in there will hopefully be a good lead.