-
-
Save ctsdownloads/caf111d5c0e7c7839e5c7e9378930368 to your computer and use it in GitHub Desktop.
| # This is for 12th Gen ONLY. | |
| # Copy the entire text block below, paste into the terminal, press enter and type your | |
| user's password as prompted. | |
| # This will: | |
| # - Update your Ubuntu install's packages. | |
| # - Install the recommended OEM kernel. Now recommending a new OEM kernel. | |
| # - Workaround needed to get the best suspend battery life for SSD power drain. | |
| # - Disable the ALS sensor so that your brightness keys work. | |
| # - Enable improved fractional scaling support for Ubuntu's GNOME environment using Wayland. | |
| # - Enable headset mic input. | |
| ## *****COPY AND PASTE THIS CODE BELOW***** | |
| sudo apt update && sudo apt upgrade -y && sudo apt-get install linux-oem-22.04c && echo "options snd-hda-intel model=dell-headset-multi" | sudo tee -a /etc/modprobe.d/alsa-base.conf && gsettings set org.gnome.mutter experimental-features "['scale-monitor-framebuffer']" && sudo sed -i 's/^GRUB_CMDLINE_LINUX_DEFAULT.*/GRUB_CMDLINE_LINUX_DEFAULT="quiet splash module_blacklist=hid_sensor_hub nvme.noacpi=1"/g' /etc/default/grub && sudo update-grub && | |
| echo "[connection]" | sudo tee /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf && echo "wifi.powersave = 2" | sudo tee -a /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf | |
| ## *****COPY AND PASTE THIS CODE ABOVE***** | |
| ## then press enter key, password, reboot. | |
| # If you would rather enter the commands individually instead: | |
| ## Updating packages. | |
| sudo apt update && sudo apt upgrade -y | |
| ## Install the recommended OEM kernel. | |
| sudo apt install linux-oem-22.04c | |
| ## Enable headset mic input. | |
| echo "options snd-hda-intel model=dell-headset-multi" | sudo tee -a /etc/modprobe.d/alsa-base.conf | |
| ## Enable improved fractional scaling support for Ubuntu's GNOME environment using Wayland. | |
| gsettings set org.gnome.mutter experimental-features "['scale-monitor-framebuffer']" | |
| ## Disable the ALS sensor so that your brightness keys work, 12th gen only. | |
| sudo gedit /etc/default/grub | |
| ## Append the following to the GRUB_CMDLINE_LINUX_DEFAULT="quiet splash section. | |
| GRUB_CMDLINE_LINUX_DEFAULT="quiet splash module_blacklist=hid_sensor_hub" | |
| ## Then run | |
| sudo update-grub | |
| ## Workaround needed to get the best suspend battery life for SSD power drain. | |
| sudo gedit /etc/default/grub | |
| ## Append the following to the GRUB_CMDLINE_LINUX_DEFAULT="quiet splash section. | |
| GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nvme.noacpi=1" | |
| ## Then run | |
| sudo update-grub | |
| ## Preventing wifi drop offs. | |
| sudo gedit /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf | |
| ## Change 3 into a 2 | |
| wifi.powersave = 2 | |
| # Sudo with your fingerprints. | |
| ## To run sudo in a terminal with the fingerprint reader, you need to run this command in a terminal and follow the prompts. | |
| sudo pam-auth-update | |
| ## Also, if you've previously enrolled fingerprints in Windows or another Linux distro, you may find that fingerprint enrollment errors until you manually force clear the stored fingerprints. | |
| https://knowledgebase.frame.work/en_us/fingerprint-enrollment-rkG6YP7xF | |
| ## Additional ways to extend battery life can be found at this link: https://community.frame.work/t/linux-battery-life-tuning/6665. | |
Okay, we can accomplish the \n effect with the following:
echo "[connection]" | sudo tee /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf && echo "wifi.powersave = 2" | sudo tee -a /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf
This produces:
[connection]
wifi.powersave = 2
I'll be adding this shortly after some quick testing. But straight to the terminal, on its own, works well.
Confirmed working in a real-time test, updating now.
Thanks!
It looks like as of now the Ubuntu 22.04 download defaults to the HWE release, 22.04.2, which ships with kernel 5.19. linux-oem-22.04 will just install an older kernel version:
$ uname -r
5.19.0-35-generic
$ apt install --dry-run linux-oem-22.04
...
The following additional packages will be installed:
linux-headers-5.17.0-1028-oem linux-headers-oem-22.04 linux-image-5.17.0-1028-oem linux-image-oem-22.04 linux-modules-5.17.0-1028-oem linux-oem-5.17-headers-5.17.0-1028
Suggested packages:
fdutils linux-oem-5.17-tools
The following NEW packages will be installed:
linux-headers-5.17.0-1028-oem linux-headers-oem-22.04 linux-image-5.17.0-1028-oem linux-image-oem-22.04 linux-modules-5.17.0-1028-oem linux-oem-22.04 linux-oem-5.17-headers-5.17.0-1028
0 upgraded, 7 newly installed, 0 to remove and 0 not upgraded.
I'm not totally sure I understand the Ubuntu release cadence, but from what I can tell the linux-oem-22.04 package isn't going to get further updates, so it might make sense to remove it from the instructions?
We're on OEM releases by design, updated to linux-oem-22.04c
Would be nice to use
echo -e '[configure]\n<rest of the stuff>in the wifi powersaving config command is on purpose (or at least signal that the newline is intentional).I was without wifi for a bit because I mistakenly deleted the newline thinking it was unintentional formatting, which caused NetworkManger to crash...
Also the wifi command isn't in the individual snippets.