AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-16755

balu's questions

Martin Hope
balu
Asked: 2020-07-18 00:59:54 +0800 CST

command-not-found 不会抱怨 zsh 中的未知命令

  • 2

我安装了这个command-not-found包,并.zshrc像这样加载它:

source /etc/zsh_command_not_found

虽然我现在获得了有关未找到但可以通过安装其他软件包获得的命令的建议(例如),但当找不到命令并且没有提供该命令的建议(例如asdf)时,我不再收到任何反馈。在这种情况下,命令行上绝对没有输出,所以我经常不会注意到什么时候没有运行命令。(例如,默认情况下我不希望 Conda 修改我的 shell 环境,但这意味着每当我想使用该命令时,我都必须获取 Conda shell 脚本。现在我经常只注意到我实际上的三个命令忘记获取该脚本并且我的 conda 调用没有做任何事情。)asdfasdfadfasdfconda

我怎样才能解决这个问题?

command-line zsh
  • 1 个回答
  • 1063 Views
Martin Hope
balu
Asked: 2020-07-07 06:21:00 +0800 CST

Ubuntu 20.04 上没有声音(Dell XPS 7390 / Realtek ALC3271 / Intel Corporation Device 02c8)

  • 4

我这个周末在我的戴尔 XPS 7390 上安装了 Ubuntu 20.04,但似乎无法让声卡工作,根据 BIOS,它带有 Realtek ALC3271 控制器。pavucontrol除了虚拟输出之外,不显示任何接收器或源。以下是我已经尝试过并且到目前为止能够找到的内容:

$ pacmd list-cards
0 card(s) available.

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: sofhdadsp [sof-hda-dsp], Device 0: HDA Analog (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: sofhdadsp [sof-hda-dsp], Device 1: HDA Digital (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: sofhdadsp [sof-hda-dsp], Device 3: HDMI1 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: sofhdadsp [sof-hda-dsp], Device 4: HDMI2 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: sofhdadsp [sof-hda-dsp], Device 5: HDMI3 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

(这里没有内部声卡的迹象。)

输出hwinfo:

$ hwinfo --sound
19: PCI 1f.3: 0403 Audio device                                 
  [Created at pci.386]
  Unique ID: nS1_.MDj4I2BvgV7
  SysFS ID: /devices/pci0000:00/0000:00:1f.3
  SysFS BusID: 0000:00:1f.3
  Hardware Class: sound
  Model: "Intel Audio device"
  Vendor: pci 0x8086 "Intel Corporation"
  Device: pci 0x02c8 
  SubVendor: pci 0x1028 "Dell"
  SubDevice: pci 0x0962 
  Driver: "sof-audio-pci"
  Driver Modules: "snd_sof_pci"
  Memory Range: 0x604b118000-0x604b11bfff (rw,non-prefetchable)
  Memory Range: 0x604b000000-0x604b0fffff (rw,non-prefetchable)
  IRQ: 170 (1726 events)
  Module Alias: "pci:v00008086d000002C8sv00001028sd00000962bc04sc03i80"
  Driver Info #0:
    Driver Status: snd_hda_intel is active
    Driver Activation Cmd: "modprobe snd_hda_intel"
  Driver Info #1:
    Driver Status: snd_sof_pci is active
    Driver Activation Cmd: "modprobe snd_sof_pci"
  Config Status: cfg=new, avail=yes, need=no, active=unknown

的音频相关输出lspci:

$ sudo lspci -v
00:1f.3 Audio device: Intel Corporation Device 02c8 (prog-if 80)
        Subsystem: Dell Device 0962
        Flags: bus master, fast devsel, latency 64, IRQ 170
        Memory at 604b118000 (64-bit, non-prefetchable) [size=16K]
        Memory at 604b000000 (64-bit, non-prefetchable) [size=1M]
        Capabilities: [50] Power Management version 3
        Capabilities: [80] Vendor Specific Information: Len=14 <?>
        Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+
        Kernel driver in use: sof-audio-pci
        Kernel modules: snd_hda_intel, snd_sof_pci

奇怪的是,当我写这篇文章时,输出$ sudo lspci -v正在改变。当我在一分钟前再次执行它时,与音频相关的输出突然变成了

$ sudo lspci -v
00:15.1 Serial bus controller [0c80]: Intel Corporation Comet Lake Serial IO I2C Host Controller
        Subsystem: Dell Device 0962
        Flags: bus master, fast devsel, latency 0, IRQ 17
        Memory at 4010001000 (64-bit, non-prefetchable) [virtual] [size=4K]
...skipping...
        Kernel driver in use: sof-audio-pci
        Kernel modules: snd_hda_intel, snd_sof_pci

并且从上方看不到 02c8 设备的迹象。但截至目前,它又回到了“正常”状态(即之前的输出,见上文)。

同时,输出dmesg根本没有改变,据我所知,它报告一切都很好:

$ dmesg | grep audio
[   14.047977] sof-audio-pci 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040380
[   14.047988] sof-audio-pci 0000:00:1f.3: enabling device (0000 -> 0002)
[   14.048210] sof-audio-pci 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040380
[   14.048290] sof-audio-pci 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[   14.054734] sof-audio-pci 0000:00:1f.3: use msi interrupt mode
[   14.118496] sof-audio-pci 0000:00:1f.3: hda codecs found, mask 5
[   14.118498] sof-audio-pci 0000:00:1f.3: using HDA machine driver skl_hda_dsp_generic now
[   14.213711] sof-audio-pci 0000:00:1f.3: Firmware info: version 1:4:2-66a5a
[   14.213712] sof-audio-pci 0000:00:1f.3: Firmware: ABI 3:11:0 Kernel ABI 3:13:0
[   14.213970] sof-audio-pci 0000:00:1f.3: firmware boot complete
[   14.216836] sof-audio-pci 0000:00:1f.3: Topology: ABI 3:11:0 Kernel ABI 3:13:0
[   14.216840] sof-audio-pci 0000:00:1f.3: warning: widget type 7 name iDisp3 Tx not handled
[   14.219998] sof-audio-pci 0000:00:1f.3: warning: widget type 0 name codec0_in not handled
[   14.220000] sof-audio-pci 0000:00:1f.3: warning: widget type 7 name iDisp2 Tx not handled
[   14.221323] sof-audio-pci 0000:00:1f.3: warning: widget type 0 name codec1_in not handled
[   14.221324] sof-audio-pci 0000:00:1f.3: warning: widget type 7 name iDisp1 Tx not handled
[   14.222260] sof-audio-pci 0000:00:1f.3: warning: widget type 1 name codec0_out not handled
[   14.222263] sof-audio-pci 0000:00:1f.3: warning: widget type 7 name Analog CPU Playback not handled
[   14.223154] sof-audio-pci 0000:00:1f.3: warning: widget type 1 name codec1_out not handled
[   14.223156] sof-audio-pci 0000:00:1f.3: warning: widget type 7 name Digital CPU Playback not handled
[   14.223157] sof-audio-pci 0000:00:1f.3: warning: widget type 0 name codec2_in not handled
[   14.223159] sof-audio-pci 0000:00:1f.3: warning: widget type 7 name Alt Analog CPU Playback not handled
[   14.223160] sof-audio-pci 0000:00:1f.3: warning: widget type 1 name codec2_out not handled
[   14.223161] sof-audio-pci 0000:00:1f.3: warning: widget type 0 name Analog CPU Capture not handled
[   14.224026] sof-audio-pci 0000:00:1f.3: warning: widget type 1 name iDisp1_out not handled
[   14.224028] sof-audio-pci 0000:00:1f.3: warning: widget type 0 name Digital CPU Capture not handled
[   14.224870] sof-audio-pci 0000:00:1f.3: warning: widget type 1 name iDisp2_out not handled
[   14.224872] sof-audio-pci 0000:00:1f.3: warning: widget type 0 name Alt Analog CPU Capture not handled
[   14.225704] sof-audio-pci 0000:00:1f.3: warning: widget type 1 name iDisp3_out not handled
[   14.229492] sof-audio-pci 0000:00:1f.3: ASoC: Parent card not yet available, widget card binding deferred
[   14.246407] snd_hda_codec_realtek ehdaudio0D0: autoconfig for ALC3271: line_outs=1 (0x17/0x0/0x0/0x0/0x0) type:speaker
[   14.246408] snd_hda_codec_realtek ehdaudio0D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[   14.246409] snd_hda_codec_realtek ehdaudio0D0:    hp_outs=1 (0x21/0x0/0x0/0x0/0x0)
[   14.246409] snd_hda_codec_realtek ehdaudio0D0:    mono: mono_out=0x0
[   14.246410] snd_hda_codec_realtek ehdaudio0D0:    inputs:
[   14.246410] snd_hda_codec_realtek ehdaudio0D0:      Headset Mic=0x19
[   14.246411] snd_hda_codec_realtek ehdaudio0D0:      Headphone Mic=0x1b
[   14.246412] snd_hda_codec_realtek ehdaudio0D0:      Internal Mic=0x12
[   14.295052] snd_hda_codec_realtek ehdaudio0D0: ASoC: sink widget AIF1TX overwritten
[   14.295055] snd_hda_codec_realtek ehdaudio0D0: ASoC: source widget AIF1RX overwritten
[ 3180.256625] sof-audio-pci 0000:00:1f.3: firmware boot complete

到目前为止我已经尝试过:

  • 添加options snd-hda-intel model=generic到/etc/modprobe.d/alsa-base.conf
  • 添加options snd-hda-intel model=auto到/etc/modprobe.d/alsa-base.conf
  • 在 BIOS 中禁用声卡,启动 Ubuntu,重新启动并再次在 BIOS 中启用声卡,再次启动 Ubuntu(如此处推荐)

可能相关(或类似)的问题:

  • askubuntu.com:英特尔公司设备 02c8 没有声音 20.04:这可能与我遇到的问题相同,但 OP 没有提供太多信息,我也不想为了我的目的劫持他的问题。因此,我希望您不要将我的问题声明为重复。
  • reddit.com:HP Pro Book 没有声音。安装 alsa 和 alsa-firmware。现在怎么办?
  • tonymax86.com: DELL XPS 9730 - Realtek ALC3271 - 音频 - High Sierra
  • bugs.launchpad.net:XPS 13 7390 2 合 1、Intel Icelake HDMI、数字输出、HDMI:声音很少工作
  • linux.org:华硕 Zenbook 15 UX534F Realtek 高清音频问题
  • forum.manjaro.org:ALC294 模拟 - 检测到声卡,但内部或耳机没有声音
sound pulseaudio realtek dell
  • 1 个回答
  • 4649 Views
Martin Hope
balu
Asked: 2020-01-28 10:08:52 +0800 CST

更改音量时保持自定义左/右音频平衡(即比率)

  • 2

我的耳机已经老化,其中一个(左侧)现在以比另一个低得多的音量播放声音。所以我按照这里的建议将左右平衡调整为(在我的情况下)左侧为 80%,右侧为 20%。但是,锁定此余额并不会像我在之后更改音量时所期望的那样:也就是说,通过pavucontrolGUI 或通过例如pactl -- set-sink-volume @DEFAULT_SINK@ +5%将音量增加 5% 将向两侧增加 5 个百分点,左侧和右,即左右水平将在 85% 和 25% 之后。换句话说,80%/20% = 4没有保留比例,音频将再次听起来不平衡。

我怎样才能改变它并始终保持比例4?PulseAudio 深处是否有相应的设置,或者甚至更好,是否有编程方式(shell 脚本)来实现这一点?(我无法弄清楚如何单独检索 - 更不用说调整 - 左/右音量级别了。)

[编辑]:至于为左右声道设置pactl不同的音量级别,我只是注意到允许传递多个(空格分隔的)音量级别,每个声道一个。现在,我只需要知道如何检索每个通道的当前音量。据我所知,pamixer --get-volume不允许这样做(pamixer 是这个工具)。

[编辑 2]:结果pacmd list-sinks确实列出了所有通道的音量,但就像 PulseAudio 的典型情况一样,以一种不太容易解析的方式。没有基于可靠 CLI 的更简单(面向未来)的解决方案吗?

pulseaudio
  • 1 个回答
  • 1771 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve