chromebook-linux-audio icon indicating copy to clipboard operation
chromebook-linux-audio copied to clipboard

Lenovo Thinkpad 300e Gen2 Debian failing to restore audio

Open brightresurgence opened this issue 11 months ago • 9 comments

Describe the bug A clear and concise description of what the bug is.

This script used to work without a hitch, but I recently had to reinstall my OS so I'm in a predicament here. The kernel installation popup no longer appears and when the script "completes" nothing happens anymore.

Boardname If you don't know where to find this, run cat /sys/class/dmi/id/product_name Octopus Logs Generate logs with wget https://raw.githubusercontent.com/chrultrabook/linux-tools/main/debugging.sh; bash debugging.sh and attach the output here.

#!/usr/bin/env bash printf 'Welcome.\nThis script will ask you for sudo password, which is necessary to extract required information.\n'

Get current username before escalating permissions

user=$USER

Get board name

board="$(cat /sys/class/dmi/id/product_name)"

Get current date and time

date="$(date +"%Y-%m-%d_%Hh%Mm")"

Specify where to store logs

logdir="debug-logs-$board-$date" logarchive="debug-logs-$board-$date.tar.gz"

Create directory to store logs

mkdir -p $logdir cd $logdir

Download cbmem and mark it as executable

wget https://mrchromebox.tech/files/util/cbmem.tar.gz &> /dev/null tar -xf cbmem.tar.gz rm cbmem.tar.gz chmod +x cbmem

Grab logs necessary for debugging audio

if [ ! -z '$(pgrep pulseaudio)' ] then # Get logs from pipewire systemctl --user stop pipewire.{socket,service} systemctl --user stop pipewire-pulse.{socket,service}

    if [ -z "$(which spa-acp-tool)" ]
    then
            printf 'spa-acp-tool not found. On distros using apt, install pipewire-bin\n'
            touch no-spaacptool
    fi

    for card in $(grep '\[' /proc/asound/cards | awk '{print $1}')
    do
            echo "Pipewire card $card log:" >> audio-debug.log
            spa-acp-tool -c $card -vvvv info &>> audio-debug.log
    done

    systemctl --user start pipewire.service
    systemctl --user start pipewire-pulse.service

else # Get logs from pulseaudio systemctl --user stop pulseaudio.{socket,service}

    echo "Pulseaudio log:" >> audio-debug.log
    pulseaudio -v &>> audio-debug.log & sleep 5
    killall pulseaudio

    systemctl --user start pulseaudio.service

fi

UCM logs

skip_ucm=0

if [ -z "$(which alsaucm)" ] then printf 'alsaucm not found. Please install alsa-utils.\n' touch no-alsautils skip_ucm=1 fi if [ -z "$(which strace)" ] then printf 'strace not found. Please install strace.\n' touch no-strace skip_ucm=1
fi

if [ "$skip_ucm" = "0" ] then for card in $(grep '[' /proc/asound/cards | awk '{print $1}') do echo "Alsa card $card UCM log:" >> alsa-ucm.log strace alsaucm -c hw:$card reload &>> alsa-ucm.log done fi

lsmod > loaded-modules.log find /lib/firmware > firmware.log

Priviledge escalation [!!!]

{ sudo su <<EOF

Grab logs and redirect output to files instead of stdout

dmesg >> dmesg.log

if [ -z "$(which lspci)" ] then printf 'lspci not found. Please install pciutils.\n' touch no-lspci else lspci -vvvnn >> lspci.log fi

if [ -z "$(which lsusb)" ] then printf 'lsusb not found. Please install usbutils.\n' touch no-lsusb else lsusb -v >> lsusb.log fi

if [ -z "$(which dmidecode)" ] then printf 'Dmidecode not found. Please install it.\n' touch no-dmidecode else dmidecode >> dmidecode.log fi

if [ -z "$(which libinput)" ] then printf 'libinput not found. Please install libinput utils.\n' touch no-libinput else libinput list-devices >> libinput.log fi

Copy ACPI tables

mkdir acpi cp /sys/firmware/acpi/tables/DSDT ./acpi/ cp /sys/firmware/acpi/tables/SSDT* ./acpi/

Grab coreboot logs

./cbmem -c > cbmem.log

Set file permissions for regular user

chown -R $user:$user * chmod -R 755 *

EOF } || { echo "Error: Unable to gain root permission. Log archive will be incomplete!" touch no-root }

Remove cbmem binary

rm cbmem

Pack logs into archive and remove temporary folder that stores them

cd .. tar -caf "$logarchive" "$logdir" rm -r "$logdir"

printf "Log collection done.\nPlease upload ${logarchive} for analysis.\n"

(Dumb question but am I meant to have pipewire installed?)

brightresurgence avatar Jan 27 '25 22:01 brightresurgence

Just a thought now but am I meant to use the chultrabook kernel instead of the standard one?

brightresurgence avatar Jan 27 '25 23:01 brightresurgence

Alright so I'm manually downloading the chultrabook kernel files so I'm hoping that it should do the job this time, so I guess the problem is mostly in regards to the kernel failing to install itself automatically.

brightresurgence avatar Jan 27 '25 23:01 brightresurgence

I remember someone saying the prebuilt kernel artifact expired. I guess it's that time once again to rebuild it. The problem is no chrultrabook maintainers really use debian so we kinda just forget about the kernel existing.

WeirdTreeThing avatar Jan 27 '25 23:01 WeirdTreeThing

Would you recommend switching to another OS? I could probably go to Endeavour or something, im just partial to debian because it's what I'm used to.

brightresurgence avatar Jan 27 '25 23:01 brightresurgence

Even using debian trixie would be better. But in general using a non-LTS distro is better for chromebooks where you need up-to-date software to have everything working properly.

WeirdTreeThing avatar Jan 27 '25 23:01 WeirdTreeThing

whats an LTS distro again and how would Trixie help?

brightresurgence avatar Jan 28 '25 00:01 brightresurgence

LTS distros like Debian, Ubuntu LTS, and the EL family hold back package updates for stability

If you wanna stay in the Debian ecosystem, Trixie like Tree mentioned, or Ubuntu interim releases are a good choice

nothingneko avatar Jan 28 '25 00:01 nothingneko

A few times I've installed something like ani-cli on the Trixie/Sid and it literally marks my entire KDE environment as well as network-manager for autoremoval. I've lost a few installs of Debian this way.

Is this a common thing? And are there any other threats of the sorts if I use the Trixie repo?

brightresurgence avatar Jan 28 '25 00:01 brightresurgence

oh yeah P.S having manually installed the chultrabook kernel, everything works INCLUDING the cros-keyboard-map thingy tree made. That was also busted before I got the kernel in order.

brightresurgence avatar Jan 28 '25 00:01 brightresurgence