How to disable the brightness slider in the Gnome 3 aggregate menu?

I have a desktop with a UPS connected to it. In the Gnome menu where I can log off I have another slider below the volume slider which appears to be the brightness slider and it doesn't work nor did I expect it to work. How can I remove this or how can I tell Gnome that, yes my computer has a battery but that doesn't mean it's a laptop or that brightness controls work with these monitors.

I checked all extensions offered for brightness on the Gnome website, looked at Gnome help and checked all I can find in dconf editor under /org/gnome, no luck.

Edit: I found this repository: https://github.com/dffischer/gnome-aggregatemenu-hider I installed waf but but the hider fails to build:

$ ./waf --targets=Brightness configure build
Setting top to                           : gnome-aggregatemenu-hider 
Setting out to                           : gnome-aggregatemenu-hider/build 
'configure' finished successfully (0.004s)
Waf: Entering directory `gnome-aggregatemenu-hider/build'
Waf: Leaving directory `gnome-aggregatemenu-hider/build'
Build failed
Traceback (most recent call last):
  File "gnome-aggregatemenu-hider/.waf-2.0.11-d998e576e79d26a553b299ec4e56967b/waflib/Runner.py", line 245, in task_status
    return tsk.runnable_status()
  File "gnome-aggregatemenu-hider/.waf-2.0.11-d998e576e79d26a553b299ec4e56967b/waflib/Task.py", line 364, in runnable_status
    new_sig=self.signature()
  File "gnome-aggregatemenu-hider/.waf-2.0.11-d998e576e79d26a553b299ec4e56967b/waflib/Task.py", line 346, in signature
    self.sig_vars()
  File "./template.py", line 15, in sig_vars
    super().sig_vars()
TypeError: super() takes at least 1 argument (0 given)

Solution 1:

If you can live without the power indicator you may try the following workaround.

Install a GNOME shell extension called Extend Panel Menu. This would "move the Power/Network/Volume/User/Date/Notifications menus to the status area" from the aggregate menu. The brightness control slider should be in the power indicator.

Then from the extension's preferences disable the power indicator (and other unnecessary indicators).

Solution 2:

I fixed it by passing the acpi_backlight=none parameter to the kernel. Apparently this is related to the way external monitors are handled.

The issue still happens on GNOME 3.36 and kernel 5.11.