Based on my current Ubuntu 18.04 installation (from today), I can adjust brightness at the login screen with the function keys (out of the box!). However, I am using i3 with Gnome, and after login, I am no more shown brightness controls in Gnome control centre.
Above answers didn't unfortunately work for me: Instead, using Ducky's xorg script together with Grub option made my i3 + Gnome session having undesired display behaviour and getting slower.
Anyway, at least for the case you go for a non-Gnome session (e.g. i3), I can point you to https://github.com/szekelyszilv/ybacklight
which (given you have meson and ninja installed) can be built by:
- downloading, unpacking and changing into ybacklight main directory
- mkdir build; meson build; cd build; ninja install
or, (without those tools and if you don't want to install it in the system), by:
- cd src; gcc ybacklight.c -o ybacklight; cp ybacklight to-your-pref-dir
and then be attached to function keys via WMs config. E.g. in i3wm, I added:
bindsym XF86MonBrightnessUp exec ybacklight -inc 10
bindsym XF86MonBrightnessDown exec ybacklight -dec 10
to my .config/i3/config.
Furthermore, setting brightness requires root privileges, e.g., achievable with "sudo ybacklight ..." as well as an entry to /etc/sudoers: see How can I add a new user as sudoer using the command line?