[X10II] [X10III] Color banding in low light conditions

Wow, thank you @direc85!
But from my side, the full instruction I think should be:
Open text editor with
devel-su nano /usr/bin/X10IIIFixBrightness.sh
And in it paste:

#!/bin/bash
dbus-monitor --system sender=com.nokia.mce,interface=com.nokia.mce.signal,member=display_status_ind |
while read -r line; do
    if [[ "$line" == *"\"on\""* ]]
        then echo 1 > /sys/devices/dsi_panel_driver/hbm_mode ; sleep 0.1 ; echo 0 > /sys/devices/dsi_panel_driver/hbm_mode;
    fi
done

Then make the script executable using:
devel-su chmod +x /usr/bin/X10IIIFixBrightness.sh

Then create a systemd service to start it at boot.
devel-su nano /usr/lib/systemd/system/FixBrightness.service
And paste there:

[Unit]
Description=Brightness fixer for Xperia 10III
Documentation=https://forum.sailfishos.org/t/11659/
After=ofono.service lipstick.service mce.service dbus.service
Wants=mce.service
AssertPathExists=/sys/devices/dsi_panel_driver/hbm_mode

[Service]
ExecStart=/usr/bin/X10IIIFixBrightness.sh
Restart=always
RestartSec=15s

[Install]
WantedBy=graphical.target

Then do sudo systemctl start FixBrightness.service to test it, and sudo systemctl enable FixBrightness.service to start it at boot.

To test if it works, reduce the screen brightness to minimum, turn the screen off and then back on. Without the script the colors were washed out, but with it you would see the old colors for a fraction of a second, and then immediately the colors should get better, if you got lucky with your display model.
Hope this helped!

3 Likes

Thank you guys!
I managed to get the service running, but unfortunately it doesn’t work.
But the moment that i execute

echo 1 > /sys/devices/dsi_panel_driver/hbm_mode; sleep 0.1 ; echo 0 >/sys/devices/dsi_panel_driver/hbm_mode

it instantly fixes the issue until i turn of the screen! So i guess it is working but the above command doesn’t get executed?

Sorry i cant edit my post!
Im literally loosing sleep over this and can’t unsee it.
What is killing me is that echo as mentioned above in terminal is solving the issue completely, the service is running but for some reason i guess the command doesn’t get executed when the display turns on?
I have to execute the command in terminal every time i unlock the phone while at home or after the afternoon.
What a bummer.

once again, can somebody make a video with this effect?
cause I don’t what people here talking about, maybe I have this too

I can try… Taking photos/video in low light is tricky.

1 Like

There you go.
Just a black image open in the browser when I first open the phone and then when I run the echo command on the terminal.
It’s much worse when in lower brightness and ambient lighting.


2 Likes

Here’s my attempt:

The brightness is about 5% in both pictures, with no auto adjust enabled. Left: un-fixed, right brightness to max and back -fixed. Photo taken with X10II stock Camera.

What you think is compression artefacts (noise excluded), is what the human eye sees on the screen of X10III. When I adjust the brightness to maximum - it blinks - and back, you get what is on the right, until you lock the screen again. (Or have the script installed.)

If I had to pick one to get fixed with snap of my fingers, I don’t know if it would be this issue or the power consumption situation. Probably the power issue, because this one has a workaround.

3 Likes

I was expecting such workaround to make it in the official release.

Me too, especially since it was fixed from Sony and it literally ruins the user experience when it is so pronounced like in my case.
I also expected a great browser to be honest since it would made sense to invest resources there when you don’t have very many apps in your platform, but that’s story for another time :slight_smile:

Hi…
I wonder if you are still planning to prepare the RPM…please…
Thanks…!!!

2 Likes

Done! The package is now available: Brightness Fix for Xperia 10 III | OpenRepos.net — Community Repository System

It works as expected on my device as I write this! Note: You should uninstall any previous scripts and services so they don’t overlap. (There should be no harm though, I guesstimate…)

Thanks to @JacekJagosz for writing the initial script and service, and to @nephros for tweaking it further :slight_smile:

7 Likes

Thank you so much!
I couldn’t find the file in storeman or GitHub though.

Ps. Maybe I should have started with the link above :sweat_smile:

1 Like

Unfortunately doesn’t work for me

Strange… Is the service running?

Edit: it’s harbour-brightness.service, not brightness-fix.service

$ systemctl status harbour-brightness.service
● harbour-brightness.service - Brightness fixer for Xperia 10III
   Loaded: loaded (/usr/lib/systemd/system/harbour-brightness.service; enabled; vendor preset: enabled)
   Active: active (running) since Sat 2023-04-22 16:22:03 EEST; 3h 58min ago
     Docs: https://forum.sailfishos.org/t/11659/
 Main PID: 8517 (harbour-brightn)
   Memory: 1.3M
   CGroup: /system.slice/harbour-brightness.service
           ├─8517 /bin/bash /usr/bin/harbour-brightness
           ├─8518 dbus-monitor --system sender=com.nokia.mce,interface=com.nokia.mce.signal,member=display_status_ind
           └─8519 /bin/bash /usr/bin/harbour-brightness

Actually, is the package installed?

$ rpm -qi harbour-brightness
Name        : harbour-brightness
Version     : 1.0
Release     : 1
Architecture: noarch
Install Date: la 22. huhtikuuta 2023 16.22.02
Group       : System
Size        : 665
License     : GPLv2
Signature   : (none)
Source RPM  : harbour-brightness-1.0-1.src.rpm
Build Date  : la 22. huhtikuuta 2023 16.21.48
Build Host  : samurai
URL         : http://github.com/direc85/harbour-brightness
Summary     : Brightness fix for Xperia 10 III
Description :
Short description of my Sailfish OS Application

I installed the package as well, but it didn’t resolve the colour banding. I then tried to reboot the phone, but it didn’t have any effect.

[defaultuser@Xperia10III ~]$ systemctl status brightness-fix.service
Unit brightness-fix.service could not be found.
[defaultuser@Xperia10III ~]$ rpm -qi harbour-brightness
Name        : harbour-brightness
Version     : 1.0
Release     : 1
Architecture: noarch
Install Date: Sat 22 Apr 2023 20:12:52 EEST
Group       : System
Size        : 665
License     : GPLv2
Signature   : (none)
Source RPM  : harbour-brightness-1.0-1.src.rpm
Build Date  : Sat 22 Apr 2023 16:21:48 EEST
Build Host  : samurai
URL         : http://github.com/direc85/harbour-brightness
Summary     : Brightness fix for Xperia 10 III
Description :
Short description of my Sailfish OS Application

I then tried to start the service, but the service was not found.

[defaultuser@Xperia10III ~]$ devel-su systemctl start brightness-fix.service
Failed to start brightness-fix.service: Unit brightness-fix.service not found.

Then I took a look at the source code and noticed the service is named as harbour-brightness.service. Or am I completely mistaken?

EDIT: I removed the installed rpm package, took a few pictures and re-installed the package and took more photos. The colour banding is still the same.

1 Like

Sorry, I had a typo there; the correct command is

systemctl status harbour-brightness.service

I edited the post above to fix it, too…

1 Like

I edited my last post as well, just to clarify that I took before and after photos to judge the amount of colour banding. Now, systemctl status harbour-brightness.service returns


● harbour-brightness.service - Brightness fixer for Xperia 10III
   Loaded: loaded (/usr/lib/systemd/system/harbour-brightness.service; enabled; vendor preset: enabled)
   Active: active (running) since Sat 2023-04-22 22:13:54 EEST; 2min 38s ago
     Docs: https://forum.sailfishos.org/t/11659/
 Main PID: 3361 (harbour-brightn)
   Memory: 724.0K
   CGroup: /system.slice/harbour-brightness.service
           ├─3361 /bin/bash /usr/bin/harbour-brightness
           ├─3373 dbus-monitor --system sender=com.nokia.mce,interface=com.nokia.mce.signal,member=displ
           └─3374 /bin/bash /usr/bin/harbour-brightness

It should be running indeed, and it does work for me…

Is there an effect and then difference if you run these commands in a dark room with a minimal brightness (as root)?

echo 1 > /sys/devices/dsi_panel_driver/hbm_mode
echo 0 > /sys/devices/dsi_panel_driver/hbm_mode

The first command brightens the screen and the second one returns it back to what it was. However, the “washed out” effect is still there and it’s identical before and after running the commands.

Also, using manual or automatic brightness adjustment doesn’t seem to make any difference. However, I’m not really bugged about this undesired colour banding, it’s just aestetchically unpleasing.

Since the workaround doesn’t work for some of us, there has to be more to the mystery… Could it be any help, if I uploaded the pictures before and after installing package? I used my partner’s iPhone to take the photos and they are asleep right now, so I could upload the tomorrow.

That’s indeed mysterious. So, that could mean there are differences in hardware, too, or this is affected by the Android version the device was on before it was flashed… I upgraded to a too new Android and firmware before flashing SFOS, what about you?