{"action":"created","issue":{"url":"https://api.github.com/repos/raphael/linux-samus/issues/113","repository_url":"https://api.github.com/repos/raphael/linux-samus","labels_url":"https://api.github.com/repos/raphael/linux-samus/issues/113/labels{/name}","comments_url":"https://api.github.com/repos/raphael/linux-samus/issues/113/comments","events_url":"https://api.github.com/repos/raphael/linux-samus/issues/113/events","html_url":"https://github.com/raphael/linux-samus/issues/113","id":134769525,"number":113,"title":"ACPID Overhaul","user":{"login":"ehegnes","id":884970,"avatar_url":"https://avatars.githubusercontent.com/u/884970?v=3","gravatar_id":"","url":"https://api.github.com/users/ehegnes","html_url":"https://github.com/ehegnes","followers_url":"https://api.github.com/users/ehegnes/followers","following_url":"https://api.github.com/users/ehegnes/following{/other_user}","gists_url":"https://api.github.com/users/ehegnes/gists{/gist_id}","starred_url":"https://api.github.com/users/ehegnes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ehegnes/subscriptions","organizations_url":"https://api.github.com/users/ehegnes/orgs","repos_url":"https://api.github.com/users/ehegnes/repos","events_url":"https://api.github.com/users/ehegnes/events{/privacy}","received_events_url":"https://api.github.com/users/ehegnes/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2016-02-19T04:34:04Z","updated_at":"2016-02-19T22:43:43Z","closed_at":null,"body":"I have a few issues with the way `acpid` configuration is currently being handled:\r\n\r\n- The [`sed` commands in `sound.sh`](https://github.com/raphael/linux-samus/blob/master/scripts/setup/sound/sound.sh#L58-L107) subjectively modify a pretty important file ‒ this file may not be the same on all systems.\r\n  - The `sed` commands run nearly indefinitely with my current default `acpid` script, replacing `/etc/acpi/handler.sh` with garbage until my filesystem is entirely full.\r\n- The catch-all script (`handler.sh` for most) is subjectively named by each distribution. Some systems use `default.sh` as the name of their default `acpid` script. This is not currently taken into account and will make the sound script fail on non-conforming systems.\r\n- `acpid` offers an elegant solution to isolate actions for specific events which we are not using.\r\n\r\nWe should use this isolation to overhaul the current `sound.sh` script to be more compatible by including proper files in `/etc/acpi/actions/` and `/etc/acpi/events/`. This would avoid messing with users' current configurations, and it would trivialize updates.\r\n\r\nI'd be glad to overhaul the script, but I need somebody to post what a proper `/etc/acpi/handler.sh` script should look like."},"comment":{"url":"https://api.github.com/repos/raphael/linux-samus/issues/comments/186438383","html_url":"https://github.com/raphael/linux-samus/issues/113#issuecomment-186438383","issue_url":"https://api.github.com/repos/raphael/linux-samus/issues/113","id":186438383,"user":{"login":"ehegnes","id":884970,"avatar_url":"https://avatars.githubusercontent.com/u/884970?v=3","gravatar_id":"","url":"https://api.github.com/users/ehegnes","html_url":"https://github.com/ehegnes","followers_url":"https://api.github.com/users/ehegnes/followers","following_url":"https://api.github.com/users/ehegnes/following{/other_user}","gists_url":"https://api.github.com/users/ehegnes/gists{/gist_id}","starred_url":"https://api.github.com/users/ehegnes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ehegnes/subscriptions","organizations_url":"https://api.github.com/users/ehegnes/orgs","repos_url":"https://api.github.com/users/ehegnes/repos","events_url":"https://api.github.com/users/ehegnes/events{/privacy}","received_events_url":"https://api.github.com/users/ehegnes/received_events","type":"User","site_admin":false},"created_at":"2016-02-19T22:43:43Z","updated_at":"2016-02-19T22:43:43Z","body":"I still run the `sound.sh` file, since it doesn't modify my default handler. I just [run a script from `/usr/local/bin` on `button/lid LID close` by adding the specification to `/etc/acpi/default.sh`](https://gist.github.com/ehegnes/88f0d91cd0390c2469b9#file-acpid-default-sh-L31). Most people would use `pm-suspend` or `echo -n mem > /sys/power/state` to suspend. Honestly, it doesn't matter much, because I'd be changing the default anyway. And it matters less because there usually isn't a default set for suspending on lid close.\r\n\r\nAnyway. If your overhaul is going to move or change any of the files I've added, let me know. You can feel free to just merge my changes with your overhaul before you PR. Less work for me, and lesser chance of merge conflicts. :P But if you're not going to change anything about my overhaul, I'm going to go ahead and PR it myself."}}