Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue on secondary screen - Samsung #6

Closed
JonTheWong opened this issue Nov 20, 2019 · 15 comments
Closed

Issue on secondary screen - Samsung #6

JonTheWong opened this issue Nov 20, 2019 · 15 comments

Comments

@JonTheWong
Copy link

JonTheWong commented Nov 20, 2019

Hello,

The app is working fine on my primary display, both screens show the brightness overlay.
My secondary screen is the same model, Samsung LS24F350FHNXZA
When adjusting the brightness, the secondary screen does not dim.

NightShift mode does work on both screens.

Type: MacBook Pro (Retina, 13-inch, Early 2015)
OS: 10.15.1
Screen: Samsung LS24F350FHNXZA
NightShift: Disabled
Connection: Mini DisplayPort to HDMI Adapter

Notes: Both displays are running while the laptop display is in clamshell mode. (off)
Both displays are properly registered and their version information matches what i would expect.

When command modifier is enabled, only the primary screen shows the brightness ui.
When disabled both screens show the ui.

Cannot bind to external mac keyboard, F1/F2 had to move the options to F18/F19 for testing.

Keyboard setup with media buttons active, no need for function/command keys to raise or lower brightness / volume

-- Was able to bind using the magic keyboard options MK_BDN/MK_BUP

  Chipset Model:	Intel Iris Graphics 6100
  Type:	GPU
  Bus:	Built-In
  VRAM (Dynamic, Max):	1536 MB
  Vendor:	Intel
  Device ID:	0x162b
  Revision ID:	0x0009
  Metal:	Supported, feature set macOS GPUFamily1 v4
  Displays:
S24F350:
  Resolution:	1920 x 1080 (1080p FHD - Full High Definition)
  UI Looks like:	1920 x 1080 @ 60 Hz
  Framebuffer Depth:	24-Bit Color (ARGB8888)
  Display Serial Number:	H4ZKC01270  
  Main Display:	Yes
  Mirror:	Off
  Online:	Yes
  Rotation:	Supported
  Automatically Adjust Brightness:	No
S24F350:
  Resolution:	1920 x 1080 (1080p FHD - Full High Definition)
  UI Looks like:	1920 x 1080 @ 60 Hz
  Framebuffer Depth:	24-Bit Color (ARGB8888)
  Display Serial Number:	H4ZKB00127  
  Mirror:	Off
  Online:	Yes
  Rotation:	Supported
  Automatically Adjust Brightness:	No

I am not seeing them on the Thunderbolt section.

@fnesveda
Copy link
Owner

Hi,

thanks for the report! Distinguishing between multiple displays of the same models is a bit of a sore spot, sometimes their serial number doesn't get passed to IOKit properly, and then the app gets confused between them. System information shows their serial number properly, because it extracts it from the display EDID, but in IOKit the number is often missing.

Could you please send me the output of the following command?

ioreg -c IOFramebuffer -r -l -f -w 0

It might be quite long, so uploading it to pastebin or similar service might be better than just pasting it here.

Thank you!

@kevinjohncutler
Copy link

kevinjohncutler commented Nov 20, 2019

Same issue here, mine are running off my desktop via displayport. My monitors are identical ViewSonic panels. The output from the terminal command you suggested is here. Below is from system inf0:

Chipset Model: Radeon RX 580
Type: GPU
Bus: PCIe
PCIe Lane Width: x16
VRAM (Total): 8 GB
Vendor: AMD (0x1002)
Device ID: 0x67df
Revision ID: 0x00e7
Metal: Supported, feature set macOS GPUFamily2 v1
Displays:
VP2768-4k:
Resolution: 5120 x 2880 (5K/UHD+ - Ultra High Definition Plus)
UI Looks like: 2560 x 1440 @ 60 Hz
Framebuffer Depth: 30-Bit Color (ARGB2101010)
Display Serial Number: VEK193000307
Main Display: Yes
Mirror: Off
Online: Yes
Rotation: Supported
Automatically Adjust Brightness: No
Connection Type: DisplayPort
VP2768-4k:
Resolution: 5120 x 2880 (5K/UHD+ - Ultra High Definition Plus)
UI Looks like: 2560 x 1440 @ 60 Hz
Framebuffer Depth: 30-Bit Color (ARGB2101010)
Display Serial Number: VEK193000318
Mirror: Off
Online: Yes
Rotation: Supported
Automatically Adjust Brightness: No
Connection Type: DisplayPort

@fnesveda
Copy link
Owner

@kevinjohncutler Thanks!

It looks like both displays are reporting the same serial number to IOKit (even though the serial strings in System Information are correct, but those are parsed from the display EDID) - you can see that on lines 151 and 313 from the command output. This confuses the app, because it can't find the right framebuffer port for the displays in this case.

There unfortunately isn't a straightforward way to deal with this, but I'll try to figure out a workaround later this week. If anybody else has the same problem, please upload the output of ioreg -c IOFramebuffer -r -l -f -w 0 here as well, it'll help a lot.

@fnesveda
Copy link
Owner

@JonTheWong @kevinjohncutler Do either of you have Xcode installed?

I think I figured out a fix, but I need a little bit of help to make sure it will work. If you have Xcode installed, could you please download this playground, run it and upload its output here?

Thank you!

@JonTheWong
Copy link
Author

JonTheWong commented Dec 1, 2019

@fnesveda

Hi,

thanks for the report! Distinguishing between multiple displays of the same models is a bit of a sore spot, sometimes their serial number doesn't get passed to IOKit properly, and then the app gets confused between them. System information shows their serial number properly, because it extracts it from the display EDID, but in IOKit the number is often missing.

Could you please send me the output of the following command?

ioreg -c IOFramebuffer -r -l -f -w 0

It might be quite long, so uploading it to pastebin or similar service might be better than just pasting it here.

Thank you!

https://pastebin.com/He66y2yK

DisplaySerialNumber are the same for both displays.

This is the output of the playground.

Displays:
188941657
3360
19501
1515867480
1

188941658
3360
19501
1515867480
2

Framebuffers:
0
0
0
unknown

19501
3360
1515867480
IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/IGPU@2/AppleIntelFramebuffer@1/display0/AppleDisplay

19501
3360
1515867480
IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/IGPU@2/AppleIntelFramebuffer@2/display0/AppleDisplay

@fnesveda
Copy link
Owner

fnesveda commented Dec 1, 2019

@JonTheWong Thanks for the report, it helps a lot.

I've made a beta version with some changes that should fix this issue, could you please try if it works? Thanks.

@JonTheWong
Copy link
Author

@fnesveda

My experience;

Require command modifier is unchecked and i can see the brightness overlay on both screens.
With it checked, i have to move the app from screen 1 to 2 to have the overlay show.

Read initial brightness has no effect.

Change brightness on all displays disabled, moving the app to screen 2 till only shows the overlay on screen 1 with or without Read initial... checked.

I did not reboot, but i expect there to be no change. Running app from download folder, i expect there to be no requirements of location.

@fnesveda
Copy link
Owner

fnesveda commented Dec 1, 2019

So it still changes the brightness only on one display, and never on the second?

Also you shouldn't have to move the app from screen to screen, it should change the brightness only on the currently main display (the display on which you last performed any interaction with any app).

And yes, it shouldn't matter where the app is run from, and a reboot should not matter.

@JonTheWong
Copy link
Author

@fnesveda Yes, exactly it never changes on the second screen.

Changing the app from screen to screen was just during my testing, i noticed that moving the app would change the overlay display based on the app location. But would still change the brightness on the primary screen.

@fnesveda
Copy link
Owner

fnesveda commented Dec 1, 2019

Okay, could you please test one more beta version? I think I've found the issue now. Thank you.

@JonTheWong
Copy link
Author

@fnesveda

Change of brightness on all displays works. Overlay appear and adjust the brightness.
Switching the app from screen to screen when all display is off works.
Read Initial brightness, on or off seem to produce the same results.
Launch at Login won't stay activated.

I appreciate all the work and back and forth with me, this will save my eyes so much added stress.

Thank you.

@fnesveda
Copy link
Owner

fnesveda commented Dec 2, 2019

@JonTheWong Finally! I'm happy that it works for you. Thank you for all the testing and debugging, it helped a great deal. I will release a new stable version soon, once I clean up the code a bit, but it will probably be the same as the last beta functionality-wise, so you won't need to update.

As for the Launch at login issue, I'll take a look at it as well, but it works normally on my computer and I haven't heard complaints about it yet - perhaps it is related to running the app from the Downloads folder? Could you please look in System Preferences - Users and Groups - Login Items, if the login item is there?
Maybe Apple finally removed the APIs for managing Login Items in Catalina, they were deprecated for a while, but still worked normally for me. I'll see what I can find out.

EDIT: I can confirm that in Catalina, when running the app from the Downloads folder, the Launch at login checkbox doesn't stay enabled. It works fine when running from the /Applications folder, and it also works fine from the Downloads folder in High Sierra. I'll try to find a fix for this.

Anyway, thanks again for all the debugging!

@JonTheWong
Copy link
Author

@fnesveda No no no thank you! <3 all the work was on your side, i just ran a few apps 😉

Yah it seemed to be related to the download folder, i had to kill the app in activity monitor.
Moved it to the Application folder and everything was good.

Thank you again!

@JonTheWong JonTheWong changed the title Issue on secondary screen Issue on secondary screen - Samsung Dec 2, 2019
@fnesveda fnesveda reopened this Dec 2, 2019
@fnesveda
Copy link
Owner

fnesveda commented Dec 2, 2019

I've just published a new stable release, 1.3.0, which fixes this issue. If you're using the last beta version from the earlier comments, there are no changes functionality-wise, so you don't necessarily need to update.

@kevinjohncutler
Copy link

I've just published a new stable release, 1.3.0, which fixes this issue. If you're using the last beta version from the earlier comments, there are no changes functionality-wise, so you don't necessarily need to update.

Works great on my viewsonic panels, thanks so much!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants