sdm845-mainline: kernel 6.4.0 -> 6.11
A nice bump, 6.4.0 is very old, and this just feels less buggy so far (graphics have less artifacts, and who knows what else just happened to get fixed in the meantime).
Requires more testing, my motivation is to test a modular kernel with stage-1 support on the device, and I have tested at least that isModular = true works, but technically haven't tested with isModular = false.
I will report back with more testing.
In 6.11, USB_ONBOARD_HUB was renamed to USB_ONBOARD_DEV hence the additional change to support/kernel-config/configuration.nix
@gmicroul Your collection of logs are interesting and useful for collecting what goes wrong with the audio on the device, but can you post them in text form instead of screenshot form?
[alice@nixos:~]$ systemctl --user status pulseaudio ● pulseaudio.service - Sound Service Loaded: loaded (/etc/systemd/user/pulseaudio.service; linked-runtime; preset: enabled) Drop-In: /nix/store/yfcnhh8x4yzg6jr3kj9q95wqyjpwjf96-user-units/pulseaudio.service.d └─overrides.conf Active: active (running) since Thu 2024-10-10 17:01:33 CST; 1h 26min ago Invocation: 66c1e8937fb0417995860b6fc951e91e TriggeredBy: ● pulseaudio.socket Main PID: 1033 (pulseaudio) Tasks: 8 (limit: 8419) Memory: 12.4M (peak: 13.1M) CPU: 350ms CGroup: /user.slice/user-1000.slice/[email protected]/session.slice/pulseaudio.service ├─1033 /nix/store/z3dsrg7vswf4kb4a3a9ciqmh558718jl-pulseaudio-17.0/bin/pulseaudio --daemonize=no --log-target=journal └─1057 /nix/store/z3dsrg7vswf4kb4a3a9ciqmh558718jl-pulseaudio-17.0/libexec/pulse/gsettings-helper
Oct 10 17:01:33 nixos pulseaudio[1033]: Failed to load module "module-alsa-card" (argument: "device_id="1" name="platform-sound" card_name="alsa_card.platform-sound" namereg_fail=false tsched=yes fixed_latency_> Oct 10 17:01:33 nixos pulseaudio[1033]: Failed to find a working profile. Oct 10 17:01:33 nixos pulseaudio[1033]: Failed to load module "module-alsa-card" (argument: "device_id="1" name="platform-sound" card_name="alsa_card.platform-sound" namereg_fail=false tsched=yes fixed_latency_> Oct 10 17:01:33 nixos pulseaudio[1033]: Failed to find a working profile. Oct 10 17:01:33 nixos pulseaudio[1033]: Failed to load module "module-alsa-card" (argument: "device_id="1" name="platform-sound" card_name="alsa_card.platform-sound" namereg_fail=false tsched=yes fixed_latency_> Oct 10 17:01:33 nixos pulseaudio[1033]: Failed to find a working profile. Oct 10 17:01:33 nixos pulseaudio[1033]: Failed to load module "module-alsa-card" (argument: "device_id="1" name="platform-sound" card_name="alsa_card.platform-sound" namereg_fail=false tsched=yes fixed_latency_> Oct 10 17:01:33 nixos pulseaudio[1033]: Failed to find a working profile. Oct 10 17:01:33 nixos pulseaudio[1033]: Failed to load module "module-alsa-card" (argument: "device_id="1" name="platform-sound" card_name="alsa_card.platform-sound" namereg_fail=false tsched=yes fixed_latency_> Oct 10 17:01:33 nixos pulseaudio[1033]: Tried to configure /devices/platform/sound/sound/card1 (alsa_card.platform-sound) more often than 5 times in 10s
[alice@nixos:~]$ dmesg|grep tfa [ 0.536873] tfa98xx_i2c_init(): TFA98XX driver version v6.7.14 [ 0.609478] tfa98xx_i2c_probe(): addr=0x34 [ 0.609548] tfa98xx 4-0034: No IRQ GPIO provided. [ 0.609556] tfa98xx 4-0034: reset-polarity:1 [ 0.612004] tfa98xx_i2c_probe(): TFA9894 detected [ 0.612034] tfa98xx 4-0034: Skipping IRQ registration [ 0.612090] tfa98xx_i2c_probe(): tfa98xx_i2c_probe Probe completed successfully! [ 7.044011] tfa98xx 4-0034: tfa98xx codec registered ()
[alice@nixos:~]$ dmesg|grep sound [ 6.782645] qcom-soundwire wcd934x-soundwire.3.auto: DMA mask not set [ 6.912886] qcom-soundwire wcd934x-soundwire.3.auto: Qualcomm Soundwire controller v1.3.0 Registered [ 7.107131] input: OnePlus 6T Headset Jack as /devices/platform/sound/sound/card1/input3
[alice@nixos:~]$ aplay -L null Discard all samples (playback) or generate zero samples (capture) default Default Audio Device (via PulseAudio) sysdefault:CARD=Loopback Loopback, Loopback PCM Default Audio Device front:CARD=Loopback,DEV=0 Loopback, Loopback PCM Front output / input surround21:CARD=Loopback,DEV=0 Loopback, Loopback PCM 2.1 Surround output to Front and Subwoofer speakers surround40:CARD=Loopback,DEV=0 Loopback, Loopback PCM 4.0 Surround output to Front and Rear speakers surround41:CARD=Loopback,DEV=0 Loopback, Loopback PCM 4.1 Surround output to Front, Rear and Subwoofer speakers surround50:CARD=Loopback,DEV=0 Loopback, Loopback PCM 5.0 Surround output to Front, Center and Rear speakers surround51:CARD=Loopback,DEV=0 Loopback, Loopback PCM 5.1 Surround output to Front, Center, Rear and Subwoofer speakers surround71:CARD=Loopback,DEV=0 Loopback, Loopback PCM 7.1 Surround output to Front, Center, Side, Rear and Woofer speakers sysdefault:CARD=O6T OnePlus 6T, Default Audio Device
[alice@nixos:~]$ aplay -l **** List of PLAYBACK Hardware Devices **** card 0: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM] Subdevices: 8/8 Subdevice #0: subdevice #0 Subdevice #1: subdevice #1 Subdevice #2: subdevice #2 Subdevice #3: subdevice #3 Subdevice #4: subdevice #4 Subdevice #5: subdevice #5 Subdevice #6: subdevice #6 Subdevice #7: subdevice #7 card 0: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM] Subdevices: 8/8 Subdevice #0: subdevice #0 Subdevice #1: subdevice #1 Subdevice #2: subdevice #2 Subdevice #3: subdevice #3 Subdevice #4: subdevice #4 Subdevice #5: subdevice #5 Subdevice #6: subdevice #6 Subdevice #7: subdevice #7 card 1: O6T [OnePlus 6T], device 0: MultiMedia1 () [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: O6T [OnePlus 6T], device 1: MultiMedia2 () [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: O6T [OnePlus 6T], device 2: MultiMedia3 () [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: O6T [OnePlus 6T], device 3: MultiMedia4 () [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: O6T [OnePlus 6T], device 4: MultiMedia5 () [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: O6T [OnePlus 6T], device 5: MultiMedia6 () [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: O6T [OnePlus 6T], device 6: VoiceMMode1 (*) [] Subdevices: 1/1 Subdevice #0: subdevice #0
[alice@nixos:~]$ sudo systemctl status bluetooth [sudo] password for alice: ● bluetooth.service - Bluetooth service Loaded: loaded (/etc/systemd/system/bluetooth.service; enabled; preset: enabled) Drop-In: /nix/store/9x5yd760ljvz0f0vphha6lyskkyngl2q-system-units/bluetooth.service.d └─overrides.conf Active: active (running) since Thu 2024-10-10 17:01:28 CST; 1h 27min ago Invocation: deba7c4bc088459d997fe1f2585c924b Docs: man:bluetoothd(8) Main PID: 708 (bluetoothd) Status: "Running" IP: 0B in, 0B out IO: 2.7M read, 0B written Tasks: 1 (limit: 8419) Memory: 3.5M (peak: 3.8M) CPU: 38ms CGroup: /system.slice/bluetooth.service └─708 /nix/store/ws1na8bi7zfxyab31s3110y5x4z6nzgs-bluez-5.76/libexec/bluetooth/bluetoothd -f /etc/bluetooth/main.conf
Oct 10 17:01:28 nixos bluetoothd[708]: src/plugin.c:init_plugin() System does not support bap plugin Oct 10 17:01:28 nixos bluetoothd[708]: src/plugin.c:init_plugin() System does not support bass plugin Oct 10 17:01:28 nixos bluetoothd[708]: src/plugin.c:init_plugin() System does not support mcp plugin Oct 10 17:01:28 nixos bluetoothd[708]: src/plugin.c:init_plugin() System does not support vcp plugin Oct 10 17:01:28 nixos bluetoothd[708]: profiles/audio/micp.c:micp_init() D-Bus experimental not enabled Oct 10 17:01:28 nixos bluetoothd[708]: src/plugin.c:init_plugin() System does not support micp plugin Oct 10 17:01:28 nixos bluetoothd[708]: src/plugin.c:init_plugin() System does not support ccp plugin Oct 10 17:01:28 nixos bluetoothd[708]: src/plugin.c:init_plugin() System does not support csip plugin Oct 10 17:01:28 nixos bluetoothd[708]: Bluetooth management interface 1.23 initialized Oct 10 17:01:28 nixos systemd[1]: Started Bluetooth service.
[alice@nixos:~]$ uname -asr Linux nixos 6.11.0-rc2 #1-mobile-nixos SMP Tue Jan 1 00:00:00 UTC 1980 aarch64 GNU/Linux
[alice@nixos:~]$ dmesg |grep bluetooth
[alice@nixos:~]$
@MatthewCroughan the logs as above used phosh UI. but can not provide plasma UI's logs. there is difference between phosh & plasma of the tfa98xx. even copy tfa98xx.cnf to /lib/firmware or /usr/lib/firmware folder. and cp ucm2 folder to /usr/share/alsa/, it can not be recognized. Before used Kernel 5.19, tfa98xx can be recognized but still not work. And also tested the gnome UI . can not go to login screen. And want to use for tty UI of buffyboard. the hkdm.service do not know how to include in build configuration file. it can be enable from phosh.
tfa98xx.cnt from https://github.com/J0SH1X/tfa98xx/blob/mainline/tfa98xx.cnt?raw=true to /usr/lib/firmware
ucm2 folder from https://gitlab.com/donreddy/alsa-ucm-conf/-/tree/master/ to /usr/share/alsa
https://gitlab.com/sdm845-mainline/alsa-ucm-conf/-/commit/aaa7889f7a6de640b4d78300e118457335ad16c0
Fix assert in PulseAudio 17.0 caused by same device name in multiple ucm configs
Updated devices: oneplus-enchilada, oneplus-fajita and xiaomi-beryllium
PulseAudio 17.0 introduced a different mapping of ucm config to pulse profiles.
The current profile caused an Assertion 'dev == data->device' error, which resulted in audio being broken on sdm845 devices.
The error seems to be caused by the Mic device having the same name in both HiFi.conf and VoiceCall.conf.
Renaming Mic to Mic1 in HiFi.conf, running alsaucm reload and rebooting the phone fixed the audio issue.
Reference:
I think that bluetooth may have been broken by this. Is there anyone who can confirm or deny?
I think that bluetooth may have been broken by this. Is there anyone who can confirm or deny?
What are you observing that makes you state that?
What have you tried, and what makes you doubt either way?
(Questions to help the next person who can maybe confirm or deny based on what you've experienced.)
@samueldr
user: matthew 🌐 phone in ~ took 11s
❯ hciconfig
hci0: Type: Primary Bus: UART
BD Address: 39:90:21:74:07:00 ACL MTU: 0:0 SCO MTU: 0:0
DOWN RAW
RX bytes:361 acl:0 sco:0 events:49 errors:0
TX bytes:226498 acl:0 sco:0 commands:918 errors:0
user: matthew 🌐 phone in ~
❯ bluetoothctl
Waiting to connect to bluetoothd...[bluetooth]# Agent registered
[bluetooth]# power on
No default controller available
[bluetooth]# devices
No default controller available
[bluetooth]# list
[bluetooth]#
Despite a good looking kernel log, the device doesn't show up via bluetoothctl
[root@phone:/home/matthew]# dmesg | grep -i bluetooth
[ 0.265501] Bluetooth: Core ver 2.22
[ 0.265527] NET: Registered PF_BLUETOOTH protocol family
[ 0.265534] Bluetooth: HCI device and connection manager initialized
[ 0.265544] Bluetooth: HCI socket layer initialized
[ 0.265552] Bluetooth: L2CAP socket layer initialized
[ 0.265574] Bluetooth: SCO socket layer initialized
[ 0.451689] Bluetooth: HCI UART driver ver 2.3
[ 0.451698] Bluetooth: HCI UART protocol H4 registered
[ 0.451722] Bluetooth: HCI UART protocol LL registered
[ 0.451796] Bluetooth: HCI UART protocol Broadcom registered
[ 0.451813] Bluetooth: HCI UART protocol QCA registered
[ 0.451830] Bluetooth: HCI UART protocol Marvell registered
[ 0.484380] Bluetooth: RFCOMM TTY layer initialized
[ 0.484389] Bluetooth: RFCOMM socket layer initialized
[ 0.484403] Bluetooth: RFCOMM ver 1.11
[ 0.484417] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 0.484423] Bluetooth: BNEP filters: protocol multicast
[ 0.484430] Bluetooth: BNEP socket layer initialized
[ 0.484436] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[ 0.484445] Bluetooth: HIDP socket layer initialized
[ 6.365165] Bluetooth: hci0: setting up wcn399x
[ 6.959065] Bluetooth: hci0: QCA Product ID :0x0000000a
[ 6.959070] Bluetooth: hci0: QCA SOC Version :0x40010214
[ 6.959072] Bluetooth: hci0: QCA ROM Version :0x00000201
[ 6.959074] Bluetooth: hci0: QCA Patch Version:0x00000001
[ 6.969594] Bluetooth: hci0: QCA controller version 0x02140201
[ 6.969599] Bluetooth: hci0: QCA Downloading qca/crbtfw21.tlv
[ 7.913095] Bluetooth: hci0: QCA Downloading qca/oneplus6/crnv21.bin
[ 8.049175] Bluetooth: hci0: QCA setup on UART is completed
Attempting to up the interface with hciconfig reports this error
[root@phone:/home/matthew]# sudo hciconfig hci0 up
Can't init device hci0: Operation not supported (95)
Right, and I suppose you mean that with the previous kernel build, and everything else the same, it works? (Just double-checking assumptions.)
Yes, I had all the functionality expected of the device working on 6.4.0 from this repo. Though it is a bit hard to test, as I've begun using my minimal sway config which uses getty, where you're expected to login via logind, and spawn sway by typing sway, and there's GPU rendering bugs on 6.4 that prevent that from being usable. I don't have access to a USB keyboard at OGGCamp at the moment either. will investigate more when I get home! :)
The wifi is not great here at the oggcamp venue, so I've been building 24.05 for a while, just to investigate whether it's userspace causing the issue.
I'm not sure what ever caused this to work out of the box in the first place when first investigating mobile-nixos, but the issue with bluetooth was resolved by following https://wiki.postmarketos.org/wiki/Qualcomm_Snapdragon_845/850_(SDM845/SDM850)#Bluetooth, specifically running this script that they suggest:
#!/bin/sh
SERIAL=$(grep -o "serialno.*" /proc/cmdline | cut -d" " -f1)
BT_MAC=$(echo "$SERIAL-BT" | sha256sum | awk -v prefix=0200 '{printf("%s%010s\n", prefix, $1)}')
BT_MAC=$(echo "$BT_MAC" | cut -c1-12 | sed 's/\(..\)/\1:/g' | sed '$s/:$//')
btmgmt -i hci0 power off
btmgmt -i hci0 public-addr "$BT_MAC"
bluetooth needs a temporary valid random mac on boot, and in pmOS they use bootmac to do this during boot I discovered after chatting with them in the sdm845-mainline matrix channel.
[hid the bluetooth discussion, continued in #748]
Maybe it's just anecdotal, but 6.11 is a lot more unstable than expected, and I get a lot more crashdumps than usual. I couldn't do my usual demos this way. I will test further and bisect more.
Maybe it's just anecdotal, but 6.11 is a lot more unstable than expected, and I get a lot more crashdumps than usual. I couldn't do my usual demos this way. I will test further and bisect more.
Might be unrelated but 6.11 also has issues on the Steam Deck LCD (it crashes or panics, it just freezes for me)
I've been running 6.11 for a while, and it is pretty stable as far as interacting with this device goes. No big issues I can identify. Will be worth merging this. I'll try rebasing it later.
I don't know if you can update to 6.13-rc2 ? https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/5902