Difference between revisions of "Template:UbuntuFocalDesktop-Common"
(updated by API) |
(updated by API) |
||
Line 37: | Line 37: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
For more details, please search and refer to the official documentation <<rockchip_user_guide_linux_gstreamer_en.pdf>>. | For more details, please search and refer to the official documentation <<rockchip_user_guide_linux_gstreamer_en.pdf>>. | ||
− | ===Switching Audio Output Channel=== | + | ===Audio Settings=== |
+ | ====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: | To switch the audio output channel, go to '''"System Tools"''' -> '''"Qterminal"''',enter the following command in the terminal to check available audio output channels: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
Line 62: | Line 63: | ||
set-default-sink alsa_output.platform-hdmi1-sound.stereo-fallback | set-default-sink alsa_output.platform-hdmi1-sound.stereo-fallback | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | Save the file and restart the system for the changes to take effect | + | Save the file and restart the system for the changes to take effect, or restart the PulseAudio service: |
− | ==== | + | <syntaxhighlight lang="bash"> |
+ | pulseaudio -k | ||
+ | pulseaudio --start | ||
+ | </syntaxhighlight> | ||
+ | ====Multi-Device Audio Output==== | ||
Edit the PulseAudio configuration file: | Edit the PulseAudio configuration file: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> |
Latest revision as of 09:52, 1 November 2024
Contents
1 Account & Password
Regular Account:
User Name: pi
Password: pi
Root:
User Name: root
Password: fa
2 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
3 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.
4 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>>.
5 Audio Settings
5.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
5.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.