{"action":"created","issue":{"url":"https://api.github.com/repos/erpalma/lenovo-throttling-fix/issues/66","repository_url":"https://api.github.com/repos/erpalma/lenovo-throttling-fix","labels_url":"https://api.github.com/repos/erpalma/lenovo-throttling-fix/issues/66/labels{/name}","comments_url":"https://api.github.com/repos/erpalma/lenovo-throttling-fix/issues/66/comments","events_url":"https://api.github.com/repos/erpalma/lenovo-throttling-fix/issues/66/events","html_url":"https://github.com/erpalma/lenovo-throttling-fix/issues/66","id":378214756,"node_id":"MDU6SXNzdWUzNzgyMTQ3NTY=","number":66,"title":"Error in check_kernel","user":{"login":"sanderboom","id":5956570,"node_id":"MDQ6VXNlcjU5NTY1NzA=","avatar_url":"https://avatars0.githubusercontent.com/u/5956570?v=4","gravatar_id":"","url":"https://api.github.com/users/sanderboom","html_url":"https://github.com/sanderboom","followers_url":"https://api.github.com/users/sanderboom/followers","following_url":"https://api.github.com/users/sanderboom/following{/other_user}","gists_url":"https://api.github.com/users/sanderboom/gists{/gist_id}","starred_url":"https://api.github.com/users/sanderboom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanderboom/subscriptions","organizations_url":"https://api.github.com/users/sanderboom/orgs","repos_url":"https://api.github.com/users/sanderboom/repos","events_url":"https://api.github.com/users/sanderboom/events{/privacy}","received_events_url":"https://api.github.com/users/sanderboom/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2018-11-07T09:53:27Z","updated_at":"2018-11-07T22:10:03Z","closed_at":null,"author_association":"NONE","body":"Hello!\r\n\r\nEager to test the [throttling monitoring](https://github.com/erpalma/lenovo-throttling-fix/commit/9636a5de8327fc2d6874b97da93e6169d9d78588) (awesome!) I reinstalled the tool completely (default config). \r\n\r\nUpon starting the script I run into the following error message: \r\n\r\n```shell\r\nsander@t480s ~\r\nλ sudo /usr/lib/lenovo-throttling-fix/lenovo_fix.py\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/lenovo-throttling-fix/lenovo_fix.py\", line 478, in check_kernel\r\n    with open(os.path.join('/boot', 'config-{:s}'.format(uname()[2]))) as f:\r\nFileNotFoundError: [Errno 2] No such file or directory: '/boot/config-4.19.0-4-MANJARO'\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/lenovo-throttling-fix/lenovo_fix.py\", line 591, in <module>\r\n    main()\r\n  File \"/usr/lib/lenovo-throttling-fix/lenovo_fix.py\", line 510, in main\r\n    check_kernel()\r\n  File \"/usr/lib/lenovo-throttling-fix/lenovo_fix.py\", line 483, in check_kernel\r\n    kernel_config = f.read()\r\n  File \"/usr/lib/python3.7/codecs.py\", line 322, in decode\r\n    (result, consumed) = self._buffer_decode(data, self.errors, final)\r\nUnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte\r\n```\r\n\r\nI'm not a Python dev, but are you sure you can do this:\r\n\r\n```python\r\n            with open(os.path.join('/proc', 'config.gz')) as f:\r\n                kernel_config = f.read()\r\n```\r\n\r\non a binary file?\r\n```shell\r\nλ file /proc/config.gz\r\n/proc/config.gz: gzip compressed data, max compression, from Unix, original size 221842\r\n```\r\nOn a side note I was fooled for a moment by `vim` just opening `/proc/config.gz` in extracted/text format.\r\n\r\nThe `CONFIG_X86_MSR=` & `CONFIG_DEVMEM=y` are present.\r\n\r\nThanks for looking into this!"},"comment":{"url":"https://api.github.com/repos/erpalma/lenovo-throttling-fix/issues/comments/436796192","html_url":"https://github.com/erpalma/lenovo-throttling-fix/issues/66#issuecomment-436796192","issue_url":"https://api.github.com/repos/erpalma/lenovo-throttling-fix/issues/66","id":436796192,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNjc5NjE5Mg==","user":{"login":"erpalma","id":11210369,"node_id":"MDQ6VXNlcjExMjEwMzY5","avatar_url":"https://avatars0.githubusercontent.com/u/11210369?v=4","gravatar_id":"","url":"https://api.github.com/users/erpalma","html_url":"https://github.com/erpalma","followers_url":"https://api.github.com/users/erpalma/followers","following_url":"https://api.github.com/users/erpalma/following{/other_user}","gists_url":"https://api.github.com/users/erpalma/gists{/gist_id}","starred_url":"https://api.github.com/users/erpalma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erpalma/subscriptions","organizations_url":"https://api.github.com/users/erpalma/orgs","repos_url":"https://api.github.com/users/erpalma/repos","events_url":"https://api.github.com/users/erpalma/events{/privacy}","received_events_url":"https://api.github.com/users/erpalma/received_events","type":"User","site_admin":false},"created_at":"2018-11-07T22:10:03Z","updated_at":"2018-11-07T22:10:03Z","author_association":"OWNER","body":"Ahahah thanks a lot, very appreciated! :D\r\n\r\nI'll add some more monitoring stuff and polish the output as soon as I can, stay tuned ;) "}}
{"actor":{"display_login":"erpalma"}}