Announcement

Collapse
No announcement yet.

Linux's Display Brightness/Backlight Interface Is Finally Being Overhauled

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Linux's Display Brightness/Backlight Interface Is Finally Being Overhauled

    Phoronix: Linux's Display Brightness/Backlight Interface Is Finally Being Overhauled

    Hans de Goede of Red Hat has been involved with many great Linux desktop/laptop hardware improvements over the years for work that would have otherwise likely gone unaddressed. One of the initiatives he has been focusing on recently that has long been a sore point for Linux laptops has been the user-space backlight/brightness interface. This week at Linux Plumbers Conference was a presentation on this effort that has long been ripe for improvement...

    https://www.phoronix.com/news/2022-L...light-Overhaul

  • #2
    This might be slightly off topic, but does anyone feel like Linux's handling of display power cycling is really not robust? I'll give you 2 examples:
    On KDE power cycling may cause Plasma desktop to crash. I think it also once happened to me with XFCE a long time ago.
    On Gnome I recently wanted to modify my monitor settings during gameplay and accidentally pressed the monitor power button. When I turned it back on, the game crashed. This also happend multiple times.
    On Windows, display power cycling never caused any issues. I think the reason for this might be the way display detection works on both operating systems:
    On Linux auto detection seems to be running constantly, while on Windows you usually need to press "detect display" if you have some changes in your monitor setup, hence power cycling doesn't cause any issues on Windows.

    Comment


    • #3
      My windows move around when I power cycle monitors on Cinnamon (X11). It's a multi monitor setup.
      Last edited by hamishmb; 17 September 2022, 07:45 AM. Reason: Add last sentence

      Comment


      • #4
        Originally posted by hamishmb View Post
        My windows move around when I power cycle monitors on Cinnamon (X11). It's a multi monitor setup.
        I wish all desktop environments at least had a checkbox in display settings to disable monitor auto detection in order to prevent all these issues from happening.

        Interestingly, Mate is the only DE that didn't give me any issues with power cycling. It also has a "detect monitor" button in its display settings, which implies that it works more like on Windows.
        Last edited by user1; 17 September 2022, 09:43 AM.

        Comment


        • #5
          I wonder if this new API could also help in desktop/external screen cases where brightness control currently barely works (and is usually not exposed by DEs by default)? Or is that mostly unrelated?

          Comment


          • #6
            Originally posted by user1 View Post
            This might be slightly off topic, but does anyone feel like Linux's handling of display power cycling is really not robust? I'll give you 2 examples:
            On KDE power cycling may cause Plasma desktop to crash. I think it also once happened to me with XFCE a long time ago.
            On Gnome I recently wanted to modify my monitor settings during gameplay and accidentally pressed the monitor power button. When I turned it back on, the game crashed. This also happend multiple times.
            Yes, in general, dealing with display plug/unplug/power events on Linux isn't anywhere near as robust as on Windows.

            Originally posted by user1 View Post
            On Windows, display power cycling never caused any issues. I think the reason for this might be the way display detection works on both operating systems:
            On Linux auto detection seems to be running constantly, while on Windows you usually need to press "detect display" if you have some changes in your monitor setup, hence power cycling doesn't cause any issues on Windows.
            This isn't the way Windows works at all. It's always monitoring for display change events. The "Detect" button is only there as a manual fallback if the system didn't automatically detect the event. If you turn off the power to your primary display in a multi-monitor setup, it will move your primary display to another display. If you leave your display settings open and start power cycling or unplugging / plugging displays, you'll see it updating the display layout in real time (slowly as it deals with reconfiguring things). On Windows this event handling may be a function of the display driver itself.

            Comment


            • #7
              I hope these changes deal with the all too common case of the lowest brightness setting on laptops in Linux being zero. That's fun for new users if they don't have obvious keyboard shortcuts for brightness control (or they do but the keys aren't mapped properly in Linux) and they end up with a black screen.

              Comment


              • #8
                Originally posted by pWe00Iri3e7Z9lHOX2Qx View Post
                This isn't the way Windows works at all. It's always monitoring for display change events. The "Detect" button is only there as a manual fallback if the system didn't automatically detect the event. If you turn off the power to your primary display in a multi-monitor setup, it will move your primary display to another display. If you leave your display settings open and start power cycling or unplugging / plugging displays, you'll see it updating the display layout in real time (slowly as it deals with reconfiguring things). On Windows this event handling may be a function of the display driver itself.
                Thanks for the insight. A long time ago I had to press "detect display" on Windows when I changed to another monitor, so that's why I thought it works like this.

                Comment


                • #9
                  Originally posted by hamishmb View Post
                  My windows move around when I power cycle monitors on Cinnamon (X11). It's a multi monitor setup.
                  Me too. It's infuriating.
                  But I always thought it was a Muffin/Mutter issue. Could it be lower level than that?

                  EDIT: I just discovered a Cinnamon extension by nathan818fr called "Back to Monitor" which solves this issue! hamishmb you might want to try it out!
                  Last edited by unis_torvalds; 17 September 2022, 02:27 PM.

                  Comment


                  • #10
                    Off topic for the article, but relevant to the comments, I would think enumerating a default display buffer, and either flushing to a display if attached, or discarding when detached, would solve the plug/unplug/power/disconnect on sleep headaches. Set said buffer to whatever the last combined display resolution was on last GPU power off, and update based on EDID/current modesetting during use.

                    Comment

                    Working...
                    X