[GUIDE] Configuring Garuda Linux for Laptop

Garuda Linux by default is configured for to provice the best performance out of the box on Desktop. Naturally this will cause problems if you're trying to use Garuda on a laptop. So follows a basic guide to what you can do to both configure and tune Garuda to run on your laptop.

Before we begin ensure your system is up-to-date with a good old fashioned -Syu run.

sudo pacman -Syu

This will ensure you have no issues down the line due to conflicts between older and newer packages.
You can use pamac better known as Add/Remove Software to do everything and it will take care of updating for you if you're not comfortable with the terminal yet. If you do encounter an error consider searching the forum as other people may have already found the solution. It helps keep the forum clean and organized.

Step 1:
First we start with removing the performance-tweaks and gamemode packages from your install.

pacman -R performance-tweaks gamemode

These make your hardware run at their peak performance all the time which is not possible on a laptop and will cause it to overheat which usually leads to a crash.

Step 2: Out of the box, part of the garuda customization is that it ships with linux-zen kernel. This in similar fashion is not optimized for laptop use so must be removed. However since we are talking about the kernel you want to ensure you have another installed first before you remove your only one.

By default Garuda ships with only the zen kernel. If you're reading this for a fresh install Garuda Setup Assistant will ask you to install from a selection of kernels and you can use that. Just select linux and linux-lts from the options.

Otherwise install the linux and linux-lts kernel from your installer of choice. Below we are using pacman like the rest of this guide.

sudo pacman -S linux linux-lts

The linux and linux-lts kernels are better suited for laptop use as they have no tweaks. Ideally you want to be on the linux kernel for gaming as it has the latest and greatest performance improvements, however sometimes things break and if you don't have the time to look into it you can simply boot using the lts kernel and that usually solves the issue. Alternatively you could just use lts and not bother with the bleeding edge one.

The zen kernel is tuned for max performance as well and is mainly targeted at desktops. So it needs to be removed. Since we have two other kernels installed now we can safely remove it.

sudo pacman -R linux-zen

Step 3: Now that Garuda's tweaks have been removed we will need to install a few packages to manage the CPU and keep it from overheating and crashing the system.

sudo pacman -S auto-cpufreq thermald 

While they are downloading lets go through them one by one:

auto-cpufreq: This package as the name implies will throttle your CPU down when it reaches a set temperature threshold. This is vital for doing any intensive task on your laptop if you're running linux. It ensures you get the best performance without overheating your laptop. Once installed simply enable and start the service with systemctl.

sudo systemctl enable auto-cpufreq.service
sudo systemctl start auto-cpufreq.service

You can check what its doing with auto-cpufreq --stats to ensure its running properly.

thermald: This package as the name implies helps to regulate your system temperature by monitoring system temps and using available cooling methods to keep your laptop from overheating.
Once again lets enable and start it through systemctl

sudo systemctl enable thermald.service
sudo systemctl start thermald.service

More information can be found through its man page man thermald.
Once started it will take care of everything on its own. Cool! (pun intended)

On top of all this Garuda also has a package of tweaks for powersaving on laptops aptly named powersave-tweaks that you can install.

This guide is suitable for every laptop uptil this point. Now lets move onto laptops with dGPUs. I will be focusing on NVIDIA gpus because those are the only laptops I have. If you own an AMD dGPU feel free to reply to this post with your input.

Step 4: For laptops using optimus gpus you will need to first install the nvidia drivers.

sudo pacman -S nvidia nvidia-lts nvidia-prime nvidia-utils

nvidia-dkms is optional if you're running a custom kernel. However afaik there isn't a kernel that is tuned for laptop use yet so for now we don't need to worry about it.

Once that is done we need to install optimus-manager and optimus-manager-qt

sudo pacman -S optimus-manager optimus-manager-qt

optimus-manager This package will allow you to quickly swap between three modes of operation on your laptop: intel, hybrid and nvidia.

Intel mode will completely turn your nvidia gpu off making it inaccessible to the system.

Hybrid mode uses the intel gpu for everything. However you can use prime-run to run games or other high-performance applications on the dGPU.

Nvidia will only use the dGPU for everthing.

Once again use systemctl to enable and start the service.

sudo systemctl enable optimus-manager.service
sudo systemctl start optimus-manager.service

optimus-manager-qt This provides a handy little indicator in your notification bar to easily tell what mode you are running on. It also proivdes a settings ui to manage optimus-manager.

You can access teh settings by right-clicking on the icon and choosing settings.

In the settings first ensure launch at startup is ticked. Then click on optimus and you can choose which mode to startup in from startup mode option.

Most important however is to goto Nvidia tab and setting dynamic power management from No to Fine. This ensure the behaviour mentioned above for Hybrid mode.

That is all! Congratulations ! Now your garuda setup is optimized for laptop use. All of these tools can be configured and customized to your liking so be sure to check out their respective pages. I will add and update this guide as much as I can overtime. Thanks!

TODO: Add powertop and laptop mode tools.

11 Likes

and with Garuda, you run linux-zen by default, so you should use dkms.

2 Likes

Well done.
I would like also to suggest you to compare pstate-frequency against auto-cpufreq.
For me tThe main advantage of pstate-frequency is that one can tweak CPU min/max for each governor, while that is not possible with auto-cpufreq without patching their scripts...

give it a try if you like.

2 Likes

I will look into it.

Edit: I have looked into it and it seems like a manual and more configurable version of auto-cpufreq. I will need to use it myself and see if it is better to include it in the guide as the hands off nature of auto-cpufreq is more appealing to me for now. I am aware that it only switches the governor based on load and not individual frequencies so that side of pstate-frequency is appealing to me.

3 Likes

Thanks for the heads up ! I competely forgot that Garuda uses zen since I uninstalled it ages ago.

2 Likes

If you computer has intel turbo boost you can leave some of these tweaks on.

In my experience on a i7 9750H I could only play valheim after removing everything I stated. I guess I should elaborate on the fact that some of these tweaks can be kept if you have a CPU without too much heat output.

2 Likes

I applied those settings except nvidia ones coz my laptop doesn't have nvidia's gpu. And I sometimes bump into cpu frequency drop to 0.4GHz(minimum). The cpu is usually 2.4GHz. I guess it happens after rebooting (auto-cpufreq fails working?)

I wanna know how to change the freq back to 2.4GHz. Rebooting again is one of the solutions but it's a little annoying. I have no idea to prevent from this in advance.

Here is auto-cpufreq --stats result.

------------------------------ Current CPU stats ------------------------------

CPU max frequency: 2300 MHz
CPU min frequency: 400 MHz

Core    Usage   Temperature     Frequency
CPU0:    32.7%     42 °C      400 MHz
CPU1:    38.1%     43 °C      400 MHz
CPU2:    45.2%     42 °C      400 MHz
CPU3:    39.2%     43 °C      400 MHz

---------------------------- CPU frequency scaling ----------------------------

Battery is: charging

Setting to use: "performance" governor

Total CPU usage: 4.0 %
Total system load: 1.14
Average temp. of all cores: 42.5 °C

Load optimal
setting turbo boost: off
Warning: Changing CPU turbo is not supported. Skipping.

-------------------------------------------------------------------------------

"auto-cpufreq" refresh in: 1

In my experience auto-cpufreq will keep your cpu at minimum speeds when its not under load. Are you experiencing performance drops because of this? Seems you're not doing much on the CPU from the stats.

1 Like

FireDragon is way slower than usual when the frequency is low. I keep watching conky showing cpu freq and usage as well as temp. the usage reaches high, temperature stays low and frequency keeps minimum.

I use firefox with a lot of tabs and I have yet to experience any problems. Please provide inxi -Fxxxa output.

The situation doesn't change. CPU usage is sticked on 100% and frequency crowls the bottom.

System:    Host: takeshi-garuda Kernel: 5.10.33-1-lts x86_64 bits: 64 compiler: gcc v: 10.2.0 
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-lts root=UUID=2f0e4133-dd23-4545-92f0-082ddf7a35b3 
rw rootflags=subvol=@ quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0 
systemd.unified_cgroup_hierarchy=1 loglevel=3 
Desktop: KDE Plasma 5.21.4 tk: Qt 5.15.2 info: latte-dock wm: kwin_x11 vt: 2 dm: SDDM 
Distro: Garuda Linux base: Arch Linux 
Machine:   Type: Laptop System: Dell product: Inspiron 15-3567 v: N/A serial: <superuser required> 
Chassis: type: 9 serial: <superuser required> 
Mobo: Dell model: 033HWX v: A00 serial: <superuser required> UEFI: Dell v: 2.9.0 
date: 01/17/2019 
Battery:   ID-1: BAT0 charge: 39.4 Wh (100.0%) condition: 39.4/41.4 Wh (95.0%) volts: 15.9 min: 14.8 
model: SMP DELL GR43778 type: Li-ion serial: 13105 status: Full 
CPU:       Info: Dual Core model: Intel Core i3-7020U bits: 64 type: MT MCP arch: Amber/Kaby Lake 
note: check family: 6 model-id: 8E (142) stepping: 9 microcode: DE cache: L2: 3 MiB 
flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 18399 
Speed: 400 MHz min/max: 400/2300 MHz Core speeds (MHz): 1: 400 2: 400 3: 400 4: 400 
Vulnerabilities: Type: itlb_multihit status: KVM: VMX disabled 
Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable 
Type: mds mitigation: Clear CPU buffers; SMT vulnerable 
Type: meltdown mitigation: PTI 
Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl and seccomp 
Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization 
Type: spectre_v2 
mitigation: Full generic retpoline, IBPB: conditional, IBRS_FW, STIBP: conditional, RSB filling 
Type: srbds mitigation: Microcode 
Type: tsx_async_abort status: Not affected 
Graphics:  Device-1: Intel vendor: Dell driver: i915 v: kernel bus-ID: 00:02.0 chip-ID: 8086:5921 
class-ID: 0300 
Device-2: Realtek Integrated_Webcam_HD type: USB driver: uvcvideo bus-ID: 1-5:2 
chip-ID: 0bda:5769 class-ID: 0e02 serial: 200901010001 
Display: x11 server: X.Org 1.20.11 compositor: kwin_x11 driver: loaded: intel 
unloaded: modesetting alternate: fbdev,vesa display-ID: :0 screens: 1 
Screen-1: 0 s-res: 3286x1080 s-dpi: 96 s-size: 868x285mm (34.2x11.2") s-diag: 914mm (36") 
Monitor-1: eDP1 res: 1366x768 hz: 60 dpi: 102 size: 340x190mm (13.4x7.5") diag: 389mm (15.3") 
Monitor-2: HDMI1 res: 1920x1080 hz: 60 dpi: 92 size: 530x300mm (20.9x11.8") diag: 609mm (24") 
OpenGL: renderer: Mesa Intel HD Graphics 620 (KBL GT2F) v: 4.6 Mesa 21.0.3 direct render: Yes 
Audio:     Device-1: Intel Sunrise Point-LP HD Audio vendor: Dell driver: snd_hda_intel v: kernel 
alternate: snd_soc_skl bus-ID: 00:1f.3 chip-ID: 8086:9d71 class-ID: 0403 
Sound Server-1: ALSA v: k5.10.33-1-lts running: yes 
Sound Server-2: JACK v: 0.125.0 running: no 
Sound Server-3: PulseAudio v: 14.2 running: yes 
Sound Server-4: PipeWire v: 0.3.26 running: yes 
Network:   Device-1: Qualcomm Atheros QCA9377 802.11ac Wireless Network Adapter vendor: Dell 
driver: ath10k_pci v: kernel port: f040 bus-ID: 01:00.0 chip-ID: 168c:0042 class-ID: 0280 
IF: wlp1s0 state: down mac: 3e:f1:4d:84:ab:5d 
Device-2: Realtek RTL810xE PCI Express Fast Ethernet vendor: Dell driver: r8169 v: kernel 
port: e000 bus-ID: 02:00.0 chip-ID: 10ec:8136 class-ID: 0200 
IF: enp2s0 state: up speed: 100 Mbps duplex: full mac: 6c:2b:59:41:c5:db 
Bluetooth: Device-1: Qualcomm Atheros type: USB driver: btusb v: 0.8 bus-ID: 1-8:4 chip-ID: 0cf3:e009 
class-ID: e001 
Report: bt-adapter ID: hci0 rfk-id: 0 state: up address: 28:3A:4D:5B:2B:44 
Drives:    Local Storage: total: 119.24 GiB used: 17.34 GiB (14.5%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/sda maj-min: 8:0 vendor: SK Hynix model: SC311 SATA 128GB size: 119.24 GiB
block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s rotation: SSD
serial: MS8AN63791CC8AQ2C rev: 0P10 scheme: GPT
Partition: ID-1: / raw-size: 118.99 GiB size: 118.99 GiB (100.00%) used: 17.34 GiB (14.6%) fs: btrfs
dev: /dev/sda2 maj-min: 8:2
ID-2: /boot/efi raw-size: 256 MiB size: 252 MiB (98.46%) used: 546 KiB (0.2%) fs: vfat
dev: /dev/sda1 maj-min: 8:1
ID-3: /home raw-size: 118.99 GiB size: 118.99 GiB (100.00%) used: 17.34 GiB (14.6%) fs: btrfs
dev: /dev/sda2 maj-min: 8:2
ID-4: /var/log raw-size: 118.99 GiB size: 118.99 GiB (100.00%) used: 17.34 GiB (14.6%)
fs: btrfs dev: /dev/sda2 maj-min: 8:2
ID-5: /var/tmp raw-size: 118.99 GiB size: 118.99 GiB (100.00%) used: 17.34 GiB (14.6%)
fs: btrfs dev: /dev/sda2 maj-min: 8:2
Swap:      Kernel: swappiness: 10 (default 60) cache-pressure: 75 (default 100)
ID-1: swap-1 type: zram size: 948.8 MiB used: 66.4 MiB (7.0%) priority: 32767 dev: /dev/zram0
ID-2: swap-2 type: zram size: 948.8 MiB used: 66.2 MiB (7.0%) priority: 32767 dev: /dev/zram1
ID-3: swap-3 type: zram size: 948.8 MiB used: 67.2 MiB (7.1%) priority: 32767 dev: /dev/zram2
ID-4: swap-4 type: zram size: 948.8 MiB used: 67 MiB (7.1%) priority: 32767 dev: /dev/zram3
Sensors:   System Temperatures: cpu: 49.0 C mobo: 49.0 C
Fan Speeds (RPM): cpu: 0
Info:      Processes: 251 Uptime: 17m wakeups: 25 Memory: 3.71 GiB used: 2.85 GiB (76.8%) Init: systemd
v: 248 tool: systemctl Compilers: gcc: 10.2.0 clang: 11.1.0 Packages: pacman: 1596 lib: 460
Shell: fish v: 3.2.1 running-in: konsole inxi: 3.3.04

failed to take a screen shot with firefox opening 8 tabs but you can see the stats on conky.

Do you have powersave-tweaks enabled or tlp, or powertop? How are the temps?

No I don't. So I try enabling them with garuda assistant. but at TLP, options acpi_call, tp_smapi and x86_energy_pref_policy appeared. Which should I choose?

You shouldn't need to. I think this might be a different problem.

Maybe look into this? Search the forum then try elsewhere. Maybe check dmesg output or journalctl . In between those two its usually easy to diagnose the problem.

I found this in dmesg

[   30.275359] intel_pstate: Turbo disabled by BIOS or unavailable on processor

But there is no setting related to cpu turbo in my BIOS.

I give up and roll back to the snapshot taken before Step1.

I guess the point is the order of installing linux (and its lts) and removing performance-tweaks but I have no energy to try and see this. I can't be patient any more, sorry.

Thanks for your dedicated support, Khsh01.

lovely DeLL :laughing: !
go to BIOS and choose performance.

I went to BIOS and Performance category and I found "Intel SpeedStep" feature that describes below.

  • Disabled = Places the processor into the highest performance state and prevents the intel SpeedStep applet or native operating system driver from adjusting the processor's performance.
  • Enabled = Allows the Intel SpeedStep-enabled CPU to operate in multiple performance states.

Before rolling back, I tried switching this setting disabled and enabled. But the situation didn't change.

Other BIOS settings in Performance category are "Multi Core Support", "C-States Control(cpu sleep setting when idle)" and "HyperThread control". They seems they don't affect the cpu freqency.

Anyway, I've just rolled back to the stable snapshot using linux-zen. The performance is quite stable.

1 Like

good to know you got it stable, I was laughing about DeLL is that because in my computer BIOS, setting performance (turbo) is under Power->Thermal Management.

I would love to have a talk with their engineers :slight_smile:

1 Like

Knowing Dell they might have removed it in a bios update for all you know.