daitj / gnome-display-brightness-ddcutil

Display brightness slider for gnome shell using ddcutil backend
GNU General Public License v3.0
291 stars 34 forks source link

need to disable and re-enable extension after boot #116

Open mihstaz opened 10 months ago

mihstaz commented 10 months ago

Describe the bug The extension needs to be disabled and re-enabled for the slider to appear in the system menu.

To Reproduce Steps to reproduce the behavior: Install extension on Ubuntu 23.10, enable the extension and reboot.

Journal logs You need to enable Verbose debugging from this extension's settings and then reload this extension first.

journalctl --no-pager -b /usr/bin/gnome-shell
Run above command and paste the log here 

Will do and edit post after enabling verbose debugging and rebooting:
Nov 11 19:12:27 hostname gnome-shell[3021]: display-brightness-ddcutil extension:
                                            ddcutil reading display status for bus: 5 is: DDC communication failed for monitor on bus /dev/i2c-5
Nov 11 19:12:28 hostname gnome-shell[3021]: GNOME Shell started at Sat Nov 11 2023 19:12:26 GMT+0100 (Central European Standard Time)
Nov 11 19:12:28 hostname gnome-shell[3021]: Registering session with GDM
Nov 11 19:12:28 hostname gnome-shell[2137]: Shutting down GNOME Shell
Nov 11 19:12:28 hostname gnome-shell[2137]: Connection to xwayland lost
Nov 11 19:12:28 hostname gnome-shell[2137]: Xwayland terminated, exiting since it was mandatory
Nov 11 19:12:28 hostname gnome-shell[2137]: (../src/core/meta-context.c:532):meta_context_terminate: runtime check failed: (priv->state == META_CONTEXT_STATE_RUNNING)
Nov 11 19:12:28 hostname gnome-shell[2137]: g_main_loop_is_running: assertion 'loop != NULL' failed
Nov 11 19:12:28 hostname gnome-shell[2137]: (../src/core/meta-context.c:533):meta_context_terminate: runtime check failed: (g_main_loop_is_running (priv->main_loop))
Nov 11 19:12:28 hostname gnome-shell[2137]: g_main_loop_quit: assertion 'loop != NULL' failed

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

The icon of the extension is shown in the system 'tray', but the slider is not there. I have to manually disable and re-enable the extension for everything to work properly.

daitj commented 10 months ago

It seems like when system starts ddcutil is not able to communicate.

Disable the extension and run this in the shell after fresh boot, post the output here.

ddcutil detect --brief
ddcutil getvcp D6 --brief --bus 5
ddcutil getvcp 10 --brief --bus 5 
mihstaz commented 10 months ago

$ ddcutil detect --brief Display 1 I2C bus: /dev/i2c-2 DRM connector: card0-HDMI-A-1 Monitor: ACR:V193:LHW0D1558533

Invalid display I2C bus: /dev/i2c-5 DRM connector: card0-eDP-1 Monitor: NCP::

$ ddcutil getvcp D6 --brief --bus 5 DDC communication failed for monitor on bus /dev/i2c-5

$ ddcutil getvcp 10 --brief --bus 5 DDC communication failed for monitor on bus /dev/i2c-5

/dev/i2c-5 is the display of my laptop, heres the result when checking the external monitor:

$ ddcutil getvcp 10 --brief --bus 2 VCP 10 C 0 100

$ ddcutil getvcp D6 --brief --bus 2 VCP D6 SNC x01

I also use this extension on my desktop with ubuntu 22.04 (Gnome 43 I think and extension version 36, no issues there).

Also, idk if this is relevant, but my laptop gets used at different locations with different monitor setups. Didn't cause any issues when using the same versions as the desktop though.

daitj commented 10 months ago

Could you enable verbose logging in the extension and then reboot the laptop, the post the log here.

I would like to see how many monitors are detected at the time of boot. It could be some hardware and ddcutil issue than extension issue.

Cabus1982 commented 2 months ago

Same problem, it doesn’t always happen either

`ddcutil detect --brief ddcutil getvcp D6 --brief --bus 5 ddcutil getvcp 10 --brief --bus 5 Display 1 I2C bus: /dev/i2c-0 DRM connector: card1-HDMI-A-1 Monitor: GSM:LG FULL HD:010NTGY2M919

No monitor detected on bus /dev/i2c-5 No monitor detected on bus /dev/i2c-5 `