nriley / brightness

Command-line display brightness control for macOS.
BSD 2-Clause "Simplified" License
609 stars 55 forks source link

Failed to set brightness of secondary display - Lenovo ThinkVision L2452p 24-inch #11

Open adhulipa opened 8 years ago

adhulipa commented 8 years ago

This is the error I get when setting brightness

brightness -d 1 0.05
brightness: failed to set brightness of display 0x2b845104 (error -536870201)
kzahel commented 8 years ago

Same here on Dell U2713H Wondering if attaching a usb cable to the monitor would help. I don't have one though...

brightness -d 1 -v 1 brightness: failed to set brightness of display 0x2b2861cd (error -536870201)

adhulipa commented 8 years ago

I read somewhere about that trick too (attaching USB cable).. Not really sure how that would work... I did try it out though ... didn't work either

davidlc9113 commented 8 years ago

I find it is almost impossible. You can refer to following materials.

nriley commented 8 years ago

https://github.com/superduper/BrightnessMenulet and/or https://github.com/kfix/ddcctl may work for you. It sort of works for me with my current display, a LG 27MB85R (setting contrast works reliably; brightness and volume don't, and querying volume hangs my Mac). See the caveats at the bottom of the ddcctl readme, though; it may also hang your Mac, display or both.

In any case, the above seems quite flaky and I don't really want to release software that is likely to crash your Mac or display. If Apple decides to support DDC control in any serious manner I'll reconsider of course.

FranklinYu commented 7 years ago

Really disappointed at Apple; DDC/CI is so easy on Windows and Linux. Is there anywhere I can yell at Apple about it?

auduchinok commented 7 years ago

@franklinyu, try their bug report tracker, bugreport.apple.com. Don't think it'll help though.

arcseldon commented 7 years ago

This failed for external Dell P2715QT - 27" Monitor.

brightness: failed to set brightness of display 0x2b10190e (error -536870201)

but works for the built-in mac book pro screen.

thewellington commented 7 years ago

I have an LG UltraFine 27MD5KA and I get the same error:

$ brightness -v .9
brightness: failed to set brightness of display 0x1b561641 (error -536870201)
thewellington commented 7 years ago
brightness -lv
display 0: main, active, awake, online, external, ID 0x1b561641
    resolution 2560 x 1440 pt (5120 x 2880 px) @ 0.0 Hz, origin (0, 0)
    physical size 599 x 340 mm
    IOKit flags 0x7; IOKit display mode ID 0x80005000
    usable for desktop GUI, uses OpenGL acceleration
furiousgreencloud commented 7 years ago

brightness -d 0 .5 brightness: failed to set brightness of display 0x7bd8ca3c (error -536870201)

with:

display 0: main, active, awake, online, external, ID 0x7bd8ca3c resolution 2560 x 1440 pt (2560 x 1440 px) @ 0.0 Hz, origin (0, 0) physical size 597 x 336 mm IOKit flags 0x2000007; IOKit display mode ID 0x80005000 usable for desktop GUI, uses OpenGL acceleration

This a Apple iMac Display (Mid 2010)

MacOS 10.10.5 (14F2511)

using https://homebrew.bintray.com/bottles/brightness-1.2.yosemite.bottle.tar.gz

and getting

display 0: main, active, awake, online, external, ID 0x7bd8ca3c resolution 2560 x 1440 pt (2560 x 1440 px) @ 0.0 Hz, origin (0, 0) physical size 597 x 336 mm IOKit flags 0x2000007; IOKit display mode ID 0x80001000 usable for desktop GUI, uses OpenGL acceleration ./brightness: failed to get brightness of display 0x7bd8ca3c (error -536870201) display 1: active, awake, online, built-in, ID 0x7bd8d3bd resolution 1440 x 900 pt (1440 x 900 px) @ 0.0 Hz, origin (2560, 0) physical size 330 x 208 mm IOKit flags 0x2000007; IOKit display mode ID 0x80000000 usable for desktop GUI, uses OpenGL acceleration display 1: brightness 0.750000

with get from this posts date/time.

jathu commented 6 years ago

This script worked for me: https://github.com/kfix/ddcctl

I'm using an external Acer monitor.

latenitefilms commented 4 years ago

MY LG UltraFine 5K also fails when connected to my MacBook Pro via USB-C:

brightness -l
display 0: main, active, awake, online, external, ID 0x1b56fe4d
brightness: failed to get brightness of display 0x1b56fe4d (error -536870201)
display 1: active, awake, online, built-in, ID 0x4280c46
display 1: brightness 1.000000

However, I can use the brightness keyboard shortcuts to control the brightness of the external monitor, so macOS can definitely do it.

Also, as @jathu suggested, ddcctl also works.

thewellington commented 4 years ago

hi @latenitefilms if you download and compile the brightness code yourself it will work with you LG 5K UltraFine display

elijahchancey commented 3 years ago

I've got a Mac Mini with an M1 chip, MacOS 11.2.3, and an LG Ultrafine 5k Monitor. Using homebrew, I had a similar error in the issue description. I then downloaded the source, compiled it, put the binary in my path, and it works fine!

@nriley If you'd like me to provide further information, I'm happy to.

nriley commented 3 years ago

Yeah, I think we just need to figure out how to get the Homebrew formula updated... I didn't create the original one!

tbrodbeck commented 3 years ago

hi @latenitefilms if you download and compile the brightness code yourself it will work with you LG 5K UltraFine display

Thanks bud. Same on MacBook Pro 15'' from 2018

016 commented 3 years ago

DP's-iMac:~ root# brightness -l display 0: main, active, awake, online, external, ID 0x78c91d62 brightness: failed to get brightness of display 0x78c91d62 (error -536870201) display 1: active, awake, online, external, ID 0x78c91cf3 brightness: failed to get brightness of display 0x78c91cf3 (error -536870201)

I got sam error, and I am trying ddcctl and BrightnessMenulet, will update soon.

----- after tested ----- BrightnessMenulet is working for me, just download with the link https://github.com/superduper/BrightnessMenulet/raw/master/BrightnessMenulet/Brightness_Menulet.zip unzip, run the app, you will get it in top right corner, click and use it.

I am using 10.11.6 and have 2 ex-monitors it's working.

ijoseph commented 1 year ago

hi @latenitefilms if you download and compile the brightness code yourself it will work with you LG 5K UltraFine display

worked for me, and was very simple to compile too.


╰─ neofetch
                    'c.          <redacted>
                 ,xNMM.          ----------------------------
               .OMMMMo           OS: macOS 12.5.1 21G83 arm64
               OMMM0,            Host: MacBookPro18,3
     .;loddo:' loolloddol;.      Kernel: 21.6.0
   cKMMMMMMMMMMNWMMMMMMMMMM0:    Uptime: 3 days, 5 mins
 .KMMMMMMMMMMMMMMMMMMMMMMMWd.    Packages: 241 (brew)
 XMMMMMMMMMMMMMMMMMMMMMMMX.      Shell: zsh 5.8.1
;MMMMMMMMMMMMMMMMMMMMMMMM:       Resolution: 1800x3200, 1512x982
:MMMMMMMMMMMMMMMMMMMMMMMM:       DE: Aqua
.MMMMMMMMMMMMMMMMMMMMMMMMX.      WM: Quartz Compositor
 kMMMMMMMMMMMMMMMMMMMMMMMMWd.    WM Theme: Blue (Dark)
 .XMMMMMMMMMMMMMMMMMMMMMMMMMMk   Terminal: tmux
  .XMMMMMMMMMMMMMMMMMMMMMMMMK.   CPU: Apple M1 Pro
    kMMMMMMMMMMMMMMMMMMMMMMd     GPU: Apple M1 Pro
     ;KMMMMMMMWXXWMMMMMMMk.      Memory: 3021MiB / 16384MiB
       .cooc,.    .,coo:.
Alexandro1112 commented 1 year ago

same error.

foolip commented 8 months ago

I got the same error with my LG UltraFine 27MD5KL and as others on this issue suggested, just building from source and it works. @nriley is the binary in Homebrew outdated?

nriley commented 8 months ago

@foolip Yes, it is. I didn't upload the Homebrew package; someone else did and abandoned it.

thewellington commented 8 months ago

Just created PR 49 to suggest the removal of hombrew from the README if there is no support for updating homebrew.