Jump to content

Archived

This topic is now archived and is closed to further replies.

orutra

Change default resolution after rebooot (720p to 480p)

Recommended Posts

I have the ATV586 conected tan old Lcd tv with a Hdmi to VGA adapter.

It works well when selecting display settings to 480p (done in other newer tv) and connecting the ATV to the old tv without unpluggin the power (the tv does not work with 720p ). The problem is that when the ATV reboots , the Android kitkat logotipo shows on tv, but no it does the boot animation, because resolution is changed to 720p (which I check just connecting to the newer tv)

It seems that on reboot the ATV changes to 720p no matter which resolution was selected previously (480p in my case )

Is there any way to force 480p on boot for always? Or any solution to this problem?

Thx

Share this post


Link to post
Share on other sites

After some testing, I've found the solution ;)

I write my testing results, maybe useful for other users:

First of all I installed a SSH server app (SSHDroid) in order to get connection to the ATV from a PC, even if no image is shown on TV screen.

My TV is an old 15" LCD with only AV and VGA (1024x768) inputs. I have a Mini HDMI2AV adapter and a Mini HDMI2VGA adapter. The first works Ok, but with a weird screen resolution, the VGA adapter does not work, showing "incompatible mode" on screen.

When connecting the ATV to the TV with the HDMI to AV adapter I wa able to select in MyGica settings different output modes. Then changing the HDMI wire from the AV adapter to the VGA adapter, I could get better resolutions, 480p, and the best 1024x768. The problem is that after rebooting (or power off/power on) the ATV, with the VGA adapter, the TV screens shows again "incompatible mode". The reason is that when rebooting, the output resolutions defaults to 720p.

The key file which deals with resolution mode when booting the ATV is /system/bin/set_display_mode.sh , which detects the screen resolution. In that script you can see the commands to enable a given resolution.

My first step was to edit that script in order to force 480p (so I always get image in my TV with the VGA adapter) , to edit the file you need to mount /sytem with r/w permisions, from a root shell:

$ /system/xbin/su

#mount -ro remount,rw /system

Then before the getAxix function call I force 480p:

[…]

### Fuerzo salida a 480p, para poder evitar el modo incompatible desde el principio con la TV

outputmode=480p

###

getAxis

[…]

Then, after installing the app Script Manager (SManager), which allows to run scripts at boot (in this case it has to be configured as boot, background and with superuser permissions), I configured it to launch the following script (jaus a copy of different lines from set_display_mode.sh). Maybe copying the lines just in the set_display_mode.sh is easier, and it avoids installation of Script Manager, but I haven't tested, because SManager works flawlessly.

The script lines are (I discovered that the first line is needed in order to get VGA resolutions, it is disablen on every boot):

#!/system/bin/sh

echo Enable > /sys/class/amhdmitx/amhdmitx0/vga_resolution_state

echo 1 > /sys/class/graphics/fb0/blank

echo 1 > /sys/class/graphics/fb1/blank

echo 0 > /sys/class/graphics/fb1/free_scale

echo 1024x768p60hz > /sys/class/display/mode

echo 1 > /sys/class/graphics/fb0/freescale_mode

echo 1 > /sys/class/graphics/fb1/freescale_mode

echo 0 0 1919 1079 > /sys/class/graphics/fb0/free_scale_axis

echo 0 0 1022 767 > /sys/class/video/axis

echo 0 0 1022 767 > /sys/class/graphics/fb0/window_axis

echo 0 > /sys/class/graphics/fb0/blank

Thanks....

Share this post


Link to post
Share on other sites

×
×
  • Create New...