{"action":"created","issue":{"url":"https://api.github.com/repos/martin-ueding/thinkpad-scripts/issues/129","repository_url":"https://api.github.com/repos/martin-ueding/thinkpad-scripts","labels_url":"https://api.github.com/repos/martin-ueding/thinkpad-scripts/issues/129/labels{/name}","comments_url":"https://api.github.com/repos/martin-ueding/thinkpad-scripts/issues/129/comments","events_url":"https://api.github.com/repos/martin-ueding/thinkpad-scripts/issues/129/events","html_url":"https://github.com/martin-ueding/thinkpad-scripts/issues/129","id":207706221,"number":129,"title":"ThinkPad X220(T) never docked with \"Series 3\" Docking Station","user":{"login":"dantempla","id":7542749,"avatar_url":"https://avatars.githubusercontent.com/u/7542749?v=3","gravatar_id":"","url":"https://api.github.com/users/dantempla","html_url":"https://github.com/dantempla","followers_url":"https://api.github.com/users/dantempla/followers","following_url":"https://api.github.com/users/dantempla/following{/other_user}","gists_url":"https://api.github.com/users/dantempla/gists{/gist_id}","starred_url":"https://api.github.com/users/dantempla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dantempla/subscriptions","organizations_url":"https://api.github.com/users/dantempla/orgs","repos_url":"https://api.github.com/users/dantempla/repos","events_url":"https://api.github.com/users/dantempla/events{/privacy}","received_events_url":"https://api.github.com/users/dantempla/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-02-15T04:34:15Z","updated_at":"2017-02-19T10:59:06Z","closed_at":null,"body":"This drove me nuts: It seems like newer docks don't really dock. Cat /sys/devices/platform/dock.*/docked always results in 0 whether docked or not. Which means that the thinkpad-dock-hook will never work. You check this here:\r\n**thinkpad-scripts/tps/dock.py**\r\n```\r\ndef is_docked():\r\n    '''\r\n    Determines whether the laptop is on a docking station.\r\n    This checks for ``/sys/devices/platform/dock.*/docked``.\r\n    :returns: True if laptop is docked\r\n    :rtype: bool\r\n    '''\r\n    dockfiles = glob.glob('/sys/devices/platform/dock.*/docked')\r\n    for dockfile in dockfiles:\r\n        with open(dockfile) as handle:\r\n            contents = handle.read()\r\n            dock_state = int(contents) == 1\r\n            if dock_state:\r\n                logger.info('Docking station found.')\r\n                return True\r\n    logger.info('No docking station found.')\r\nreturn False\r\n```\r\nI found some information on this over here [\"tlp-rdw doesn't recognize newer docks #56\"](https://github.com/linrunner/TLP/issues/56) and here are some notes about different event IDs [\"Thinkpad \"Series 3\" Docking Station on Linux\"](http://phihag.de/2012/thinkpad-docking.html) Maybe you have an idea to find a way around this."},"comment":{"url":"https://api.github.com/repos/martin-ueding/thinkpad-scripts/issues/comments/280911434","html_url":"https://github.com/martin-ueding/thinkpad-scripts/issues/129#issuecomment-280911434","issue_url":"https://api.github.com/repos/martin-ueding/thinkpad-scripts/issues/129","id":280911434,"user":{"login":"martin-ueding","id":976924,"avatar_url":"https://avatars.githubusercontent.com/u/976924?v=3","gravatar_id":"","url":"https://api.github.com/users/martin-ueding","html_url":"https://github.com/martin-ueding","followers_url":"https://api.github.com/users/martin-ueding/followers","following_url":"https://api.github.com/users/martin-ueding/following{/other_user}","gists_url":"https://api.github.com/users/martin-ueding/gists{/gist_id}","starred_url":"https://api.github.com/users/martin-ueding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martin-ueding/subscriptions","organizations_url":"https://api.github.com/users/martin-ueding/orgs","repos_url":"https://api.github.com/users/martin-ueding/repos","events_url":"https://api.github.com/users/martin-ueding/events{/privacy}","received_events_url":"https://api.github.com/users/martin-ueding/received_events","type":"User","site_admin":false},"created_at":"2017-02-19T10:59:06Z","updated_at":"2017-02-19T10:59:06Z","body":"This is now added in the branch `feature/alt-dock-criterion`. It seems to work on my machine. There is [new documentation for this feature](https://github.com/martin-ueding/thinkpad-scripts/blob/feature/alt-dock-criterion/doc/man/thinkpad-dock.1.rst).\r\n\r\nPlease try out the branch, and then I can merge it."}}
{"actor":{"display_login":"martin-ueding"}}