How do we get 1080p resolution in Ubuntu on the pcDuino8 Uno? its only giving me 720p as an option now.
How do we get 1080p in Ubuntu?
Posted 10 January 2016 - 09:22 AM
Short answer is I don't know. I think it has to do with the following file:
hdmi output mode(5) fps:60.6 1280x 720
err: 0 skip: 0
BUF enable ch lyr z prem[N] a[globl 255] fmt[ 0] fb[1280, 720;1280, 720;1280, 720] crop[ 0, 0,1280, 720] frame[ 13, 7,1254, 705] addr[43100000, 0, 0] flags[0x 0] trd[0,0]
acquire: 0, 25.5 fps
release: 0, 25.5 fps
display: 0, 25.5 fps
************End of file*****
There is a link image for arches (was pcDunio8) that describes the different screen modes and gives instructions to change it for that model. The UNO is different but my guess is that screen mode 6 to 10 is the one you want if there is anything in common with the other build. However if you change that in the above file it will probably screw up what ever that buffer string is doing. That will need the new resolution 1920 x 1080. I expect they played around with it already and had trouble with it because 25.5 is a bit slow for frames per second. Adding resolution might require and even slower frame rate. Then again I'm just guessing. If I knew what I was doing I'd play around with it myself and get back to you. Kind of interested in finding out the details to the same question.
Posted 10 January 2016 - 10:09 AM
normally in this environment, one would change resolution with the xrandr at a command line or from a menu selection to change temporarily.
one could make it permanent after reboot here
sudo leafpad /etc/xdg/lxsession/LXDE/autostart
with something on the last line added like
@xrandr --auto --output DVI-1 --primary --mode 1680x1050 --left-of DVI-0
but that doesn't work on these 14.04 prebuilt images.
there is a script to change on the uno3 but that's not this.
board-config.sh is the filename & /usr/bin/ is where it's located. check it out, there's other settings that you can change.
one could edit the sys_config.fex, convert it to it's binary format & replace it
this is the section to change resolution
;screenx_output_mode (used for hdmi output, 0:480i 1:576i 2:480p 3:576p 4:720p50)
; (5:720p60 6:1080i50 7:1080i60 8:1080p24 9:1080p50 10:1080p60)
screen0_output_mode = 10 for 1080p60.
not a simple 'click here & save' solution right now.
-edit. i see Drake has pointed out where it's at. i didn't look past what was in the sys_config.fex - maybe it's easier to change?
just took a look at the ubuntu 12.04 image, same sys file says hdmi output mode(10) fps:60.6 1920x1080 but it's running at 720 just as the 14.04 images.
Posted 10 January 2016 - 11:53 AM
I are trying to change the sys_config.fex to 1080p display, but it doesn't work. Seemly it is not easy to get 1080P resolution.
i've used these.
did you mean that it just does not want to use 1080p?
- Drake411 likes this
Posted 11 January 2016 - 02:42 AM
I was watching the pcDuino8 Uno boot and it seems to me that it is booting in 1080p. The text is very clear on my HDMI monitor compared to the fuzzy LXDE desktop.
a solution could be convert your magic.bin to .fex - above links work for this. it will show in that section i pasted above what it is. mine was 720p 50hz pal.
if you are in US i'd change it to 60hz & ntsc but newer monitors shouldn't have a problem on display.
speaking of display, i'm assuming nobody has attempted to put a lcd type screen on there. that's something else you need to change. it's screen1_output_mode option & if i remember correctly, it was same 720p50 but sreen0 was default. just adding that as an observation.
this is done manually something like this...
ideal solution would be to have a user-friendly clicky GUI that would change it, test changes, reboot if necessary.
another solution would be to use a magic.bin with hard coded settings you want to change it to. this is what others use in this type of environment to make this change currently. you select which one you want with what resolution when you are installing linux on the device.
- Drake411 likes this
Posted 12 January 2016 - 12:46 AM
im fine with manual as long as it works reliably.
i agree completely. looking forward to seeing some progress with this uno8... perhaps some threads of 'this doesn't work out of the box & why it doesn't, what is the possibility of it being fixed & by whom, is it possible & just not implemented here, and of course, what are the development goals regarding the OS and their timeline?
get it sorted out why the base image needs so much work, what are the possibility for each to be fixed. you're not going to find mainline kernel support yet or full video support until either Allwinner decides to change their policy or someone takes it upon themselves or more likely a code dump.
i'd like to get a copy of the development environment linksprite is making the images in the first place. if there will be none provided or it's coming in six months it should be stated as such. the uno8 has a lot of potential from what i've seen, but not with the software provided. we are apparently early adopters of this board.
i think the most likely solution for us is to either find someone to modify the build environment of one of the SDK i posted links to in other thread or wait or figure out how to modify it ourselves.
i don't mind learning how, it's very well documented already elsewhere & google doesn't complain about translating & i've learned from it so i believe it's the same other than scripts that you either have to recreate or just type stuff out & of course hardware specific changes. this link has their specific hardware that's used in the uno8.
please try the edit in the mean time & post your results on editing the script.bin from one of the posted images & i'll do the same & see if we both come up with the same thing, it seems not many are working on this other than just the plugging in of *duino type modules. i'll suggest not to try on the posted 12.04 image unless you want to fail before trying. another suggestion, i did the same thing with a bin file from similar booting board that's working & compared side by side. much easier for me anyways, most of this is totally new to me btw.
Posted 12 January 2016 - 12:01 PM
ok. there seems to be an issue on the script.bin on at least the ones i tested. i checked these two images of 14.04 & the 12.04 posted https://s3.amazonaws...cv2.4.11.img.7z
for whatever reason, the bin will not convert to fex. the 12.04 is too small to be legit & i get a malformed data error trying to convert on the other two listed.
when this is corrected or confirmed, i'll change the above to reflect it.
this is the method that i use to change stuff from the start. this is done on the uno8 booted with the 2nd image listed above. this assumes you have internet access to apt-get & get some files.
at some point, familiarize yourself with what options are. not all options work on all boards so don't just go changing stuff. there are tests you can run on the uno8 to help you with some you parameters, others are researched.
this is just in the context of manually changing a video resolution setting.
note: this covering only to do with the resolution, but getting your fex to edit is done for other reasons as well.
http://linux-sunxi.org/Fex_Guidespecifically section [disp_init]
A FEX file defines various aspects of how the SoC works. It configures the GPIO pins and sets up DRAM, Display, etc parameters.
first is a prerequisite: libusb-1.0
sudo apt-get install libusb-1.0-0-dev
then we git some tools, make them for our use.
mkdir sunxi cd sunxi git clone git://github.com/linux-sunxi/sunxi-tools.git cd sunxi-tools make
next, mount 2nd partition to a directory we create & copy script.bin from the sd card partition into the folder with the above tools.
sudo mkdir /mnt/mmcpart2 sudo mount /dev/mmcblk0p2 /mnt/mmcpart2 cp /mnt/mmcpart2/script.bin ./
this is being done on the uno8 in a ubuntu environment but just as a notice, don't edit fex or text files with windows notepad. besides not displaying line items correctly, it modifies them in a bad way. if you find yourself wanting to edit text in windows, use Notepad++ or something similar.
next we convert script.bin to a text-based script.fex for editing.
sudo chmod 777 script.bin ./bin2fex script.bin > ./script.fex sudo leafpad script.fex
this is the moment you were waiting for. depending on what resolution you wanted your selection could be different.
refer to the above address Fex Guide as comment section doesn't show everything & sometimes isn't there or not English.
screen0_output_mode = 10
don't forget to save if you make changes.
convert modified script.fex back to script.bin & put back onto partition unmount the partition. then reboot for changes to take affect.
./fex2bin script.fex > ./script.bin sudo cp ./script.bin /mnt/mmcpart2/ sudo umount /mnt/mmcpart2 sudo reboot
for whatever reason my script.bin is saying it's corrupt & it's not working
that is how i do it from the sd card you booted up on in this environment.
you also can mount the same image you would flash the sd card with & pull the script.bin that way or pull it from android but i think you would need SU & the android image does not default with it.
i'll try it again from the beginning & from an image file & post results.
if Youkee or somebody with an Uno8 would try this as well & confirm if there is an issue & fix if necessary.
you don't have to actually make changes to your fex file if you just want to see it's contents. i've translated the chinese from inside mine to english and added comments. if you add comments, the line has to start with a semicolon & treat all options as being case sensitive. if it's lower-case, leave it that way.
Posted 13 January 2016 - 04:10 AM
here's the problem & a solution. well, sorta...
the script.bin file seems to has been corrupted at some point.
this image has working 1080p but it's got other issues so maybe convert the script.bin from this to the newer image as a temporary fix.
try to extract your bin file & convert it to fex without errors, & take a look at it, it's something in this environment you should be able to do.
although that image has 1080p, there are errors in the script.bin file as i saw on the others stated above.
i'll post a separate thread on it since it's a problem across the hardware & not just this video issue.
i will go thru the methods i've used to make one & see if any are realistic to give instructions on,
it would be easy if someone at linksprite could post a clean copy of the fex file with a notice of don't use it unless you read & understand the directions on it.
- Drake411 likes this
Posted 18 January 2016 - 07:31 PM
I tried the Fex file conversion thing without any success at all. The mount command was kind of freaky I think it made a hall of mirrors effect in the file system.
So far there is only one choice. Navigate to the menu and choose the one option.
I didn't change the sys file because I haven't found an alternate bit of code to put in there. I was more interested in that script.bin and learning how to make my own from scratch but no one has this listed as a target board. That makes it a big job for people who really know what they are doing called disassembly. It is possible for a company that makes a board like this to include the stuff that goes into the script.bin file as a text file next to it. That is not going to happen. So at this point you just have to trust that the resolution provided is the best possible resolution.
Posted 18 January 2016 - 09:59 PM
Me too. MACscr. Makes me mad. Seems like the board should be able to do it. The fact that the GUI takes you to places that are grayed out is particularly irksome. On one hand we are locked out of something we bought, and locked into helping in develop it. On the other hand it is still a big opportunity to learn something undeniably useful that few people know. That is how to compile onto a totally new platform like what they do at the yocto project or sunxi project. However they do advertise that engineers would answer your questions.
Stephan, I noticed somewhere in the process that the tools were using the sun4i thingy-ma-bob instead of the sun8i. So I think that is why it isn't converting. Not necessarily "malformed" as it says. I have to help my son with a school project so I'm putting this aside for a bit. If there was a place to =sun8i that is what I would try. Otherwise I wish I could copy and paste into that sys file something more appropriate just to see what would happen.
Edit so I have been looking for clues. I went to the sources index pages and downloaded the config files and unpacked the config file and had a read. Board config.sh file uses whiptail to reduce the size of the screen posted in /etc/screen.conf then it writes something to /usr/bin/setwindow
I could only look at the script.bin with a hex editor and could not convert it. Did wonder about the possibility of this build using a device tree configuration which is a whole other ball of wax. Maybe could invoke whiptale or edit the /etc/screen.conf. Looked all over the net and only get more confused.
- eriamjh and smily03 like this
Posted 20 January 2016 - 06:46 PM
I helped myself and bootet Linksprite's image on my Banana Pi M3 (it's necessary to exchange boot0 since there the SoC ID is checked and when wrong boot0 stops -- for details please see http://forum.linkspr...rky/#entry12084)
Also please have a look at lines 133 and 153 in the boot log: http://pastebin.com/GSsdyuAw
Since Banana Pi M3's hardware is different I created another script.bin from a fex file and put it on the 2nd partition of the SD card. Then stopped u-boot autoboot and tried to load it manually. Unfortunately then the boot gets stuck: http://pastebin.com/9nqnzvyE
The uEnv.txt contents seem not to fit u-boot code and it also seems script.bin is never read. Unfortunately the script_extractor binary I tried to use segfaults so I've no clue how to read out sys_config.fex stuff really being used.
Since the Linksprite guys refrain from publishing sources I'll refrain from buying Linksprite products starting from now on.
Regarding 1080p I would have a look at the fbset package and put the necessary fbset call in /etc/rc.local
- eriamjh and Drake411 like this
Posted 21 January 2016 - 08:57 AM
tKaiser thanks for looking at it. Would a device tree type build affect the output?
I was having trouble with getting the script bin file to convert. Skills could be I don't know how to run a c program. Though bin2fex seemed to run. Said "malformed" file. I
open config.fex, maybe it is not exist
attched ok, mgr0<-->device1, type=4, mode=4----
ready to set mode
[ 1.146]finally, output_type=0x4, output_mode=0x4, screen_id=0x0, disp_para=0x404
fail to find part named env
Using default environment
'cat /proc/cmdline' yeilds: console=ttyS0, 115200 console=tty1 root=/dev/mmcblk0p3 init=/init
I tried the script-extractor tool to look at sys_config.fex. Not sure whats going on with that. I compiled it and got a a.out executable which I ran but could not find the output. Sorry I'm pretty new at this.
Posted 22 January 2016 - 08:33 AM
Why do you fiddle around with script.bin if it won't be read anyway?
It seems the u-boot code they use is incomplete or at least fails to read script.bin on the 2nd partition (simply try it out, rename or remove script.bin and see what happens). The script-extractor tool is meant to read out DRAM contents to get the real values of sys_config.fex used (to be able to generate a fex file and/or adjust the settings).
Unless Linksprite stops violating the GPL and provides the BSP sources it's useless to investigate further.
- Mim likes this
Posted 27 January 2016 - 07:56 PM
I found a discussion about cubieboard on a google chat Q&A:
Still need to try that booting without the script.bin file even present. In a similar vein I found this link:
It is about uImage not being read on /boot. They say that an uImage file is used but not the one in the /boot folder. So mounting the boot partition as Stephan describes in his other post on converting to FEX , can be done while the board is running to edit the "real" uImage file. Anyway it is still an open question as to how you get it to read the conveniently editable uImage file. I would like to play around with the stuff they talk about in the above link.
I had to use my extra screen for other things and haven't had a chance to settle down to burn and test SD images. To try reading FEX with the older images. (My script.fex was empty) Also the compilation of device tree vs compilation of an image is still a big learning curve for me. Linaro, Yocto, Sunxi sites all have instructions and they are mostly for other boards.
Instructions for FEX http://linux-sunxi.o..._from_registers
Instructions for DTS device tree http://linux-sunxi.org/Device_Tree
Reply to this topic
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users