streetpea / chiaki-ng

Next-Generation of Chiaki (the open-source remote play client for PlayStation)
https://streetpea.github.io/chiaki-ng/
GNU Affero General Public License v3.0
1.05k stars 62 forks source link

[BUG] Low Rumble Feedback with DS + Washed out Colors on MacBook #385

Open mufaaf opened 1 month ago

mufaaf commented 1 month ago

Hey folks.

I am currently using C4D on my MacBook Air M2 15" and the experience is fantastic - it almost feels native.

But I have two problems that I am hoping there is a solution for:

I hope someone can help me with these issues!

excluzyf commented 1 month ago

Hi, Same for me with my MacBook Air M1, the colors are washed out. Trying different video settings affects the image quality but not this feeling that the colors are not sharp. Hope it can be solved in the next release :)

streetpea commented 1 month ago

@mufaaf Connecting a DualSense via bluetooth means it cannot use haptic feedback and will default to rumble emulated haptics instead. the Dualsense has a very bad rumble which is what you're experiencing. Please attach the DualSense via USB to use haptic feedback as of the latest release today 1.8.1 following these instructions to enable haptic feedback on MacOS https://streetpea.github.io/chiaki-ng/setup/controlling/#enabling-dualsense-haptics-on-macos. Requiring usb is a limitation of the DualSense driver on all platforms except directly connected to PlayStation 5. Just to note; I have specifically tried increasing the rumble intensity for DualSense due to previous requests but it doesn't make it any better as even at max intensity it seems to just be very poor on the DualSense at least from my testing.

streetpea commented 1 month ago

@mufaaf @jbaiter As for the colors that is actually controlled by libplacebo (https://github.com/haasn/libplacebo rendering engine also used by mpv and vlc media players) ... perhaps we could enable color adjustment by end users if you don't like the defaults (see https://libplacebo.org/options/#color-adjustment) ... maybe allowing saturation to be alterable by end users?

jbaiter commented 1 month ago

I actually have a branch that adds support for custom libplacebo options that I used to tinker with for finding good defaults, maybe a good idea to offer that as an option? It's based on a separate config file in the Chiaki user directory.

mufaaf commented 1 month ago

@mufaaf Connecting a DualSense via bluetooth means it cannot use haptic feedback and will default to rumble emulated haptics instead. the Dualsense has a very bad rumble which is what you're experiencing. Please attach the DualSense via USB to use haptic feedback as of the latest release today 1.8.1 following these instructions to enable haptic feedback on MacOS https://streetpea.github.io/chiaki-ng/setup/controlling/#enabling-dualsense-haptics-on-macos. Requiring usb is a limitation of the DualSense driver on all platforms except directly connected to PlayStation 5. Just to note; I have specifically tried increasing the rumble intensity for DualSense due to previous requests but it doesn't make it any better as even at max intensity it seems to just be very poor on the DualSense at least from my testing.

That fixed it. Thanks for introducing haptics with the latest update. The experience is close to native, if not actual 1:1. Super impressive!

And yes, controlling the color space would be awesome in future versions. It's not that the colors are "bad", but there is something missing, it's like a layer of color grading is not there. Maybe more contrast or vibrance might help.

mufaaf commented 1 month ago

I actually have a branch that adds support for custom libplacebo options that I used to tinker with for finding good defaults, maybe a good idea to offer that as an option? It's based on a separate config file in the Chiaki user directory.

I would love to give it a shot. Is there any where I can download it?

jbaiter commented 1 month ago

If you can build it yourself, the branch for it is here: https://github.com/jbaiter/chiaki4deck/tree/placebo-advanced-cfg @streetpea should i create a PR for it?

streetpea commented 1 month ago

@mufaaf use this build https://github.com/streetpea/chiaki-ng/actions/runs/10378320487/artifacts/1808965239

Will monitor the file pl_render_params.conf in the Chiaki config directory for custom rendering settings and apply them to the running stream. For available options see [1], the syntax is simply a set of key=value pairs, separated from each other with either whitespace, comma, semicolon, colon or newline characters.

[1] https://libplacebo.org/options/

mufaaf commented 1 month ago

@mufaaf use this build https://github.com/streetpea/chiaki-ng/actions/runs/10378320487/artifacts/1808965239

Will monitor the file pl_render_params.conf in the Chiaki config directory for custom rendering settings and apply them to the running stream. For available options see [1], the syntax is simply a set of key=value pairs, separated from each other with either whitespace, comma, semicolon, colon or newline characters.

[1] https://libplacebo.org/options/

Thanks a lot! Will play around with the config file and see how it goes. Will post results here, if I can!

mufaaf commented 1 month ago

@mufaaf use this build https://github.com/streetpea/chiaki-ng/actions/runs/10378320487/artifacts/1808965239

Will monitor the file pl_render_params.conf in the Chiaki config directory for custom rendering settings and apply them to the running stream. For available options see [1], the syntax is simply a set of key=value pairs, separated from each other with either whitespace, comma, semicolon, colon or newline characters.

[1] https://libplacebo.org/options/

Can you please tell me where I can find the file you mentioned? I am new to Mac so don't really know my way around like I do Windows.

I checked Applications > right click Chiaki > Show Package Contents and scanned all the folders there but I could not find the file there. I even did a search but it did not find it.

streetpea commented 4 weeks ago

@mufaaf You need to create the file yourself. For example in terminal:

touch ~/Library/Preferences/Chiaki/pl_render_params.conf

and then fill key value pairs in the form key=value (one pair per line) according to the options you want to be different from their defaults here: https://libplacebo.org/options/ Then choose custom for the preset in video options.

mufaaf commented 4 weeks ago

@mufaaf You need to create the file yourself. For example in terminal:

touch ~/Library/Preferences/Chiaki/pl_render_params.conf

and then fill key value pairs in the form key=value (one pair per line) according to the options you want to be different from their defaults here: https://libplacebo.org/options/ Then choose custom for the preset in video options.

Ahh! Thanks, made the file and will play around the settings. Cheers!

mufaaf commented 4 weeks ago

@mufaaf You need to create the file yourself. For example in terminal:

touch ~/Library/Preferences/Chiaki/pl_render_params.conf

and then fill key value pairs in the form key=value (one pair per line) according to the options you want to be different from their defaults here: https://libplacebo.org/options/ Then choose custom for the preset in video options.

Screenshot 2024-08-15 at 11 45 39 AM

So that's how I have the conf file and it doesn't seem to be working. I purposefully cranked the brightness to 80 to confirm if it was working but the picture remained unchanged. I have set the render preset to custom under Video. The file is located exactly where you mentioned (I had to create the Chiaki folder myself). Am I doing something wrong?

jbaiter commented 4 weeks ago

Did you set the quality in the settings to "Custom"? Only then the settings from the file will be applied.

mufaaf commented 4 weeks ago

Did you set the quality in the settings to "Custom"? Only then the settings from the file will be applied.

Screenshot 2024-08-15 at 2 09 59 PM

I did, indeed.

streetpea commented 4 weeks ago

@mufaaf it looks like some of the values are upper-case in your file instead of lower case. Furthermore, some of the values aren't in their correct range according to: https://libplacebo.org/options/ Try these values for starters (should provide an extremely bright image and show things are working):

color_adjustment=yes
brightness=0.80
gamma=1.00
saturation=2.0
gamut_mapping=perceptual
tone_mapping=spline
mufaaf commented 4 weeks ago

@mufaaf it looks like some of the values are upper-case in your file instead of lower case. Furthermore, some of the values aren't in their correct range according to: https://libplacebo.org/options/ Try these values for starters (should provide an extremely bright image and show things are working):

color_adjustment=yes
brightness=0.80
gamma=1.00
saturation=2.0
gamut_mapping=perceptual
tone_mapping=spline

Thanks for this! But unfortunately, this didn't work as well. I copied the same exact text, set the render to Custom but there has been no difference in the image. It should be super bright because of the brightness settings but it isn't.

streetpea commented 4 weeks ago

That’s weird it works for me on my Mac. Can you try dragging and dropping the Chiaki executable in the terminal and running it that way and see if any error logs are coming from libplacebo regarding the custom render params file?

mufaaf commented 4 weeks ago

That’s weird it works for me on my Mac. Can you try dragging and dropping the Chiaki executable in the terminal and running it that way and see if any error logs are coming from libplacebo regarding the custom render params file?

Sorry, you will have to be more specific with that, lol. I am new to Mac so don't really understand the workflow.

I launched terminal, and dragged and dropped the Chiaki.app from the Applications folder to Terminal and hit enter. It said permission denied.

Screenshot 2024-08-16 at 4 26 22 PM

streetpea commented 3 weeks ago

I’ll add settings for the config file so you can access it via the menu instead of having to use a text file.

mufaaf commented 3 weeks ago

I’ll add settings for the config file so you can access it via the menu instead of having to use a text file.

That would be awesome. Looking forward to the release!

excluzyf commented 3 weeks ago

@mufaaf use this build https://github.com/streetpea/chiaki-ng/actions/runs/10378320487/artifacts/1808965239

Will monitor the file pl_render_params.conf in the Chiaki config directory for custom rendering settings and apply them to the running stream. For available options see [1], the syntax is simply a set of key=value pairs, separated from each other with either whitespace, comma, semicolon, colon or newline characters.

[1] https://libplacebo.org/options/

Like mufaaf, I'd like to try the configuration file method to see if it would change something. But the build you provided seems no more downloadable/accessible.

streetpea commented 2 weeks ago

@mufaaf @excluzyf here is a new build that allows you to configure the libplacebo options from the settings once you choose custom renderer (i.e., when custom is selected a button will appear allowing you to open the custom renderer settings) https://github.com/streetpea/chiaki-ng/actions/runs/10548285416/artifacts/1851963583

mufaaf commented 2 weeks ago

@mufaaf @excluzyf here is a new build that allows you to configure the libplacebo options from the settings once you choose custom renderer (i.e., when custom is selected a button will appear allowing you to open the custom renderer settings) https://github.com/streetpea/chiaki-ng/actions/runs/10548285416/artifacts/1851963583

Thanks, mate. Will give it a shot and report back!

excluzyf commented 2 weeks ago

Merci beaucoup ;) !!!Le 25 août 2024 à 18:11, mufaaf @.***> a écrit :

@mufaaf @excluzyf here is a new build that allows you to configure the libplacebo options from the settings once you choose custom renderer (i.e., when custom is selected a button will appear allowing you to open the custom renderer settings) https://github.com/streetpea/chiaki-ng/actions/runs/10548285416/artifacts/1851963583

Thanks, mate. Will give it a shot and report back!

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

mufaaf commented 2 weeks ago

@mufaaf @excluzyf here is a new build that allows you to configure the libplacebo options from the settings once you choose custom renderer (i.e., when custom is selected a button will appear allowing you to open the custom renderer settings) https://github.com/streetpea/chiaki-ng/actions/runs/10548285416/artifacts/1851963583

This certainly works. Now to tool around with it and configure it to the settings I like!

Also, if you do implement this in the final version of C4D in the future, please add the option to like click on the numbers and type them in, instead of using the sliders because those on a trackpad have to fumble around a lot. Not a required feature but nice to have. Thanks a lot!

streetpea commented 2 weeks ago

@mufaaf You should be able to use your keyboard arrow keys or controller joystick to move the slider left to right once it’s selected instead of using a touchpad. None of the navigation should require a trackpad.

mufaaf commented 2 weeks ago

@mufaaf You should be able to use your keyboard arrow keys or controller joystick to move the slider left to right once it’s selected instead of using a touchpad. None of the navigation should require a trackpad.

Neither keyboard arrows or the controller works in adjusting those settings.

streetpea commented 2 weeks ago

It works for me but anti-ringing strength was broken so maybe you tested it on that one. I fixed antringing strength for the future but besides that the build you have should work.

streetpea commented 2 weeks ago

@mufaaf actually I figured out the issue ... keyboard navigation is off by default on MacOS. You have to turn it on by going to System Preferences->Keyboard->Shortcuts and click the check box for Use keyboard navigation to move focus between controls. EnableKeyboardNavigation then it will work. It is on by default on Windows and Linux. I will add these details on how to enable keyboard navigation for MacOS to the docs. Thanks for pointing it out!

FYI: To navigate between tabs on MacOS you can use Fn + up (i.e., page down on Windows/Linux) (L1 on controller) or Fn + down (i.e., page up on Windows/Linux) (R1 on controller)

mufaaf commented 2 weeks ago

@mufaaf actually I figured out the issue ... keyboard navigation is off by default on MacOS. You have to turn it on by going to System Preferences->Keyboard->Shortcuts and click the check box for Use keyboard navigation to move focus between controls. EnableKeyboardNavigation then it will work. It is on by default on Windows and Linux. I will add these details on how to enable keyboard navigation for MacOS to the docs. Thanks for pointing it out!

FYI: To navigate between tabs on MacOS you can use Fn + up (i.e., page down on Windows/Linux) (L1 on controller) or Fn + down (i.e., page up on Windows/Linux) (R1 on controller)

That was it, it now works!

FYI, the option in the new MacOS is outside of the Keyboard Shortcut menu, as shown here:

Screenshot 2024-08-26 at 9 19 55 AM

streetpea commented 2 weeks ago

@mufaaf Here is an updated build with some fixes + default settings added to the right of each setting to easier keep track of changes: https://github.com/streetpea/chiaki-ng/actions/runs/10571229480/artifacts/1857719314. Also, using custom settings for presets that weren’t automatically set to custom preset (ie doesn’t have (Custom) to the right of it) was broken before preventing custom values from working when it was toggled to in the menu. To fix it now toggle the given preset from custom to something else and then back to custom.

Have you been able to find good settings? I'm thinking maybe increasing saturation to maybe 1.5 may help.

streetpea commented 2 weeks ago

@mufaaf @excluzyf I realized I forgot to ask this: btw did you enable hdr (select H265 HDR as codec)? It should make the image more vibrant. Most Mac laptop screens support it. Also the monitor attached to you ps5 needs to be hdr and may need to be turned on for this to work.

mufaaf commented 2 weeks ago

@mufaaf Here is an updated build with some fixes + default settings added to the right of each setting to easier keep track of changes: https://github.com/streetpea/chiaki-ng/actions/runs/10571229480/artifacts/1857719314. Also, using custom settings for presets that weren’t automatically set to custom preset (ie doesn’t have (Custom) to the right of it) was broken before preventing custom values from working when it was toggled to in the menu. To fix it now toggle the given preset from custom to something else and then back to custom.

Have you been able to find good settings? I'm thinking maybe increasing saturation to maybe 1.5 may help.

Thanks for continued support, will give this a shot!

I tinkered with the settings but couldn't land on anything proper - it was either too overblown out for some reason, and another setting turned it black and white, even though I only minimally changed brightness or gamma. It's weird.

Btw, some of the settings don't land on "0.0" but some weird value, as shown here:

Screenshot 2024-08-27 at 9 26 15 AM

As for HDR, I did try it once but it didn't seem to do anything. I have an M2 MBA so not sure if it supports HDR or if there is setting in MacOS to enable. Because even when I watch YT videos, it doesn't...do anything, brightness doesn't increase or colors change.

streetpea commented 2 weeks ago

@mufaaf Seems like a bug with the slider since the increment is 0.1 … that value is essentially 0.0 though so should have the same effect though I can look at rounding or something to prevent that displaying.

as for hdr it should look noticeablely different and according to this it looks like the for the MacBook Air m2 supports hdr https://support.apple.com/en-sg/102205 but the internal screen is just sdr. The pro has a xdr screen (works with hdr).

As for the values, most of them need to be changed just a little bit even though they have a large range of possible values. The increments (the amount it moves when you press the right arrow key) are a good indicator of how much the number should really be changed. If you really think the issue is the colors are washed out I think adjusting saturation to maybe 1.5 (you can try different increments if you want) and leaving everything at default is probably the best bet as increasing saturation should increase the vibrancy

mufaaf commented 2 weeks ago

@mufaaf Seems like a bug with the slider since the increment is 0.1 … that value is essentially 0.0 though so should have the same effect though I can look at rounding or something to prevent that displaying.

as for hdr it should look noticeablely different and according to this it looks like the for the MacBook Air m2 supports hdr https://support.apple.com/en-sg/102205 but the internal screen is just sdr. The pro has a xdr screen (works with hdr).

As for the values, most of them need to be changed just a little bit even though they have a large range of possible values. The increments (the amount it moves when you press the right arrow key) are a good indicator of how much the number should really be changed. If you really think the issue is the colors are washed out I think adjusting saturation to maybe 1.5 (you can try different increments if you want) and leaving everything at default is probably the best bet as increasing saturation should increase the vibrancy

Saturation to 1.5 really helped and makes games a poppier and much better! I also turned Gamma to 0.8 but it does darken the game which I have to experiment with.

Btw, I noticed something with this particular build - either Custom or Default, it tanks the FPS to 24/30fps after a few mins or a few seconds, even if the setting is 60fps. I might have to go back to the old build because of this.

streetpea commented 2 weeks ago

@mufaaf that’s strange. I’d think if anything high quality would have the most issues. Does default display the same behavior on the release build for you? Also make sure decoder is set to auto or videotoolbox.

mufaaf commented 2 weeks ago

@mufaaf that’s strange. I’d think if anything high quality would have the most issues. Does default display the same behavior on the release build for you? Also make sure decoder is set to auto or videotoolbox.

Yup, same behaviour on Default as well. Decoder is set to Auto.

streetpea commented 2 weeks ago

@mufaaf i tested with an m1 MacBook Pro and it seems to stay at or very near 60 using the metal performance hud (enabled with defaults write -g MetalForceHudEnabled -bool YES) on both default and custom preset. In other words, I can’t reproduce and not sure what would be causing that as it uses less processing power than high quality.

Plese manually delete the custom preferences file to make sure nothing wonky was added with rm ~/Library/Preferences/com.chiaki.pl_render_params.conf. The defaults for the custom preferences are now the same as the high quality preset if you use this new build and delete your old preferences file https://github.com/streetpea/chiaki-ng/actions/runs/10588721721/artifacts/1862699141

mufaaf commented 2 weeks ago

@mufaaf i tested with an m1 MacBook Pro and it seems to stay at or very near 60 using the metal performance hud (enabled with defaults write -g MetalForceHudEnabled -bool YES) on both default and custom preset. In other words, I can’t reproduce and not sure what would be causing that as it uses less processing power than high quality.

Plese manually delete the custom preferences file to make sure nothing wonky was added with rm ~/Library/Preferences/com.chiaki.pl_render_params.conf. The defaults for the custom preferences are now the same as the high quality preset if you use this new build and delete your old preferences file https://github.com/streetpea/chiaki-ng/actions/runs/10588721721/artifacts/1862699141

This worked for the 30mins I just played at Default. Will try custom and see if the issue creeps up again soon. Thanks!

streetpea commented 5 days ago

@mufaaf any update on your progress?

streetpea commented 5 days ago

@mufaaf you can also try this build: https://github.com/streetpea/chiaki-ng/actions/runs/10757103493/artifacts/1905458917 and see if it does anything for you. It selects an 8bit color space for sdr instead of dithering from a higher bit-depth colorspace