{"id":186,"date":"2010-10-30T20:29:52","date_gmt":"2010-10-30T18:29:52","guid":{"rendered":"http:\/\/www.ceh-photo.de\/blog\/?p=186"},"modified":"2011-02-15T09:36:01","modified_gmt":"2011-02-15T07:36:01","slug":"enable-the-gyro-sensor-for-auto-display-rotation-on-acer-1825","status":"publish","type":"post","link":"https:\/\/www.ceh-photo.de\/blog\/?p=186","title":{"rendered":"Enable the gyro-sensor for auto display rotation on Acer 1825"},"content":{"rendered":"<p>In this post I will describe how you could enable the gyro-sensor for automatic display rotation under Ubuntu 10.10 (Should also work under all debian based os)<\/p>\n<p>This post and delivered scripts are based on the work of arobase40 from http:\/\/ubuntuforums.org\/<\/p>\n<p><a href=\"http:\/\/ubuntuforums.org\/showthread.php?t=1486671&amp;page=5\">http:\/\/ubuntuforums.org\/showthread.php?t=1486671&amp;page=5<\/a><\/p>\n<p>and\u00a0<span style=\"font-family: Verdana, Arial, Tahoma; line-height: normal; font-size: 12px;\">Imarune from the french ubuntu forum.<\/span><\/p>\n<p>Thanks for your nice job!<\/p>\n<p>first step<\/p>\n<div class=\"codecolorer-container bash default\" style=\"overflow:auto;white-space:nowrap;width:70%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/>7<br \/><\/div><\/td><td><div class=\"bash codecolorer\"><span class=\"co0\">#become root<\/span><br \/>\n<br \/>\n<span class=\"kw2\">sudo<\/span> <span class=\"kw2\">su<\/span> -<br \/>\n<br \/>\n<span class=\"co0\">#add new startup modules<\/span><br \/>\n<br \/>\n<span class=\"kw3\">echo<\/span> <span class=\"re5\">-e<\/span> <span class=\"st0\">&quot;i2c-i801<span class=\"es1\">\\n<\/span>i2c-dev<span class=\"es1\">\\n<\/span>lis3lv02d_i2c&quot;<\/span> <span class=\"sy0\">&gt;&gt;<\/span> <span class=\"sy0\">\/<\/span>etc<span class=\"sy0\">\/<\/span>modules<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>Info:<\/p>\n<p>arobase40 describes in the mentioned forum post two more ways to access the gyro-sensor. I choose this way because, you do not need to compile the kernel or anything else, also the suspend modes works fine.<\/p>\n<p>[dm]3[\/dm]<\/p>\n<p>Download this file and extract it.<\/p>\n<p>The application\u00a0i2c-gsensor\u00a0is based on <a href=\"http:\/\/pof.eslack.org\/blog\/2008\/06\/03\/i2c-gsensor-lis3lv02dl-accelerometer-on-htc-shift-g-sensor\/\">http:\/\/pof.eslack.org\/blog\/2008\/06\/03\/i2c-gsensor-lis3lv02dl-accelerometer-on-htc-shift-g-sensor\/<\/a><\/p>\n<p>Change with the \u00a0terminal into the extracted directory and run make!<\/p>\n<p>You got the application i2c-gsensor. Copy the application and the script to \/usr\/bin\/ and<\/p>\n<p>set script and application execution rights with:<\/p>\n<div class=\"codecolorer-container bash default\" style=\"overflow:auto;white-space:nowrap;width:70%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/><\/div><\/td><td><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> <span class=\"kw2\">cp<\/span>\u00a0gyro-auto-rotate.run\u00a0i2c-gsensor <span class=\"sy0\">\/<\/span>usr<span class=\"sy0\">\/<\/span>bin<span class=\"sy0\">\/<\/span><br \/>\n<br \/>\n<span class=\"kw2\">sudo<\/span> <span class=\"kw2\">chmod<\/span> +x <span class=\"sy0\">\/<\/span>usr<span class=\"sy0\">\/<\/span>bin<span class=\"sy0\">\/<\/span>i2c-gsensor<br \/>\n<br \/>\n<span class=\"kw2\">sudo<\/span> <span class=\"kw2\">chmod<\/span> +x <span class=\"sy0\">\/<\/span>usr<span class=\"sy0\">\/<\/span>bin<span class=\"sy0\">\/<\/span>gyro-auto-rotate.run<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>Now you could check if everything works:<\/p>\n<div class=\"codecolorer-container bash default\" style=\"overflow:auto;white-space:nowrap;width:70%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/>7<br \/><\/div><\/td><td><div class=\"bash codecolorer\">i2c-gsensor <span class=\"nu0\">0<\/span> <span class=\"br0\">&#91;<\/span>loop<span class=\"br0\">&#93;<\/span> <span class=\"co0\">#loop is optional if you want output in endless loop \/\/0 specifies the i2c-bus, should be correct<\/span><br \/>\n<br \/>\n<span class=\"co0\">#if this works fine, you should see some xyz coordinates corresponding to the current notebook position<\/span><br \/>\n<br \/>\n<span class=\"co0\">#now check the auto rotation script:<\/span><br \/>\n<br \/>\ngyro-auto-rotate.run<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>Turn around your notebook and the display should switch in the correct position (left and right correct for tablet mode).<\/p>\n<p>If everything works fine you could add the script to System-&gt;Start programs<\/p>\n<div id=\"_mcePaste\" style=\"position: absolute; left: -10000px; top: 387px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;\">i2c-gsensor<\/div>\n","protected":false},"excerpt":{"rendered":"<p>In this post I will describe how you could enable the gyro-sensor for automatic display rotation under Ubuntu 10.10 (Should also work under all debian based os) This post and delivered scripts are based on the work of arobase40 from http:\/\/ubuntuforums.org\/ http:\/\/ubuntuforums.org\/showthread.php?t=1486671&amp;page=5 and\u00a0Imarune from the french ubuntu forum. Thanks for your nice job! first step [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[46],"tags":[56,59,40,57],"class_list":["post-186","post","type-post","status-publish","format-standard","hentry","category-linux-it-2","tag-acer-1825","tag-gyro","tag-linux","tag-ubuntu"],"_links":{"self":[{"href":"https:\/\/www.ceh-photo.de\/blog\/index.php?rest_route=\/wp\/v2\/posts\/186","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ceh-photo.de\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ceh-photo.de\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ceh-photo.de\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ceh-photo.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=186"}],"version-history":[{"count":25,"href":"https:\/\/www.ceh-photo.de\/blog\/index.php?rest_route=\/wp\/v2\/posts\/186\/revisions"}],"predecessor-version":[{"id":303,"href":"https:\/\/www.ceh-photo.de\/blog\/index.php?rest_route=\/wp\/v2\/posts\/186\/revisions\/303"}],"wp:attachment":[{"href":"https:\/\/www.ceh-photo.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=186"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ceh-photo.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=186"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ceh-photo.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=186"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}