AsahiLinux / linux

Linux kernel source tree
Other
2.16k stars 85 forks source link

Add/follow the patches in linux kernel to support studio display backlight control #266

Closed flightmansam closed 2 months ago

flightmansam commented 4 months ago

TL/DR; there is a kernel patch to support controlling the brightness of the studio display using linux. Can we pls merge it, it would be awesome for the 0.1% of idiots that have the studio display (like me).

Preface: I f**king love where Asahi linux is going. After installing it on my macbook pro about half a week ago I have had an absolute blast getting it all up and running. I haven't ever had so much fun just enjoying the experience of an operating system.

I am one of those apple fanbois who setup a mac and a Studio Display. I have been itching to connect my display. But as I eagerly await USB-C DP (alt) mode support in Asahi I must make do with using the HDMI port of my Asahi Linux MacBook Pro. For those playing along at home, the Studio Display has only a usb-c port for display input. People (including Apple's own ambiguous advertising) mistake this to be a Thunderbolt only display however it is very happy connecting to any device that supports USB-C DP (alt) (I was even using my phone as a daily driver with the display for a cheeky bit there). Perhaps that's my fuzziness around the topic of USB-C/Thundervold3/4

I have been successful in connecting my display to the asahi linux macbook pro (M1 Pro 16") with two different methods.

Method 1 (video only).

  1. Connect HDMI port to an active HDMI->DP converter (I used this one)
  2. Connect the DP to a DP->USB-C (alt) converter (I used this one)
  3. Profit! I even use this technique to connect my nintendo switch to it 😈

This method has no audio (speakers in the display are USB-C devices). The method can't change brightness using DDC (because Apple).

Method 2 (usb and video)

  1. Connect HDMI port to an active HDMI->DP converter (I used this one)
  2. Connect DP to a DP->USB-C 'centralizer' (bridge?). These are rare to find easily. I had to import one direct from the taiwanese manufacturer. I used this one).
  3. Profit and listen to your tunes!

The HDMI->DP converter I used could not push 5K resolution without overheating/crashing. 4K (2560x2880) never worked for some reason? This maybe a studio display thing tho. I am stuck using it in 1440p with solid performance. I might try a few more converters to see I can get it up to sweet sweet 5k res.

Anyway! Ramble over time to get to the point. There is a kernel patch to support controlling the brightness of the studio display using linux. I am not sure what status it is at and I am not 'linuxy' enough to know where to find the PR for it or the actual git patch files. If someone could lead me into the right direction I would be happy to make a PR (kinda keen to maybe try compiling Asahi). Would I need to compile the whole thing or just this specific set of modules??

❤️

flightmansam commented 4 months ago

There is a user space tool to set brightness (it might be related to the author of the patch). It works great!

Conan-Kudo commented 2 months ago

This is not ready to land. It's in the process of being significantly reworked for a v4, so I would probably not incorporate this patch at this time.

flightmansam commented 2 months ago

Sounds good to me! Happy to close this but thought it was worth having in the loop :)