Clutter discussion (III): Compatibility discussion again -- use Clutter in moblin

Source: Internet
Author: User
Tags gtk

As we learn about Clutter, we have continuously encountered Clutter compatibility problems. The emergence of these compatibility problems, on the one hand, clutter just launched Version 1.0, is not very mature, and the other is caused by clutter's own mechanism. He used a lot of underlying things, then he needs to adapt to different display hardware, although clutter has always said that he is general. He is not created on other software or technology that has struggled for compatibility for many years. Therefore, it is understandable to have compatibility problems in the early stage. Even so, the outstanding dynamic presentation of clutter can be a problem we have forgotten for the moment.

Moblin provides a clutter-based UI. It's not KDE, It's not GNOME, but clutter. It's also an innovation in any case. He can find many excellent articles on the Internet, so he doesn't have to mention them any more. However, we are surprised to find that such a clutter whitewashed OS still has some problems during clutter development, which are not found in other general linux systems, GNOME versions including moblin do not exist, so we infer that it is related to system integration.

These problems can be avoided through some programming considerations. The following describes these problems and their solutions. It should be emphasized that all these phenomena only appear in the moblin version of CLutter, but not in other OS, but can also be used as some suggestions for compiling clutter on other OS.

Problem: Embed clutter widgets in GTK +

We have a very simple example of typing a clutter widget in GTK +, running it on moblin-Clutter, and reporting the error:

Do_wait: drmWaitVBlank returned-1, IRQs don't seem to be working correctly. Try adjusting the vblank_mode configuration parameter

According to the error message, I reset vblank_mode and tested all valid configuration values 0-3. Therefore, this error is not caused by the configuration of vblank_mode.

Sometimes it can run normally, sometimes the entire machine will crash, and the crash rate is very high, usually a few times it will become useless. At one time, the problem was quite difficult. On the moblin System Based on Clutter UI, GTK programs can be run normally, Clutter programs can be run normally, but Clutter cannot be embedded in GTK. Clutter has a stable running Example. I have made a careful comparison and made some revisions to the original small Example, as shown below:

Original example:

......

Clutter_actor_show (stage );

Gtk_widget_show (GTK_WIDGET (window ));

After revision:

......

Gtk_widget_show (GTK_WIDGET (window ));

Clutter_actor_show (stage );

We only changed the order of the two word orders. Replace the sequence of the displayed clutter stage and the actually displayed GTK window. In actual development of GTK or Clutter, actor is usually displayed first and stage is displayed. After the revision, the experiment results are as follows: still reported error: do_wait: drmWaitVBlank returned-1, IRQs don't seem to be working correctly. try adjusting the vblank_mode configuration parameter. but it does not seem to have crashed. I have repeated it for more than ten times and all reported errors. They all run normally.

We conducted a comparative test: no exception occurs even in moblin-GNOME, but only in moblin-clutter. These two statements do not have a sequential requirement. After the modification, the system reports an error when running the program. Although no program impact is found, it also shows some unstable or mismatched phenomena. At present, the versatility and Stability of clutter still need to be provided. Some of the problems are caused by clutter and some are caused by integration of clutter UI.

 

Appendix: vblank_mode Processing Method

Install the rpm package of driconf and configure the. dirconf file as follows:

<Driconf>

<Device screen = "0" driver = "i915">

<Application name = "Default">

<Option name = "force_s3tc_enable" value = "false"/>

<Option name = "no_rast" value = "false"/>

<Option name = "fthrottle_mode" value = "2"/>

<Option name = "always_flush_cache" value = "false"/>

<Option name = "always_flush_batch" value = "false"/>

<Option name = "bo_reuse" value = "1"/>

<Option name = "vblank_mode" value = "0"/>

<Option name = "allow_large_textures" value = "2"/>

</Application>

</Device>

</Driconf>

Set vblank_mode to 0, 1, 2, and 3 respectively.

You can also use the graphic configuration interface or add the VLANK_MODE = 3 parameter when executing the application.

 

Link: My Clutter blog

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.