How I fixed my IdeaPad 1 15IAU7 very weird performance behavior ON FEDORA KDE 44
Before I begin, I'm a total Linux noob. If I get something wrong please correct me, and if you can contribute to this somehow, please do so! Also this guide is made specifically for FEDORA KDE 44 since it's the distro I use...
I've always had some weird performance "issues" (honestly just weird general behavior) when it came to games on linux. I have an IdeaPad 1 15IAU7 with I5 1235U, 24GB of ram and Intel iris xe. I know I shouldn't expect too much from a setup like that (specially from a laptop), but I can get a good experience out of light and moderate gaming on windows, unlike Linux.
- What even was the problem? Every time I'd try to game on Linux (on Fedora KDE 44 which is the distro I currently use for almost a year) I'd get kinda frustrated because the general framerate on games was bad when compared to windows. I didn't expected it to be better or something like that, but I was getting almost 70% less fps in some games... Zelda BOTW on cemu to be more specific, which was running at 23 fps on Fedora compared to 40-50 fps on windows in the same area!
I'm using Intel p-state (active) with HWP. changing governors from powersave to performance would actually make things even worse: on powersave frequency was usually limited to 1,3ghz (because turbo boost was off) and on performance the frequency would be able to go up but the fps was horrible. I thought it was an autocpu-freq problem, but not really?
Before begging I'd like to point out that throttled and auto-cpufreq with my custom configuration provided the most noticeable overall performance improvements. Switching from i915 to the experimental xe driver also helped, typically giving me around 5–7 additional FPS in my tests. Switching to the CachyOS kernel and applying it's addons made not noticeable difference to me honestly.
Anyway, here's what I did to fix performance issues (or at least mitigate the problem):
- Installed CachyOS kernel + addons (not really necessary but may be beneficial): I originally only did this because of a problem I was having with Kingdom Hearts 1.5+2.5 Remix on Fedora in which I tried switching to cachyos and it was able to play the game normally. And so, I decided to use the cachyOS kernel + addons on fedora. You can easily find tutorials explaining how to install it, but it's not hard to follow the official fedora copr link I've attached here.
- X.X.X is the version of the current cachyOS kernel.
You can check if it's installed just by doing sudo grubby --info ALL. You're gonna see /boot/vmlinuz-X.X.X-cachyos1.fc44.x86_64 somewhere if it's installed.
You can easily set the cachyOS kernel as you default kernel with sudo grubby --set-default /boot/vmlinuz-X.X.X-200.fc44.x86_64 (basically copying the path of the cachyOS kernel gave by the output of the first command)
Then reboot and check your default kernel with sudo grubby --default-kernel.
If you see /boot/vmlinuz-X.X.X-cachyos1.fc44.x86_64 at the output, it worked.
- Switched from i915 to XE driver (EXPERIMENTAL): Doing this actually improved my performance quite a bit. the official intel compatibility table for i915 and XE drivers states that the Intel Iris Xe only officially supports the i195 drivers. doing lspci -nnk | grep -A3 -Ei 'VGA|3D| shows Kernel modules: i915, xe. So, even though the official documentation only states support for i915, Xe can be used. A quote from the Arch wiki Intel graphics page:
>First-generation Intel Arc GPUs (Alchemist Arc A-series discrete GPUs) and Xe-based integrated GPUs in Tiger Lake, Rocket Lake, and Alder Lake processors are officially supported by the i915 driver, but can also be run with the newer experimental Xe driver.
so you if you have Tiger Lake (2020 11th gen mobile processor), Rocket Lake (2021 11th gen desktop processor) or Alder Lake (2021-2022 12th gen mobile and desktop processor) you can use the Xe driver in an experimental way. Newer cpus will PROBABLY (doesn't hurt to search for xe driver your cpu) have official support to it. Anyway, here's a detailed guide about how you can force the use of the XE drivers on fedora, way better than anything I could explain here. Just skip the "install kernel 6.18" step.
- Install Throttled w/ custom settings + setting Thermald on adptive mode: This is the setp that helped the most. Throttled is a Linux daemon that can help you prevent CPU throttle on some Intel cpus. It's the closest thing to throttlestop (freaking incredible tool for windows) available on linux afaik. The installation process is very simple as stated on their github page. The thing that matters the most is editing the config file with sudo nano /etc/throttled.conf since it's where we can set the pl1/pl2 and the trip temp. I didn't mess with the Battery profile since I only play with the AC plugged, so on the AC profile I've changed this:
preview.redd.it
I've only messed with pl1/2 and trip temp. Don't blindly copy my settings, this is what worked for me. You need to search for information on your cpu regarding the maximum power limit value, see what values work for you (will heavily depend if your cooling system is good), look up the TJMAX value of your cpu (basically the thermal limit), thermal limits imposed by you manufacturer and search for tests on google or test yourself (you can look up throttlestop posts about your cpu, even though it's a windows tool it has the same functionalities as throttled). BTW, you can find the majority of this information on techpowerup. Just google techpowerup + the name of your cpu. Example with mine:
preview.redd.it
Now, about the thermald on adaptive mode, the throttled github page says that thermald can conflict with throttled, but you shouldn't simply disable it since some setups work better with thermald --adaptive. So basically you need to test what's best for you, in my case thermald on adaptive works nice so I'll just stay with that (I'm gonna test with it disabled later).
- This is very optinal: install and tweak auto-cpufreq: I've installed this tool called auto-cpufreq because it manages cpu frequencies and governors automatically. Also, it helped immensely with my battery duration. The installation process is very straight forward, you can easily follow the github page. After installing it, just do a sudo auto-cpufreq --install to install and enable the daemon. Now to the tweaking (you can first test to see if the default configuration will work for you, if it does you can skip the tweaking part): The thing is that, the default auto-cpufreq configuration behaves very weirdly with my hardware: higher frequencies and performance governor will make the fps worse, and lower frequencies with the powersave governor. There's even a github issue about this. Throttled does help with this, but I found that making a custom config file helps even more (the github page explains better how to set up a custom configuration). The folder where you installed auto-cpufreq will contain an exemple of auto-cpufreq.conf-exemple. Open the file and you can mess with the configuration. Again, I only messed with the charger part since I only game with with a charger connected. What I changed:
- governor = performance
- energy_performance_preference = performance
- energy_perf_bias = performance
- platform_profile = performance
- scaling_min_freq = 2000000 ----btw this is just 2ghz on khz, the value needs to be in khz.
and that was it. Now you just need to rename the file from auto-cpufreq.conf-exemple to auto-cpufreq.conf and copy it to /etc/ with sudo cp /path/of/your/file.conf /etc/auto-cpufreq.conf replacing /path/of/your/file.conf with the actual path of your file. It's not the only way to do this, but in my opinion it's the most foolproof.
You can confirm if you settings are working with sudo auto-cpufreq --stats
preview.redd.it
VERY IMPORTANT: IF WHEN YOU UNCOMMENT LINES, DO NOT ADD SPACES BETWEEN THE MARGIN AND THE TEXT. EVERY UNCOMMENTED LINE SHOULD BE LIKE THIS:
preview.redd.it
NOT LIKE THIS:
preview.redd.it
IF YOU ADD SPACES BETWEEN THE MARGIN AND THE TEXT, AUT-CPUFREQ WILL NOT APPLY THE VALUES YOU'VE SET
And that's it for now, I'll be updating this post if I find something new. Just for a metric, my fps on BOTW on cemu went from 23 to 40 on the same area as before. It's now closer to windows.
3 points · 5 comments
Mentions
How I fixed my IdeaPad 1 15IAU7 very weird performance behavior ON FEDORA KDE 44 Before I begin, I'm a total Linux noob. If I get something wrong please correct me, and if you can contribute to this somehow, please do so! Also this guide is made specifically for FEDORA KDE 44 since it's the distro I use... I've always had some weird performance "issues" (honestly just weird general behavior) when it came to games on linux. I have an IdeaPad 1 15IAU7 with I5 1235U, 24GB of ram and Intel iris xe. I know I shouldn't expect too much from a setup like that (specially from a laptop), but I can get a good experience out of light and moderate gaming on windows, unlike Linux. - What even was the problem? Every time I'd try to game on Linux (on Fedora KDE 44 which is the distro I currently use for almost a year) I'd get kinda frustrated because the general framerate on games was bad when compared to windows. I didn't expected it to be better or something like that, but I was getting almost 70% less fps in some games... Zelda BOTW on cemu to be more specific, which was running at 23 fps on Fedora compared to 40-50 fps on windows in the same area! I'm using Intel p-state (active) with HWP. changing governors from powersave to performance would actually make things even worse: on powersave frequency was usually limited to 1,3ghz (because turbo boost was off) and on performance the frequency would be able to go up but the fps was horrible. I thought it was an autocpu-freq problem, but not really? Before begging I'd like to point out that throttled and auto-cpufreq with my custom configuration provided the most noticeable overall performance improvements. Switching from i915 to the experimental xe driver also helped, typically giving me around 5–7 additional FPS in my tests. Switching to the CachyOS kernel and applying it's addons made not noticeable difference to me honestly. Anyway, here's what I did to fix performance issues (or at least mitigate the problem): - Installed CachyOS kernel + addons (not really necessary but may be beneficial): I originally only did this because of a problem I was having with Kingdom Hearts 1.5+2.5 Remix on Fedora in which I tried switching to cachyos and it was able to play the game normally. And so, I decided to use the cachyOS kernel + addons on fedora. You can easily find tutorials explaining how to install it, but it's not hard to follow the official fedora copr link I've attached here. - X.X.X is the version of the current cachyOS kernel. You can check if it's installed just by doing sudo grubby --info ALL. You're gonna see /boot/vmlinuz-X.X.X-cachyos1.fc44.x86_64 somewhere if it's installed. You can easily set the cachyOS kernel as you default kernel with sudo grubby --set-default /boot/vmlinuz-X.X.X-200.fc44.x86_64 (basically copying the path of the cachyOS kernel gave by the output of the first command) Then reboot and check your default kernel with sudo grubby --default-kernel. If you see /boot/vmlinuz-X.X.X-cachyos1.fc44.x86_64 at the output, it worked. - Switched from i915 to XE driver (EXPERIMENTAL): Doing this actually improved my performance quite a bit. the official intel compatibility table for i915 and XE drivers states that the Intel Iris Xe only officially supports the i195 drivers. doing lspci -nnk | grep -A3 -Ei 'VGA|3D| shows Kernel modules: i915, xe. So, even though the official documentation only states support for i915, Xe can be used. A quote from the Arch wiki Intel graphics page: >First-generation Intel Arc GPUs (Alchemist Arc A-series discrete GPUs) and Xe-based integrated GPUs in Tiger Lake, Rocket Lake, and Alder Lake processors are officially supported by the i915 driver, but can also be run with the newer experimental Xe driver. so you if you have Tiger Lake (2020 11th gen mobile processor), Rocket Lake (2021 11th gen desktop processor) or Alder Lake (2021-2022 12th gen mobile and desktop processor) you can use the Xe driver in an experimental way. Newer cpus will PROBABLY (doesn't hurt to search for xe driver your cpu) have official support to it. Anyway, here's a detailed guide about how you can force the use of the XE drivers on fedora, way better than anything I could explain here. Just skip the "install kernel 6.18" step. - Install Throttled w/ custom settings + setting Thermald on adptive mode: This is the setp that helped the most. Throttled is a Linux daemon that can help you prevent CPU throttle on some Intel cpus. It's the closest thing to throttlestop (freaking incredible tool for windows) available on linux afaik. The installation process is very simple as stated on their github page. The thing that matters the most is editing the config file with sudo nano /etc/throttled.conf since it's where we can set the pl1/pl2 and the trip temp. I didn't mess with the Battery profile since I only play with the AC plugged, so on the AC profile I've changed this: preview.redd.it I've only messed with pl1/2 and trip temp. Don't blindly copy my settings, this is what worked for me. You need to search for information on your cpu regarding the maximum power limit value, see what values work for you (will heavily depend if your cooling system is good), look up the TJMAX value of your cpu (basically the thermal limit), thermal limits imposed by you manufacturer and search for tests on google or test yourself (you can look up throttlestop posts about your cpu, even though it's a windows tool it has the same functionalities as throttled). BTW, you can find the majority of this information on techpowerup. Just google techpowerup + the name of your cpu. Example with mine: preview.redd.it Now, about the thermald on adaptive mode, the throttled github page says that thermald can conflict with throttled, but you shouldn't simply disable it since some setups work better with thermald --adaptive. So basically you need to test what's best for you, in my case thermald on adaptive works nice so I'll just stay with that (I'm gonna test with it disabled later). - This is very optinal: install and tweak auto-cpufreq: I've installed this tool called auto-cpufreq because it manages cpu frequencies and governors automatically. Also, it helped immensely with my battery duration. The installation process is very straight forward, you can easily follow the github page. After installing it, just do a sudo auto-cpufreq --install to install and enable the daemon. Now to the tweaking (you can first test to see if the default configuration will work for you, if it does you can skip the tweaking part): The thing is that, the default auto-cpufreq configuration behaves very weirdly with my hardware: higher frequencies and performance governor will make the fps worse, and lower frequencies with the powersave governor. There's even a github issue about this. Throttled does help with this, but I found that making a custom config file helps even more (the github page explains better how to set up a custom configuration). The folder where you installed auto-cpufreq will contain an exemple of auto-cpufreq.conf-exemple. Open the file and you can mess with the configuration. Again, I only messed with the charger part since I only game with with a charger connected. What I changed: - governor = performance - energy_performance_preference = performance - energy_perf_bias = performance - platform_profile = performance - scaling_min_freq = 2000000 ----btw this is just 2ghz on khz, the value needs to be in khz. and that was it. Now you just need to rename the file from auto-cpufreq.conf-exemple to auto-cpufreq.conf and copy it to /etc/ with sudo cp /path/of/your/file.conf /etc/auto-cpufreq.conf replacing /path/of/your/file.conf with the actual path of your file. It's not the only way to do this, but in my opinion it's the most foolproof. You can confirm if you settings are working with sudo auto-cpufreq --stats preview.redd.it VERY IMPORTANT: IF WHEN YOU UNCOMMENT LINES, DO NOT ADD SPACES BETWEEN THE MARGIN AND THE TEXT. EVERY UNCOMMENTED LINE SHOULD BE LIKE THIS: preview.redd.it NOT LIKE THIS: preview.redd.it IF YOU ADD SPACES BETWEEN THE MARGIN AND THE TEXT, AUT-CPUFREQ WILL NOT APPLY THE VALUES YOU'VE SET And that's it for now, I'll be updating this post if I find something new. Just for a metric, my fps on BOTW on cemu went from 23 to 40 on the same area as before. It's now closer to windows.
@EDWAN02 @Li0nel_Hutz @delinq_el @lionel_hutz I believe it's all said in the "Please note" section for the $cpufreq donation method: github.com/AdnanHodzic/auto-cpufreq/blob/master/R… I'll keep developing and maintaining auto-cpufreq: Automatic CPU speed & power optimizer for Linux. Separately, and as outlined above, I have no influence over $cpufreq future since I didn't create it. But I'll continue passively collecting the GitHub rewards linked to it as a sponsorship method.
@Li0nel_Hutz @delinq_el @delinq_el @lionel_hutz if you're referring to $cpufreq token, it's still listed as one of auto-cpufreq project "Financial donation" options: github.com/AdnanHodzic/auto-cpufreq/blob/master/R…
auto-cpufreq v3.2.0 is here! Release notes: github.com/AdnanHodzic/auto-cpufreq/releases auto-cpufreq is now available in the official Debian Linux repositories (unstable & testing), and it will soon propagate to future Ubuntu releases and hundreds of other derivatives. This release also brings new features, bug fixes, and other improvements to help Linux users optimize CPU speed and battery life automatically. Project status: ⭐ 7800+ GitHub stars 👥 126 contributors 💻 100k+ users 🛠️ 51 releases Huge thanks to everyone who contributed to making this release possible! ❤️
auto-cpufreq v3.2.0 is here! 🚀 github.com/AdnanHodzic/auto-cpufreq/releases auto-cpufreq is now available in the official Debian Linux repositories (unstable & testing), and it will soon propagate to future Ubuntu releases and hundreds of other derivatives. This release also brings new features, bug fixes, and other improvements to help Linux users optimize CPU speed and battery life automatically. Project status: ⭐ 7800+ GitHub stars 👥 126 contributors 💻 100k+ users 🛠️ 51 releases Huge thanks to everyone who contributed to making this release possible! ❤️