Ubuntu Focal Desktop
Contents
1 Work with Ubuntu 20.04 (Focal) Desktop
1.1 Introduction to Ubuntu 20.04 Desktop
Ubuntu 20.04 Desktop has the following features:
- Base on Xorg, using LXQT as the desktop environment;
- SDDM is the default display manager;
- Mali GPU-based OpenGL ES support;
- Support Rockhip MPP video hard coding and hard decoding;
- Pre-installed mpv, support video hardware decoding;
1.2 Account & Password
Regular Account:
User Name: pi
Password: pi
Root:
User Name: root
Password: fa
1.3 Turn off auto-sleep and screen saver
sed -i 's/enableIdlenessWatcher=true/enableIdlenessWatcher=false/g' .config/lxqt/lxqt-powermanagement.conf echo "mode: off" > ~/.xscreensaver sudo reboot
1.4 Set up auto login
Create dir and file:
sudo mkdir /etc/sddm.conf.d sudo vim /etc/sddm.conf.d/autologin
The contents of the autologin file:
[Autologin] User=pi Session=lxqt.desktop Relogin=false
Reboot.
1.5 Test Video Playback
- mpv
mpv ~/Videos/demo.mp4
- GStreamer Command Line
gst-play-1.0 ~/Videos/demo.mp4 --videosink=xvimagesink
For more details, please search and refer to the official documentation <<rockchip_user_guide_linux_gstreamer_en.pdf>>.
1.6 Audio Settings
1.6.1 Switching Audio Output Channel
To switch the audio output channel, go to "System Tools" -> "Qterminal",enter the following command in the terminal to check available audio output channels:
export XDG_RUNTIME_DIR=/run/user/1000 pactl list sinks short
On the NanoPC-T6, the results appear as follows. The string beginning with alsa_output in the second column is the value we will use:
0 alsa_output.platform-dp0-sound.stereo-fallback module-alsa-card.c s16le 2ch 44100Hz SUSPENDED 1 alsa_output.platform-hdmi0-sound.stereo-fallback module-alsa-card.c s16le 2ch 48000Hz SUSPENDED 2 alsa_output.platform-hdmi1-sound.stereo-fallback module-alsa-card.c s16le 2ch 44100Hz SUSPENDED 3 alsa_output.platform-rt5616-sound.multichannel-output module-alsa-card.c s16le 2ch 44100Hz SUSPENDED
Use an editor to modify the PulseAudio configuration file:
sudo vim /etc/pulse/default.pa
If you need to set the audio output to HDMI1, replace the following line at the end of the file:
set-default-sink alsa_output.platform-hdmi0-sound.stereo-fallback
with:
set-default-sink alsa_output.platform-hdmi1-sound.stereo-fallback
Save the file and restart the system for the changes to take effect, or restart the PulseAudio service:
pulseaudio -k pulseaudio --start
1.6.2 Multi-Device Audio Output
Edit the PulseAudio configuration file:
sudo vim /etc/pulse/default.pa
Scroll to the end of the file, delete any line that starts with set-default-sink, and add the following lines at the end:
load-module module-combine-sink sink_name=combined slaves=alsa_output.platform-hdmi0-sound.stereo-fallback,alsa_output.platform-hdmi1-sound.stereo-fallback set-default-sink combined
Restart the system. With this configuration, audio will output simultaneously to both the HDMI0 and HDMI1 interfaces.