Skip to content

Instantly share code, notes, and snippets.

@guilhem
Last active May 28, 2022 06:09
Show Gist options
  • Save guilhem/db3cd89e83ca3ab0e7bae472ad86fa2f to your computer and use it in GitHub Desktop.
Save guilhem/db3cd89e83ca3ab0e7bae472ad86fa2f to your computer and use it in GitHub Desktop.
Optimization for Dell XPS 13 7390 2-in-1 on Ubuntu 19.10 (2019-10-27)

Bios

Disable:

  • thunderbolt → wakeup from suspend (fix in 5.4)
  • fingerprint → no driver for Goodix Fingerprint
  • camera → no driver for Intel AVStream Camera

Services

Disable:

  • iio-sensor-proxy.service → bug in kernel spam logs when using sensors
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash mitigations=off mem_sleep_default=deep acpi_osi=Linux"
options dell-smm-hwmon ignore_dmi=1
blacklist psmouse
options i915 enable_fbc=1 enable_guc=3 enable_dc=2 enable_psr=1 enable_dpcd_backlight=1 fastboot=1 disable_power_well=0
export LIBVA_DRIVER_NAME=iHD
[Unit]
Description=Disable hissing sound with headphones
After=pulseaudio.service
PartOf=pulseaudio.service
[Service]
Type=oneshot
ExecStart=amixer -c PCH cset 'name=Headphone Mic Boost Volume' 1
[Install]
WantedBy=pulseaudio.service
SUBSYSTEM=="power_supply", DRIVERS=="ac", ATTR{type}=="Mains", TAG+="systemd", ENV{SYSTEMD_ALIAS}="/sys/subsystem/power_supply/main_AC", ENV{SYSTEMD_READY}="$env{POWER_SUPPLY_ONLINE}"
#!/bin/bash
set -xeu -o pipefail
resolution="$1"
scale="$2"
function get_serial() {
serial="$(gdbus call --session --dest org.gnome.Mutter.DisplayConfig \
--object-path /org/gnome/Mutter/DisplayConfig \
--method org.gnome.Mutter.DisplayConfig.GetResources | awk '{print $2}' | tr -d ',')"
echo $serial
}
serial=$(get_serial)
gdbus call --session --dest org.gnome.Mutter.DisplayConfig \
--object-path /org/gnome/Mutter/DisplayConfig \
--method org.gnome.Mutter.DisplayConfig.ApplyMonitorsConfig \
$serial 1 "[(0, 0, $scale, 0, true, [('eDP-1', '$resolution', [] )] )]" "[]"
[Unit]
StopWhenUnneeded=yes
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/local/bin/change-resolution 3840x2400@59.994422912597656 2
ExecStop=/usr/local/bin/change-resolution 1920x1200@59.885101318359375 1
[Install]
WantedBy=sys-subsystem-power_supply-main_AC.device
@guilhem
Copy link
Author

guilhem commented Feb 21, 2020

Using TLP + kernel 5.5+ can also improve a lot

@dkout
Copy link

dkout commented Mar 17, 2020

Has anyone had luck with getting the webcam working? I would imagine it should not be very hard given it works on the 2020 version of the dell xps 13 developer edition which has incredibly similar hardware. Any ideas on how we might use that driver?

@spotlesscoder
Copy link

Has anyone had luck with getting the webcam working? I would imagine it should not be very hard given it works on the 2020 version of the dell xps 13 developer edition which has incredibly similar hardware. Any ideas on how we might use that driver?

I'd also really really love to use the webcam on the 2019 model.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment