Difference between revisions of "Template:UbuntuFocalDesktop-Common/zh"
From FriendlyELEC WiKi
(updated by API) |
(updated by API) |
||
(5 intermediate revisions by the same user not shown) | |||
Line 6: | Line 6: | ||
<br/> | <br/> | ||
Root用户:<br/> | Root用户:<br/> | ||
− | | + | 用户名: root<br/> |
+ | 密码: fa<br/> | ||
+ | ===关闭自动休眠和屏幕保护=== | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | sed -i 's/enableIdlenessWatcher=true/enableIdlenessWatcher=false/g' .config/lxqt/lxqt-powermanagement.conf | ||
+ | echo "mode: off" > ~/.xscreensaver | ||
+ | sudo reboot | ||
+ | </syntaxhighlight> | ||
+ | ===设置自动登录=== | ||
+ | 创建目录与文件 | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | sudo mkdir /etc/sddm.conf.d | ||
+ | sudo vim /etc/sddm.conf.d/autologin | ||
+ | </syntaxhighlight> | ||
+ | autologin文件内容如下: | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | [Autologin] | ||
+ | User=pi | ||
+ | Session=lxqt.desktop | ||
+ | Relogin=false | ||
+ | </syntaxhighlight> | ||
+ | 重启。 | ||
+ | ===测试视频播放=== | ||
+ | * mpv | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | mpv ~/Videos/demo.mp4 | ||
+ | </syntaxhighlight> | ||
+ | * gsteamer命令行 | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | gst-play-1.0 ~/Videos/demo.mp4 --videosink=xvimagesink | ||
+ | </syntaxhighlight> | ||
+ | 详请可搜索并参考官方文档<<rockchip_user_guide_linux_gstreamer_en.pdf>> | ||
+ | ===切换成中文语言=== | ||
+ | 菜单进入 '''"Preferences"''' -> '''"Locale"''',在 '''"Region"''' 处选择 '''"中国 - 简体中文(zh_CN)"''' 保存,然后注销或者重启系统即可。 | ||
+ | ===音频设置=== | ||
+ | ====切换音频输出通道==== | ||
+ | 菜单进入 '''"System Tools"''' -> '''"Qterminal"''',在终端中输入如下命令查询可用的音频输出通道: | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | export XDG_RUNTIME_DIR=/run/user/1000 | ||
+ | pactl list sinks short | ||
+ | </syntaxhighlight> | ||
+ | 在NanoPC-T6上查询结果如下所示,其中,第二列alsa_output开头的字符串是我们接下来需要用到的值: | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | 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 | ||
+ | </syntaxhighlight> | ||
+ | 使用编辑器编辑pulseaudio的配置文件: | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | sudo vim /etc/pulse/default.pa | ||
+ | </syntaxhighlight> | ||
+ | 这里假设我需要将音频输出通道设置为HDMI1,方法是将文件中的如下内容(位于文件末尾): | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | set-default-sink alsa_output.platform-hdmi0-sound.stereo-fallback | ||
+ | </syntaxhighlight> | ||
+ | 改为 | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | set-default-sink alsa_output.platform-hdmi1-sound.stereo-fallback | ||
+ | </syntaxhighlight> | ||
+ | 保存文件,重启系统即可,或重启pulseaudio服务: | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | pulseaudio -k | ||
+ | pulseaudio --start | ||
+ | </syntaxhighlight> | ||
+ | ====音频多路输出==== | ||
+ | 编辑pulseaudio的配置文件: | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | sudo vim /etc/pulse/default.pa | ||
+ | </syntaxhighlight> | ||
+ | 定位到文件末尾,删除set-default-sink开头的行,在文件末尾增加如下内容: | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | 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 | ||
+ | </syntaxhighlight> | ||
+ | 重启系统,通过以上设置后,音频将同时输出到HDMI0和HDMI1接口。 |
Latest revision as of 09:52, 1 November 2024
Contents
1 Account & Password
2 帐户与密码
普通用户:
用户名: pi
密码: pi
Root用户:
用户名: root
密码: fa
3 关闭自动休眠和屏幕保护
sed -i 's/enableIdlenessWatcher=true/enableIdlenessWatcher=false/g' .config/lxqt/lxqt-powermanagement.conf echo "mode: off" > ~/.xscreensaver sudo reboot
4 设置自动登录
创建目录与文件
sudo mkdir /etc/sddm.conf.d sudo vim /etc/sddm.conf.d/autologin
autologin文件内容如下:
[Autologin] User=pi Session=lxqt.desktop Relogin=false
重启。
5 测试视频播放
- mpv
mpv ~/Videos/demo.mp4
- gsteamer命令行
gst-play-1.0 ~/Videos/demo.mp4 --videosink=xvimagesink
详请可搜索并参考官方文档<<rockchip_user_guide_linux_gstreamer_en.pdf>>
6 切换成中文语言
菜单进入 "Preferences" -> "Locale",在 "Region" 处选择 "中国 - 简体中文(zh_CN)" 保存,然后注销或者重启系统即可。
7 音频设置
7.1 切换音频输出通道
菜单进入 "System Tools" -> "Qterminal",在终端中输入如下命令查询可用的音频输出通道:
export XDG_RUNTIME_DIR=/run/user/1000 pactl list sinks short
在NanoPC-T6上查询结果如下所示,其中,第二列alsa_output开头的字符串是我们接下来需要用到的值:
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
使用编辑器编辑pulseaudio的配置文件:
sudo vim /etc/pulse/default.pa
这里假设我需要将音频输出通道设置为HDMI1,方法是将文件中的如下内容(位于文件末尾):
set-default-sink alsa_output.platform-hdmi0-sound.stereo-fallback
改为
set-default-sink alsa_output.platform-hdmi1-sound.stereo-fallback
保存文件,重启系统即可,或重启pulseaudio服务:
pulseaudio -k pulseaudio --start
7.2 音频多路输出
编辑pulseaudio的配置文件:
sudo vim /etc/pulse/default.pa
定位到文件末尾,删除set-default-sink开头的行,在文件末尾增加如下内容:
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
重启系统,通过以上设置后,音频将同时输出到HDMI0和HDMI1接口。