What happens is at boot time (and shutdown time), /lib/systemd/system/[email protected] tries to restore (save) the backlight levels, and it doesn't always perform this action correctly. Hence the lowered screen brightness after a boot. cat
the file if you wish to see its contents. Type man systemd-backlight
to get more background information.
Edit /etc/default/grub...
sudo -H gedit /etc/default/grub
Find the line that looks like this:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
Edit it to look like this:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash systemd.restore_state=0"
Then:
sudo update-grub
reboot
Update #1:
This may work better than the kernel line mod from above. It'll take a little playing to get it going in your config, but I think you've got the skills required :-)
first, undo the mods from above
see if a file called /etc/rc.local exists on your computer
if it doesn't exist, create a folder at /etc/rc.local
if it does exist, talk to me before proceeding
drop this into the /etc/rc.local folder, and name it set_brightness.sh
#!/bin/sh
# Set specific brightness level to work around bug
# See /etc/systemd/system/set_brightness.service
#
sleep 15; echo 80 | tee /sys/class/backlight/dell_uart_backlight/brightness
Note: You'll need to change the dell_uart_backlight
in the pathname for your own configuration
Note: If you have a slow system, you may need to increase the sleep timer
Note: 80 is the desired brightness setting
It should look like this:
-rwxr-xr-x 1 root root 189 Jan 17 15:57 set_brightness.sh
- drop this into the /etc/systemd/system/ folder, and name it
set_brightness.service
[Unit]
Description=Set screen brightness to work around bug
[Service]
Type=oneshot
ExecStart=/bin/sh /etc/rc.local/set_brightness.sh
[Install]
WantedBy=multi-user.target
It should look like this:
-rw-r--r-- 1 root root 172 Sep 27 16:24 /etc/systemd/system/set_brightness.service
And this status:
$ systemctl status set_brightness.service
○ set_brightness.service - Set screen brightness to work around bug
Loaded: loaded (/etc/systemd/system/set_brightness.service; enabled; vendor preset: enabled)
Active: inactive (dead) since Thu 2022-02-03 20:13:23 PST; 1 day 10h ago
Process: 1102 ExecStart=/bin/sh /etc/rc.local/set_brightness.sh (code=exited, status=0/SUCCESS)
Main PID: 1102 (code=exited, status=0/SUCCESS)
CPU: 23ms
Feb 03 20:13:08 al-Inspiron-7700-AIO systemd[1]: Starting Set screen brightness to work around bug...
Feb 03 20:13:23 al-Inspiron-7700-AIO sh[3320]: 80
Feb 03 20:13:23 al-Inspiron-7700-AIO systemd[1]: set_brightness.service: Deactivated successfully.
Feb 03 20:13:23 al-Inspiron-7700-AIO systemd[1]: Finished Set screen brightness to work around bug.
Update #2:
Both mods didn't solve the problem. Both mods removed.
However, booting to a Ubuntu Live 21.10 solves the problem, but the user cannot upgrade at this time due to some other software issues.