AuthorJean-Michel GARCIA

Gigabyte BRIX as an HTPC

Hello folks, this post is about the Gigabyte BRIX (model GB-XM12-3227 rev 1.0) barebone computer. I bought this mini PC in order to transform it into an HTPC computer. I’ve managed to install Ubuntu with XBMC on it, so I will detail here the steps in case it may help some people out there.


Here’s my hardware setup :

  • mSATA disk : Crucial SSD M4 CT128M4SSD3 128 GB
  • 8 gb memory : 2 X Kingston KVR1333D3S9/4G
  • In the box : Intel Core i3-3227U CPU @ 1.90 GHz, mini PCIE Wifi card (RTL8188CE), Power supply cable
  • External Drive : Seagate Expansion Desktop 3,5″ 3TB USB 3.0

Different OS tested

Once I was with my BRIX on hands, I tried to install different Ubuntu based OSes.

To make a bootable usb key, I suggest you to use the Unetbootin app (macOS, Linux and Windows compatible).
To do so, follow the official tutorial at :

XBMCBuntu 12.2

I’ve tested the ISO xbmcbuntu-12.2.Intel-NVIDIA and the install didn’t worked for me. The command line installation stoped at some point and my TV displayed : No Video Input.

Ubuntu 12.04

I’ve tested the official 64 bits version (xforcevesa and nomodeset grub options added), and the install stucks at

Ubuntu 13.04

Tested with the official 64 bits version (xforcevesa and nomodeset grub options added), and the install went as expected.

Gigabyte BRIX running Ubuntu 13.04

Gigabyte BRIX running Ubuntu 13.04

Devices drivers


The RTL8188CE WIFI card got installed natively without any problems with Ubuntu 13.0.4


Disk seems to be responding well, here are the quick benchmarks I’ve made :

Timing cached reads: 11322 MB in 2.00 seconds = 5666.05 MB/sec
Timing buffered disk reads: 1106 MB in 3.00 seconds = 368.64 MB/sec

External Seagate Expansion Desktop USB 3.0 Drive

External disk seems to be working as well as the mSata. No problems until now.

Timing cached reads: 11420 MB in 2.00 seconds = 5715.07 MB/sec
Timing buffered disk reads: 478 MB in 3.01 seconds = 158.69 MB/sec


Memory detected and installed correctly. lshw output :

slot A :
description: SODIMM DDR3 Synchronous 1333 MHz (0,8 ns)
vendor: Kingston
slot: ChannelA-DIMM0
size: 4GiB
width: 64 bits
clock: 1333MHz (0.8ns)


Slot B :
description: SODIMM DDR3 Synchronous 1333 MHz (0,8 ns)
vendor: Kingston
slot: ChannelB-DIMM0
size: 4GiB
width: 64 bits
clock: 1333MHz (0.8ns)

Wake on Lan (WOL) support

Using the ethtool Unix tool, I’ve checked that the network card supports WOL.

Gigabyte eth0 Wol support

Gigabyte eth0 Wol support

Update 1

Regarding the WOL functionality, here’s the answer I got from Gigabyte.

Dear XX,
After confirming with related department, GB-XM12-3227 (rev. 1.0) support Wake on LAN (WOL) function.

Update 2

Following Phil Wiffen’s great advise (check his article), I disabled the ERP support in the BIOS and the WOL functionality worked as it should.

I can now Wake-UP from the suspend, hibernate and poweroff states.

BIOS Update

I’ve installed the latest BIOS provided by Gigabyte (F5) without problems.
Please note that since I’ve the version F5 installed my Samsung TV has some trouble when it comes to display the BIOS settings screen. If I needed to guess, I would say it’s related to the resolution which the BIOS uses (1024×768).

I cannot be responsible for any damage you could do to your BRIX device. My advice is :

Don’t update the BIOS unless you know what you’re doing. Avoid doing it if not needed.

How to

Since Gigabyte doesn’t provide linux compatible tools for flashing you will need a DOS environnment to perform the flash.
The simplest choice you have is to use FreeDOS.

  1. Get a usb pen drive and format it to FAT32
  2. Use UNetbootin to install FreeDOS on it (you can download FreeDOS directly from the UNetbootin app)
  3. Download the executable file into a Windows computer and extracts the contents to a temp folder. You should have three files (ex: AFU303.exe, flash.bat, HM3AP.F5)
  4. Copy these three files to the pen drive (don’t put in a folder)
  5. Modify the BRIX bios settings in order to accept the boot from the usb pen drive
  6. Once you’have boot on FreeDOS, launch the flash.bat and it will start the flash process (it took me approximately 3 min)

List of some useful Eclipse plugins

When using IntelliJ IDEA is not an option…

This is a list of some useful Eclipse plugins that I tend to use when I’m working in a JavaEE environment.

  •  Eclipse Fullscreen :

Allows Eclipse to run on a fullscreen mode toggled by the Ctrl+Z shortcut.

  • Eclipse GrepConsole  :

Applies styles to the Console output (regex based). Come with a defined set of style based on (WARN, INFO, FATAL).

  • Atlassian Connector for Eclipse  :

Gives the possibility to view, edit, manage Jira tickets inside Eclipse.
Requires Mylyn to be installed.

  • Subclipse  :

I tend to prefer Subclipse over Subversive.

  •  Maven Integration :

and more…

Creating thumbnail images in PHP

Wasn’t easy to find a working solution, so I’m posting here as a reminder.

This is a PHP function to generate images thumbnails that handles: png, jpg, gif and also transparency

I’m not the author of this function, I’ve just mixed two solutions together, and fixed some small issues.

Sources :

Talend Open Studio in fullscreen

I’ve being used Talend Open Studio for a while now.

Whereas this program is just a fantastic ETL program, it lacks of fullscreen support (just as Eclipse does).

I’ve just found this simple yet powerful plugin callend Eclipse fullscreen that also work for RCP based applications.

How to install

  1. Download the plugin here
  2. Simple extract the .jar file to the Talend directory plugin folder (mine is : C:\Program Files\Talend 5.2.1\TOS_DI-Win32-r95165-V5.2.1\plugins)

How to use it

Just press CTRL + ALT + Z to toggle fullscreen mode !


Talend Open Studio with fullscreen mode offTalend Open Studio with fullscreen mode on

Fullscreen support is a nice feature for people who work with two monitors and therefore can take advantage of the second monitor without loosing sight of the task bar and other open applications.

Using java keyword when declaring an enumeration

Once, I had this particular case where I needed to have an enumeration with the double java keyword. I also wanted that a call on this enumeration would return me the “double” String.

If you try to type this :

You will get an error from the compiler saying that you cannot use the double keyword.

Here an elegant solution to achieve this :

This is possible due to the fact the enum is a class. We can then manipulate the name attribute

A very nice CSS3 Selector

This is a tiny small article (more like a reminder) to show you a great CSS3 selector

Match every p element inside any container that have a particular attribute :

Here is a small example. I want my rule to match the p element inside the div with customAttribute=”1″

Content in a “p” block inside the div

Content in a “p” block outside the div

Content in a “p” block inside the div

That magical ruly would be :

a p element inside any element with customAttribute set to 1

And voilà!

I strongly suggest you to read the CSS3 specification CSS 3 Selectors specification

Embedding a GWT / SmartGWT application in a Java Portlet (Liferay) using Maven

For a research project, I was once able to embed a GWT application using the SmartGWT framework in a Java Portlet. So, as I had faced some issues and problems, I’ve decided to post a small tutorial with guidelines to help people trying to achieve the same thing.

Little precisions:

  • The portlet was following the JSR 268
  • GWT version 2.3
  • SmartGWT version 2.5
  • Firefox was the only browser I was targeting
  • I was using Maven to manage my projects (but same thing could be done using Ant)

Thanks to “Antoniodb” from the SmartGWT community for providing some precious informations.

I do not intend to be an expert in those products. I’m only sharing my experience. There is another way of doing this (throught an html iframe) but I’m not detailing it.

    To integrate a SmartGWT application in a portlet, here are the steps I recommend to follow :
  • Create an empty JSR-268 portlet and configure it
  • Configure the SmartGWT app to work with the portlet
  • Mix the projects
  • Solve the Liferay CSS issues

The first part, is to create an empty JSR-268 portlet and configure it

No big deal in this part, we are going to create an empty portlet following the JSR 268 specification. In the main JSP page, we need to define an entry point for our SmartGWT module.

This is our jsp page


The GWT compile process will generate a lot of html and javascript files. But the “applicationame.nocache.js” is our entry point one. The gwtSource will be used to set the url of this file.
The urlSmartGWT will be used to set the isomorphicDir (the directory where SmartGWT search for its resources).

We also added a div that will contain the whole SmartGWT application once launched.


Now we are going to use the doView method, to set properly “gwtSource” and “urlSmartGWT” :

Configure the SmartGWT app to work with the portlet

To allow our SmartGWT module to be inserted into our JSP page, we have to add our outmermost layout manager into the div we defined before. We do that using this line of code instead of calling show() or draw():

When I used this approach, SmartGWT had some problems finding the image dir. So I’ve added this in the beginning of my onModuleLoad() method :

Another annoying problem is that SmartGWT uses high zIndex values (sometimes above 190 000), and this is not compliant with the Liferay zIndex. This results in your application getting rendered above the Liferay menus. To solve that, there is a possible solution :

To your outermost SmartGWT layout manager (any Canvas, Layout, etc), add this handler :


Mix the projects

This is the way I managed my java projects (maybe a better solution exists).

  1. One eclipse project containing my GWT / SmartGWT module.
  2. Another eclipse project containing my JSP portlet

When running in test mode, I only use the first project (using the embedded jetty servlet container).

When I was led to test the application under Liferay I used the second one.

Every time I wanted to deploy the portlet project, I copy the source files from SmartGWT project using the Maven Ant run plugin :

To make this approach work, we have to add this generated-sources/imported dir to the list of the known sources directories. Again this is easily done using the build helper Maven plugin :

After that, the Portlet project can compile the GWT code imported from the first project :

Solve the Liferay CSS issues

Finally, if you are using the Liferay portal you will probably experience some issues regarding the scrollbars. I named this issue : “Scrollbars gone crazy” (more info here).

In a short way, the problem is that the Liferay CSS (defined in the theme) is interfering with the SmartGWT CSS. I filled an issue report at Liferay’s site( more info here) but no one seems to be interested on it.
There is many ways to solve this, but I choose the approach modifying the Liferay theme. So a small solution is to add this rule in the Liferay CSS (best place to do that is in the custom.css file) :

I don’t know if all these settings are mandatory, but they solved my issues whens using Firefox.

© 2018 jmichelgarcia

Theme by Anders NorénUp ↑