Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Ubuntu 18.04 Linux kernel settings for Dell Latitude 7480
#!/bin/bash
sudo apt-get update
sudo apt-get install --install-recommends linux-generic-hwe-18.04 xserver-xorg-hwe-18.04
sudo mkdir /etc/default/grub.d
# adjust i915 related kernel parameters
# references for different settings:
# intel_iommu=igfx_off - https://bugs.archlinux.org/task/55629
# intel_idle.max_cstate=4
# i915.enable_rc6=0 setting no more exists in 5.x kernel and the workaround stopped working (https://bugs.freedesktop.org/show_bug.cgi?id=105962),
# the workaround is intel_idle.max_cstate=4, https://bugs.freedesktop.org/show_bug.cgi?id=103229#c20
# i915.enable_psr=0 - https://hobo.house/2018/05/18/fix-for-intel-i915-gpu-freeze-on-recent-linux-kernels/
# i915.enable_fbc=0 - https://wiki.archlinux.org/index.php/intel_graphics#Framebuffer_compression_.28enable_fbc.29
# i915.enable_guc=2 - https://wiki.archlinux.org/index.php/intel_graphics#Enable_GuC_/_HuC_firmware_loading
echo 'GRUB_CMDLINE_LINUX="$GRUB_CMDLINE_LINUX intel_iommu=igfx_off intel_idle.max_cstate=4 i915.enable_psr=0 i915.disable_power_well=1 i915.enable_fbc=0 i915.enable_guc=2"' | sudo tee /etc/default/grub.d/i915.cfg
# pass "Linux" in acpi_osi parameter (For some HW a value like "Windows 2012" might be more appropriate, ref http://iam.tj/prototype/enhancements/Windows-acpi_osi.html)
echo 'GRUB_CMDLINE_LINUX="$GRUB_CMDLINE_LINUX acpi_osi=Linux"' | sudo tee /etc/default/grub.d/acpi.cfg
# disable unnecessary memory optimization in Linux for desktop usage, save some CPU cycles since khugepaged won't need to run
echo 'GRUB_CMDLINE_LINUX="$GRUB_CMDLINE_LINUX transparent_hugepage=never"' | sudo tee /etc/default/grub.d/thp_disable.cfg
# adjust cgroup settings for docker
echo 'GRUB_CMDLINE_LINUX="$GRUB_CMDLINE_LINUX cgroup_enable=memory swapaccount=1"' | sudo tee /etc/default/grub.d/cgroup.cfg
sudo update-grub
@Cabus1982
Copy link

Cabus1982 commented Apr 8, 2021

Excellent data, I have a 7480 and was looking for something like that. By the way does it currently apply? because this was created 2 years ago, thanks

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