LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 10-11-2016, 12:53 PM   #1
842Mono
Member
 
Registered: Oct 2016
Distribution: Ubuntu
Posts: 35

Rep: Reputation: Disabled
Talking Detecting the angle of HP x360 Laptops' screen


Hi

So I've been searching for a while about this. I want to do some scripting for HP x360 Laptops. These models have "hinge screens"; the screens can flip backwards till 360 degrees.

The first thing I need to do for my script is to detect the angle of the screen. How can I do that??

...I have one x360 laptop with a standard Ubuntu 16.04 64bit. I installed it beside a windows 10 that was already there. win10 has a tablet mode. That's what I'm trying to do.

Later on I want to make the touchpad and keyboard buttons inactive when the screen is flipped beyond some angle. And to make the screen rotate.

Last edited by 842Mono; 10-11-2016 at 12:54 PM.
 
Old 10-11-2016, 01:28 PM   #2
Timothy Miller
Moderator
 
Registered: Feb 2003
Location: Arizona, USA
Distribution: Debian, EndeavourOS, OpenSUSE, KDE Neon
Posts: 4,005
Blog Entries: 26

Rep: Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521
It should have accelerometer to detect that. I have a very similar Lenovo laptop that I know with Windows detected through accelerometer. However, I kinda hate the screen flipping, so unfortunately I've never attempted to get it working in linux. But if you can get the accelerometer working, reading that will allow you to set scripts to do what you want.
 
Old 10-11-2016, 01:30 PM   #3
842Mono
Member
 
Registered: Oct 2016
Distribution: Ubuntu
Posts: 35

Original Poster
Rep: Reputation: Disabled
But how come can the accelerometer detect the screen's angle? Doesn't it detect the orientation of the device?

edit: or is it multi-functioned maybe?

Last edited by 842Mono; 10-11-2016 at 01:31 PM.
 
Old 10-11-2016, 01:44 PM   #4
Timothy Miller
Moderator
 
Registered: Feb 2003
Location: Arizona, USA
Distribution: Debian, EndeavourOS, OpenSUSE, KDE Neon
Posts: 4,005
Blog Entries: 26

Rep: Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521
Probably wouldn't be able to detect angle, but everything else you wanted to do. No idea for detecting angle. My Lenovo does detect angle and once it passes x* it disables the keyboard (although stupidly doesn't disable the touchpad), never looked into HOW it does it though.

Last edited by Timothy Miller; 10-11-2016 at 01:46 PM.
 
Old 10-11-2016, 01:56 PM   #5
842Mono
Member
 
Registered: Oct 2016
Distribution: Ubuntu
Posts: 35

Original Poster
Rep: Reputation: Disabled
I see.

Does the Lenovo detect the angle on windows or on a Linux?
 
Old 10-11-2016, 01:59 PM   #6
Timothy Miller
Moderator
 
Registered: Feb 2003
Location: Arizona, USA
Distribution: Debian, EndeavourOS, OpenSUSE, KDE Neon
Posts: 4,005
Blog Entries: 26

Rep: Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521
DEFINITELY Windows. I've never used it in "tablet" mode with linux to test (despite it being on it's 3rd distribution). I only bought it because I got a killer deal (they were still selling over $600 new, got it for $310 booted 1 time ever and his son decided he couldn't use such a small screen) and I use it strictly as a laptop, I don't even use the touchscreen.
 
Old 10-11-2016, 02:02 PM   #7
842Mono
Member
 
Registered: Oct 2016
Distribution: Ubuntu
Posts: 35

Original Poster
Rep: Reputation: Disabled
hehehe I see I wish I could have got that deal LOL XD

but how come you don't like the touch screen? It's very handy with pdfs and on-screen writing! I'm a student so I have to read lots of pdfs. I can't find a piece of software that's good with "writing on pdfs" though.

I really want to get that tablet mode going so that I can use it as a book without the keyboard or the touchpad interfering.
 
Old 10-11-2016, 02:05 PM   #8
Timothy Miller
Moderator
 
Registered: Feb 2003
Location: Arizona, USA
Distribution: Debian, EndeavourOS, OpenSUSE, KDE Neon
Posts: 4,005
Blog Entries: 26

Rep: Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521
It leaves fingerprints. I HATE fingerprints.

I will test tonight when I get home if it disables the keyboard though in linux.
 
Old 10-11-2016, 02:09 PM   #9
842Mono
Member
 
Registered: Oct 2016
Distribution: Ubuntu
Posts: 35

Original Poster
Rep: Reputation: Disabled
awesome!! let me know! I'm not very optimistic though XD
 
Old 10-12-2016, 07:09 PM   #10
jamison20000e
Senior Member
 
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US( + travel,) Earth&Mars (I wish,) END BORDER$!◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that work on freest-HW; has been KDE, CLI, Novena-SBC but open.. http://goo.gl/NqgqJx &c ;-)
Posts: 4,888
Blog Entries: 2

Rep: Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567
Hi, have fun!

(I did not realize we had emojis here? ☔ LOL)
 
Old 10-12-2016, 07:56 PM   #11
Timothy Miller
Moderator
 
Registered: Feb 2003
Location: Arizona, USA
Distribution: Debian, EndeavourOS, OpenSUSE, KDE Neon
Posts: 4,005
Blog Entries: 26

Rep: Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521
Quote:
Originally Posted by 842Mono View Post
awesome!! let me know! I'm not very optimistic though XD

On my Lenovo Yoga 700 11, the keyboard is disabled after ~320* of rotation, so very nearly into full tablet mode. It's still active well past 180* (flat).

Last edited by Timothy Miller; 10-13-2016 at 04:13 PM.
 
Old 10-19-2016, 12:22 AM   #12
842Mono
Member
 
Registered: Oct 2016
Distribution: Ubuntu
Posts: 35

Original Poster
Rep: Reputation: Disabled
LOL awesome! so it does work wish I can find out how so that I can make my hp do it too.

jamison20000e thanks you. I also like to make emojis up X-)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing Slackware on HP Pavillion x360 abilolado Slackware - Installation 2 10-13-2015 11:52 AM
setting correct screen resolution - OpenSuse.org and HP Pavilion 13 x360 CharlieBucket Linux - Hardware 6 10-29-2014 02:09 AM
Screen brightness issue on laptops booting linux ninadb Linux - General 2 12-08-2011 05:27 PM
Boot up screen difference on PCs and Laptops u03pje Fedora 1 12-08-2009 10:46 PM
Mandrake 9.1 Screen resolution using Dell Laptops gvphanindra Linux - Laptop and Netbook 2 09-06-2003 05:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 11:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration