[problem help] 华为电脑声卡无声systemctl控制脚本开机运行,为什么无法启动?
Tofloor
poster avatar
yrn
deepin
2024-08-29 17:51
Author

在https://bbs.deepin.org.cn/post/270279里,我知道了华为电脑不出声的原因

于是我按照上面说的,先是用sh测试了一下,运行sh是可以修复问题的,然后就想着弄一个service来开机自启

我将service放在了/etc/systemd/system/下,并写入以下内容:

[Unit]
Description=Huawei soundcard headphones monitor

[Service]
ExecStart=/usr/local/bin/huawei-soundcard-headphones-monitor.sh
Restart=always
User=root

[Install]
WantedBy=multi-user.target

然后chmod +x了,但重启/注销都无法运行,systemctl status显示:

× huawei-soundcard-headphones-monitor.service - Huawei soundcard headphones monitor
     Loaded: loaded (/etc/systemd/system/huawei-soundcard-headphones-monitor.service; enabled; preset: enabled)
     Active: failed (Result: start-limit-hit) since Thu 2024-08-29 17:36:59 CST; 13min ago
   Duration: 17ms
   Main PID: 651 (code=exited, status=0/SUCCESS)
        CPU: 16ms

Warning: some journal files were not opened due to insufficient permissions.

Reply Favorite View the author
All Replies
yrn
deepin
2024-08-29 18:10
#1

但是systemctl start没问题

Reply View the author
晚秋(lateautumn)
Moderator
2024-08-29 18:17
#2

我一直是手动调整。脚本对我来说太高深了。joy

Reply View the author
yrn
deepin
2024-08-29 18:27
#3
晚秋(lateautumn)

我一直是手动调整。脚本对我来说太高深了。joy

没辙了,只能写成命令啥的稍微好看点...

Reply View the author
流浪的加菲
deepin
2024-08-29 18:35
#4

经常看到华为笔记本没有声音,还有佳能2900打印机驱动的反馈,有解决方案,但是系统更新这么多版本了,为什么这些问题会一直存在呢?confused

Reply View the author
晚秋(lateautumn)
Moderator
2024-08-29 19:03
#5
流浪的加菲

经常看到华为笔记本没有声音,还有佳能2900打印机驱动的反馈,有解决方案,但是系统更新这么多版本了,为什么这些问题会一直存在呢?confused

agree

也咨询过华为的技术支持,据说华为的笔记本声卡经过魔改。适配不太容易。

Reply View the author
晚秋(lateautumn)
Moderator
2024-08-29 19:04
#6
yrn

没辙了,只能写成命令啥的稍微好看点...

调试成功了,分享一下。

like

Reply View the author
Oli
deepin
2024-08-29 21:08
#7

不太懂是我的盲区

Reply View the author
麻烦告诉我小浣熊哪里有
deepin
2024-08-29 21:37
#8

也记得分享给我一份

Reply View the author
remyxo
deepin
2024-08-30 08:41
#9

对于华为笔记本声卡无声问题,我是按照这个帖子修复的,一次搞定,无需额外的启动脚本:

https://blog.csdn.net/scmhw/article/details/128178261

(最好先确认有无/etc/modprobe.d/alsa-base.conf这个文件,如有,操作前先备份,或者">"(覆盖)改为">>"(追加) )

Reply View the author