YogaSMC icon indicating copy to clipboard operation
YogaSMC copied to clipboard

Pane: Indicator "LED Automation" resets to "on" on reboot

Open benbender opened this issue 4 years ago • 10 comments

I'm playing with ACPI-S0 on my X1C6. Therefor I want to disable the LED Automation for "Indicator". It works but gets reset to "enabled" on reboot.

benbender avatar Nov 17 '20 21:11 benbender

The NC app should save current led settings when exiting and re-apply then at start-up. Maybe you can check the value in ioreg since the prefpane will not be updated until system preferences is reopened.

zhen-zen avatar Nov 18 '20 01:11 zhen-zen

Hmm, so it's expected to not apply until the prefpane is opened? That would kill it for my (test-)usecase as it will put the leds in the wrong state on sleep until the prefpane is opened after a restart - which seems unrealistic/uncomfortable. Any chance that could change?

benbender avatar Nov 18 '20 09:11 benbender

No. That option should be turned off once. And after quitting the NC that time, the app will save the config without this option and re-apply the new value on next startup.

zhen-zen avatar Nov 18 '20 22:11 zhen-zen

Hmm, it doesn't seem to save anything related in defaults read org.zhen.YogaSMC. Am I missing smth?

benbender avatar Nov 19 '20 03:11 benbender

It should be saved along with other events here https://github.com/zhen-zen/YogaSMC/blob/master/YogaSMCNC/AppDelegate.swift#L331

Just checked mine using defaults read org.zhen.YogaSMC AutoBacklight and new value is saved after quitting the app.

zhen-zen avatar Nov 19 '20 03:11 zhen-zen

Are there any updates?

zhen-zen avatar Dec 08 '20 07:12 zhen-zen

I was trying to manually edit org.zhen.YogaSMC.plist. I want to change the "Custom Hot Key". However, the file is overwritten every time I start the NC. It won't be changed at all.

buyddy avatar Dec 15 '20 22:12 buyddy

You will need to stop it first before making any changes. The app will save current events when exiting thus overwriting yours.

zhen-zen avatar Dec 16 '20 00:12 zhen-zen

Does the app register with the kext? I felt I have met ghost. I actually change the code to replace prefpaneAS to open another app and recompile, but my re-compiled version still open the Yoga prefpane. Only a reboot made the change.

buyddy avatar Dec 16 '20 01:12 buyddy

No, kext will only send the event and it's the app that decide what to do next in userspace. I suppose you will need to clean current events if hardcoded new ones.

zhen-zen avatar Dec 16 '20 03:12 zhen-zen