[How-to] auto-switch to 1080p on slimport, using tasker
Both the nexus 4 and the nexus 7 (2013) support slimport, which is very useful for mirroring the device to a big screen. However, neither device uses the standard 16:9 (1080p) aspect ratio. As a result, you end up with some cropping on a 1080p TV. For the nexus 4 it is even worse, since it outputs 768p upscaled to the TV's resolution.
However, the flexibility of android allows us to manually change the native resolution. In a console, we can type the command:
wm size 1080x1920
and the resolution will change. In the device screen the new resolution will look odd, however you now have true 1080p on the TV. To get back to the default resolution you type:
wm size reset
This solution works, but it is not very convenient. So I made two profiles for tasker, that automatically change the device resolution upon the connection of an HDMI cable and reset it when the cable is disconnected, thus automating the whole process.
I 'm attaching a screenshot of the two profiles, as well as a zip file so you can extract and import them in tasker.
- you need root
- the HDMI plugged profile
reduces the device brightness to minimize battery consumption
sets resolution to 1080p
sets display timeout to 10 hours
activates display rotation
- the HDMI un-plugged profile
sets auto brightness back on
resets screen resolution
sets display timeout to 1min
These are optional settings that I found useful to automate, but they are all optional, and you can tweak them once you imported the profile to tasker.
I hope you find this useful!!!
Phone: Nexus 4 (E960)
ROM: android 4.4.4
Recovery: TWRP 22.214.171.124
Launcher: Nova launcher Prime
Other devices: Nexus 7 LTE (2013)
Previous devices: Nexus S (i9023)