nuclearsandwich / surface3-archlinux

Archlinux on the Microsoft Surface Pro 3
70 stars 4 forks source link

Autorotate #13

Open nuclearsandwich opened 9 years ago

nuclearsandwich commented 9 years ago

Some peeps are working on scripts for autorotate. Let's talk about that biz.

AykoPoel commented 9 years ago

I uploaded my script to autorotate the screen: Autorotate I autostart "autorotate.py" with the system and execute changeautorotatestatus.py to enable or disable autorotation. Both use status.txt to talk to each other, which has to be in the same folder. I’m sorry for the quality of the code. I’m quite new to programming.

BTW I’m using Arch-Linux 3.18.1 Hope it helps someone.. :0)

paulhandy commented 9 years ago

@AykoPoel I tried that, but it didn't do anything. But I'm using the 3.17.2-2 kernel with sp3_type-cover patches applied. I haven't tried it yet with a newer kernel.

AykoPoel commented 9 years ago

Oh I'm sorry to hear that. But I used nearly the same script on 3.17 with patches too and it was working well, does it start or display anything? You should run it with the python2

python2 /path/to/autorotate.py

I updated the script today and tried to make it display what it does so when you start the new version from terminal something like this should come up: info you need python2, libnotify and python2-gobject for the notifications on gnome.

Mikeg321 commented 9 years ago

Hi, The script seems to work well on 3.19 RC4/ Ubuntu gnome 3.14. One question though. After I used the scripts for some reason the autorotate in Windows no longer works. I thought it was a weird coincidence at first and not related, however. A recent Windows firmware update corrected the autorotate issue in Windows (suspect it fixed a config issue). I used Linux for a week after and all was well. Now after using the script again the Windows autorotate is broken yet again and I can't get to work. Any ideas of what could be causing this. could it even be something the script is doing? I've enabled/disabled auto rotate lock in Windows with no change. The screen will rotate once at the login screen and then is stuck there until a reboot. It's like the autoroate lock is stuck on and can't be changed via Windows software. Also checked the Gyrosocope and output is fine so is a software/firmware thing I believe. Anyone else experiencing this?

nuclearsandwich commented 9 years ago

I had all kinds of issues with autorotate on Windows but I never dual booted. I always just nuke whatever's on there and go back to the other OS. Can't test Windows right now since I'm not running it.

paulhandy commented 9 years ago

It works now. more or less, that is.

AykoPoel commented 9 years ago

@Mikeg321 I'm so sorry to hear you issues under windows ... I don't have windows installed either at the moment so I can't test it. And I must admit that I don't have a idea what could cause this. But I don't think thats related to the script because the changes it makes a purely superficial and totally reversible after reboot. I hope that it's working some way for you son.

@paulhandy Great to hear this! But why less? What are your issues?

PS: I updated the script today had some issues with the touchscreen being disabled after boot and you had to use the pen ones to get it to work again. That should be fixed.

Mikeg321 commented 9 years ago

@AykoPoel Thanks, I took a look at your scripts and came to that same conclusion. Not too sure what caused my troubles but I now have a replacement from Microsoft so am reloading it all now... Thanks for sharing and updating your script. edit On my new surface3 using the script and rotating the screen has put it in the same funky state where windows can no longer read some of the sensors = no auto rotate. Can't say exactly what's doing this, but seems related to either reading the sensor values or rotating the screen orientation. Might try and report a bug to Microsoft if I can figure out how... Completely stumped.

colorprint commented 9 years ago

This script disables the external display connected...

nuclearsandwich commented 9 years ago

@colorprint you should probably open an issue on AykoPeol's repository https://github.com/AykoPoel/surface3-scripts/blob/master/autorotate

AykoPoel commented 9 years ago

Should work now :0) Autorotation should now automatically deactivate if an external monitor is connected.

AlanSurface commented 9 years ago

Does the stylus work properly with the script ? When I manually rotate (gnome: All setting/Display) the stylus (NTRG0001:01 1B96:1B05 Pen) does not work properly: it does not get the change in orientation and act weirdly. Anyone has got the same problem ?

AykoPoel commented 9 years ago

Pen should work as expected with this script.. :0)

AlanSurface commented 9 years ago

Thanks. Great work. It works like a charm under ubuntu 14.10 with kernel 3.19. :-) In order to minimize the CPU usage and because I do not often change screen orientation, I run autorotate has needed and kill the process when rotation is done. Strange : the keyboard work in normal and inverted mode but not in right/left mode. Do you know how to change the function of the face buttons on the pen in order to use them has right and middle mouse button ?