Brightness/Log Out/Battery Notification issue
I've had this issue for a couple of years. When I first encountered it I was new to linux which put me off trying to understand and if necessary report it.
-I'm using a Microsoft Surface Pro 4 & Pro 6, both devices experience it.
-It occurs on the latest Ubuntu 18.04 HWE kernel 5.3.0-59, previous Bionic iterations as well as 4.19-lts. Gnome 3.28.
-I experience it without my extensions cariboublocker@git.keringar.xyz
& user-theme@gnome-shell-extensions.gcampax.github.com
.
-I experience it without browser extensions.
After an amount of time browsing, using either Firefox or Chrome, changes to brightness made in the status menu are at first delayed, then soon, so delayed as to not occur at all. Brightness does change related to light conditions but again delayed, just as delayed I suspect, as any changes I make manually.
gdbus call --session --dest org.gnome.SettingsDaemon.Power --object-path /org/gnome/SettingsDaemon/Power --method org.freedesktop.DBus.Properties.Get 'org.gnome.SettingsDaemon.Power.Screen' 'Brightness'
will time out.
A related quality is that while the battery % value is accurate in the menu status, notifications at 10% & 3%, telling me my battery is low/critically low are delayed in the same way as brightness. The device still switches off properly - as per my settings - at the critical point, regardless of the notifications not being displayed. The battery icon changes to the low battery symbol as it should too.
A final related issue is that log out and power-off when selected from the status menu partially work! I will press the icon which brings up the related dialogue window, once I click log out/power-off all the icons on the desktop disappear but nothing else happens. The dock is still present, I can open an application etc. I must click the icon again, then logging off or switching off happens immediately. Often, but not always, when I have this issue the login screen will be displayed 90deg to me after I log out. Video01.mp4 shows this happening.
video removed by author
I tend to associate this thing happening when I browse twitter, perhaps a user who posts a fair number of videos. YouTube doesn't appear to cause the issue. It happens with and without the device on charge but I tend to think it's more likely to happen while on charge. When this issue occurs, the rest of the OS works just fine, everything responds quickly. Logging out is the thing that fixes the issue, I then also get the low battery notifications if I'm below 10%. Device is usually hot when I have this issue.
I was looking at journalctl -f and there are lots more set --set-brightness commands than when this issue isn't happening. Video02.mp4 gives you a snapshot of that.
video removed by author
If I send the command sudo /usr/lib/gnome-settings-daemon/gsd-backlight-helper --set-brightness 675
the brightness immediately changes but is immediately superseded. Pasted below is journalctl showing that.
Jun 15 17:27:02 SP4 pkexec[28062]: pam_unix(polkit-1:session): session opened for user root by (uid=1000)
Jun 15 17:27:02 SP4 pkexec[28062]: hidden: Executing command [USER=root] [TTY=unknown] [CWD=/home/hidden] [COMMAND=/usr/lib/gnome-settings-daemon/gsd-backlight-helper --set-brightness 2250]
Jun 15 17:27:02 SP4 pkexec[28067]: pam_unix(polkit-1:session): session opened for user root by (uid=1000)
Jun 15 17:27:02 SP4 pkexec[28067]: hidden: Executing command [USER=root] [TTY=unknown] [CWD=/home/hidden] [COMMAND=/usr/lib/gnome-settings-daemon/gsd-backlight-helper --set-brightness 2250]
Jun 15 17:27:02 SP4 pkexec[28072]: pam_unix(polkit-1:session): session opened for user root by (uid=1000)
Jun 15 17:27:02 SP4 pkexec[28072]: hidden: Executing command [USER=root] [TTY=unknown] [CWD=/home/hidden] [COMMAND=/usr/lib/gnome-settings-daemon/gsd-backlight-helper --set-brightness 2250]
Jun 15 17:27:02 SP4 sudo[26159]: hidden : TTY=pts/1 ; PWD=/home/hidden ; USER=root ; COMMAND=/usr/lib/gnome-settings-daemon/gsd-backlight-helper --set-brightness 675
Jun 15 17:27:02 SP4 sudo[26159]: pam_unix(sudo:session): session opened for user root by (uid=0)
Jun 15 17:27:02 SP4 sudo[26159]: pam_unix(sudo:session): session closed for user root
Jun 15 17:27:02 SP4 pkexec[28077]: pam_unix(polkit-1:session): session opened for user root by (uid=1000)
Jun 15 17:27:02 SP4 pkexec[28077]: hidden: Executing command [USER=root] [TTY=unknown] [CWD=/home/hidden] [COMMAND=/usr/lib/gnome-settings-daemon/gsd-backlight-helper --set-brightness 2250]
Jun 15 17:27:02 SP4 pkexec[28084]: pam_unix(polkit-1:session): session opened for user root by (uid=1000)
Jun 15 17:27:02 SP4 pkexec[28084]: hidden: Executing command [USER=root] [TTY=unknown] [CWD=/home/hidden] [COMMAND=/usr/lib/gnome-settings-daemon/gsd-backlight-helper --set-brightness 2250]
What do you need from me to help you understand what's happening?