Dell XPS 17 9700

Enable Javascript to display Table of Contents.

Audio on Ubuntu 2020.10

I recently upgraded from 2020.04, where I got the audio running with the links below. With 2020.10 I needed the following steps:

For Ubuntu 2020.10 which comes with a Linux Kernel v5.8, I needed soundwire 1.4:
git clone https://github.com/maaarghk/soundwire-dkms
cd soundwire-dkms
git checkout latest-sofproject
cd ..
sudo mv soundwire-dkms /usr/src/soundwire-1.4.0
sudo dkms add soundwire/1.4.0
sudo dkms build soundwire/1.4.0
sudo dkms install soundwire/1.4.0
I guess I will have to repeat the steps above, whenever a new Kernel is installed.

The files coming with the packet linux-firmware must be replaced by the content of sof-firmware-1.6-2-any.pkg.tar.zst (mainly files of the lib folder).

#wget https://www.archlinux.de/download/extra/os/x86_64/sof-firmware-1.6-2-any.pkg.tar.zst
wget http://tardis.tiny-vps.com/aarm/packages/s/sof-firmware/sof-firmware-1.6-2-any.pkg.tar.xz
tar xf sof-firmware-1.6-2-any.pkg.tar.*
sudo mv /usr/lib/firmware/intel/sof /usr/lib/firmware/intel/sof.bak
sudo mv /usr/lib/firmware/intel/sof-tplg /usr/lib/firmware/intel/sof-tplg.bak
sudo cp -r usr/lib/firmware/intel/sof/v1.6 /usr/lib/firmware/intel/sof
sudo cp -r usr/lib/firmware/intel/sof-tplg-v1.6/ /usr/lib/firmware/intel/sof-tplg

It seems that the replacement of /usr/share/alsa/ucm2/sof-soundwire is not needed - on my Xubuntu 2020.10 it is working even without. To be sure to have the original distro files, I run sudo apt reinstall alsa-ucm-conf.

Source: isopr0p Redit Post, Mark's Blog, Howto Ubuntu on Redit
answer here when solved: https://askubuntu.com/questions/1308884/how-to-install-ubuntu-20-10-on-the-new-xps-17-9700


check here to get it solved:
 - https://wiki.archlinux.org/title/Dell_XPS_17_(9700)#Audio
 - https://askubuntu.com/questions/1270442/no-sound-on-xps-17-9700
 - https://askubuntu.com/questions/1256825/no-sound-on-ubuntu-20-04-dell-xps-7390-realtek-alc3271-intel-corporation-de
 - https://itectec.com/ubuntu/ubuntu-no-sound-on-xps-17-9700/
 - https://www.reddit.com/r/Dell/comments/hteg2c/ubuntudebian_audio_with_the_dell_xps_9700_progress/
 - https://forums.linuxmint.com/viewtopic.php?t=339927

- https://blog.fts.scot/2020/07/04/dell-xps-2020-how-to-get-audio-working-on-linux/

Make Touchpad working after Suspend

After returning from suspend scripts in the folder /lib/systemd/system-sleep are executed. So create a new script there (e.g. name it fix_touchpad) and fill it with the following content:
#!/bin/sh

case $1 in
	pre)
		;;
	post)
		synclient Touchpadoff=0
		echo "Set 'Touchpadoff' to zero." | systemd-cat -t fix_touchpad -p info
		;;
esac
Finally make it executable (e.g. by running chmod 755 /lib/systemd/system-sleep/fix_touchpad. Then perform suspend and wakeup, and check if your script was executed:
$ journalctl -e | grep fix_touchpad
Dec 16 06:14:04 XPS-17-9700 fix_touchpad[4900]: Set 'Touchpadoff' to zero.

Hibernate on Lid-Close

First call script on LID close and LID open ACPI events:
$ cat /etc/acpi/events/notebook-lid-close 
event=button/lid LID close
action=/etc/acpi/handle-lid-event.sh close
$
$ cat /etc/acpi/events/notebook-lid-open 
event=button/lid LID open
action=/etc/acpi/handle-lid-event.sh open
$ 
The script itself performs some actions on close/open:
#!/bin/sh
#
# Hibernate
#

NAME=handle-lid-event
#echo "lid $@" | systemd-cat -t $NAME -p info

if [ "$1" = "close" ] ; then
	# Rotate fans so that successful hibernate is audible
	smbios-thermal-ctl --set-thermal-mode=cool-bottom
	# Log hibernate
	/usr/lib/systemd/system-sleep/monitor_sleep pre hibernate

	# Perform hibernate
	echo disk > /sys/power/state
fi

if [ "$1" = "open" ] ; then
	# Log return from hibernate
	/usr/lib/systemd/system-sleep/monitor_sleep post hibernate
	# Reset fan speed
	smbios-thermal-ctl --set-thermal-mode=balanced

	# Activate touchpad
	synclient Touchpadoff=0
fi