Difference between revisions of "Template:Lubuntu-RK3399"

From FriendlyELEC WiKi
Jump to: navigation, search
(updated by API)
(updated by API)
Line 67: Line 67:
 
./HelloQt --platform xcb
 
./HelloQt --platform xcb
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
 +
===Chromium web browser ===
 +
Chromium web browser has enabled hardware acceleration by default, supports WebGL, and can view hardware acceleration details by entering the URL chrome://gpu, as shown below:<br />
 +
[[File:Chromium-gpu.png|frameless|400px]]
  
 
{{RK3399SelectALSAAudioDevice}}
 
{{RK3399SelectALSAAudioDevice}}

Revision as of 11:15, 21 December 2018

1 Work with Lubuntu

1.1 Introduction to Lubuntu

Arduino
Website
Website

LUbuntu is a light-weighted Ubuntu desktop system. It is based on LXDE and has the following features:
    Light-weighted - it consumes relatively less CPU resources than a common desktop system. When a system's RAM is sufficient it can achieve much better performance.
    Less power consumption - it consumes relatively less power or resources than a common desktop system to achieve the same performance.
    Compact & neat - its desktop is based on GTK+ 2 and supports multiple languages.
    Easy to use - its GUI looks similar to MS Windows'.
    Customizable - Users can customize LXDE's GUI.
    Compatible - it is compatible with freedesktop.org.

The Lubuntu Desktop has been optimized for adopting Mali GPU. It has driver support for X.org and supports Hardware Cursor, OpenGL acceleration and etc.

1.2 Lubuntu Default User Account

Non-root User:

   User Name: pi
   Password: pi

Root:

   User Name: root
   Password: fa

1.3 OpenGL ES

Open a command line utility and run the following command:

glmark2-es2

Nanopc-t4-lubuntu-glmark2es.png

1.4 Video Playing with Hardware Decoding

1.4.1 Video Playing with Qt Player

Lubuntu is preinstalled with Qt5-Player which has Rockchip's gstreamer plug-in and supports playing 4K video stream. Here are the steps to start it:
On Lubuntu's main window open "Other" and click on Qt5-Player

Here is how this player looks like. It can display in full screen. You can adjust its volume:
Lubuntu-qt5-player.jpg

1.4.2 Video Playing with Commandline Utility

Open a commandline utility and type the following command:

gst-player.sh

Your selected video file will be played in Overlay and its voice will be output to the earphone. You can use "which gst-player.sh" to locate this script and customize it.

1.5 eDP LCD Rotation

If your board is connected to an eDP LCD and you want to rotate its display by 90/180/270 degrees you can do it with "xrotate.sh". You can run the following command as root to rotate its display by 90 degrees clockwise. It will start the lightdm service to make it effective:

sudo xrotate.sh -m CW -r

You can get more details by running "xrotate -h".
However this command cannot rotate HDMI display. If you want to rotate HDMI display you may need to make changes in "/etc/X11/xorg.conf"

1.6 Connect USB Camera

Connect a USB camera (e.g. Logitech C270) to {{{1}}}, start Lubuntu, enter the "Other" menu, start "xawtv" and you will be able to preview with the camera.

1.7 5G WiFi

Click on the network icon on top right of the Lubuntu GUI, select a WiFi hotspot and proceed with prompts.

1.8 Develop Qt Application

Lubuntu has Qt 5.10.0 which can be used to develop an X11 application. For details about SDK download and compilation refer to :How to Build and Install Qt Application for FriendlyELEC Boards
When running the Qt app, you need to specify the platform parameter to xcb as follows:

./HelloQt --platform xcb

1.9 Chromium web browser

Chromium web browser has enabled hardware acceleration by default, supports WebGL, and can view hardware acceleration details by entering the URL chrome://gpu, as shown below:
Chromium-gpu.png

1.10 Select the system default audio device

You can set the system default audio device by following the steps below.
Use the following command to view all the sound card devices in the system (Note: different development boards will have different results):

pi@NanoPi:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: realtekrt5651co [realtek,rt5651-codec], device 0: ff880000.i2s-rt5651-aif1 rt5651-aif1-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: rockchiphdmi [rockchip,hdmi], device 0: ff8a0000.i2s-i2s-hifi i2s-hifi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: ROCKCHIPSPDIF [ROCKCHIP,SPDIF], device 0: ff870000.spdif-dit-hifi dit-hifi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

As you can see, the following sound card devices are available on the hardware:

Sound card device Sound card number Description
realtekrt5651co 0 Realtek sound card's default output interface (through 3.5mm jack interface)
rockchiphdmi 1 HDMI
ROCKCHIPSPDIF 2 SPDIF (Note: temporarily unavailable, because the hardware is not exported)...

To configure the audio output to the 3.5mm jack, modify the configuration file /etc/asound.conf and modify it to the following:

defaults.pcm.card 0
defaults.pcm.device 0

To configure to output audio to HDMI, change the defaults.pcm.card above to 1.
Note that some boards do not have a Realtek sound card (no 3.5mm jack interface), so the card number of the HDMI device will be 0, so the configuration should be based on the result of the aplay -l command.