Setting up Linux Mint in Acer Swift 3 (SF314-42)

Write tutorials for Linux Mint here
More tutorials on https://github.com/orgs/linuxmint/discu ... /tutorials and (archive) on https://community.linuxmint.com/tutorial
Forum rules
Don't add support questions to tutorials; start your own topic in the appropriate sub-forum instead. Before you post read forum rules
Post Reply
myuser123123123
Level 1
Level 1
Posts: 4
Joined: Thu Jan 18, 2024 9:32 am

Setting up Linux Mint in Acer Swift 3 (SF314-42)

Post by myuser123123123 »

About
This is a thread where I will attempt to list out all the problems I had with setting Linux Mint on this laptop. Some of which were solved and some of which I still am looking to fix. I will continue to update this post with new information as I figure them out. Also keep note that I currently run Linux Mint Cinnamon 21.3 and unless otherwise specified, I run X11 display server, not Wayland.

There is a very good chance these may have already been fixed. Do not fix what is not broken. If the problems listed here do not apply in your case, ignore them

Another pro tip, apply these fixes one at a time, that way you will know if some fixes introduced some other problems and revert if necessary. I encountered and fixed these issues I am writing and I have not faced any such weird side effects. But again, things may change in the future.
Installation
Nothing special to add here, its the usual way of installing
Everything is too small
This is because you need to enable HiDPI Scaling. I have only done this in Linux Mint Cinnamon edition and unsure how it can be done in their other editions (if it can even be done) On Cinnamon try the following;
[*] Go to Display from the Main Menu
[*] Select Settings Tab and enable "Enable Fractional Scaling Controls"
[*] Go to the Layout Tab and you can set the Monitor Scale to 125%
Touchpad is too sensitive/insensitive (libinput)
For Touchpad mouse speed, You can go to System Settings > Mouse and Touchpad > Touchpad(tab) and adjust speed

For Touchpad scroll speed, you can check out my other post here: viewtopic.php?t=412052
[TLDR: You need to add Option "ScrollPixelDistance" "40" to /usr/share/X11/xorg.conf.d/40-libinput.conf under where it says Identifier "libinput touchpad catchall"]
Example(Notice the third section):

Code: Select all

Section "InputClass"
        Identifier "libinput pointer catchall"
        MatchIsPointer "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Section "InputClass"
        Identifier "libinput keyboard catchall"
        MatchIsKeyboard "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Section "InputClass"
        Identifier "libinput touchpad catchall"
        MatchIsTouchpad "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
	Option "ScrollPixelDistance" "40"
EndSection

Section "InputClass"
        Identifier "libinput touchscreen catchall"
        MatchIsTouchscreen "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Section "InputClass"
        Identifier "libinput tablet catchall"
        MatchIsTablet "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection
Suspend will actually shut down the computer
This part may void your warranty
Tested in Linux kernel version 5.19 and 6.5.0, it is still the same. This is because the laptop uses "Modern Standby" sleep method which seems to not be supported natively in Linux(upto this point) The best solution is to switch to "S3 Sleep" mode. Unfortunately, this is not available from the default set of options provided by Acer UEFI setup. Luckily, you can use this github project https://github.com/lbschenkel/acer-sf314_43-acpi-fix to boot from a flash drive and fix it. The instructions are available in the project readme which is pretty simple. You can use the included "Disks" application to format a USB drive as FAT and proceed.
There is a very good reason why these settings were "hidden" from you, you will definately brick your computer if you are not careful. So only change what you know you should change and leave. There is no place for "What happens if I change it" curiosity
Cannot access the UEFI setup screen after the previous sleep mode fix
There is a bug in that tool where it will add whole bunch of "UEFI-Misc-*" enteries into your one time boot menu (F12 boot menu). You can boot using the tool, go to BootManager section and delete all those "UEFI-Misc-*" enteries, save the changes and now you should be able to go to UEFI settings. Again, it is very important that you do not touch what you do not understand.
AMD screen tearing
[*] Open /usr/share/X11/xorg.conf.d/10-radeon.conf
Add in Option "TearFree" "true" and Option "DRI" "3"
Example:

Code: Select all

Section "OutputClass"
	Identifier "Radeon"
	MatchDriver "radeon"
	Driver "radeon"
	Option "TearFree" "true"
	Option "DRI" "3"
EndSection
Enabling Hibernation
This is quiet simple, you just need to add the resume= in the list of kernel parameters. If you are using Grub(which is default in Linux Mint), you can add resume=/dev/sda5 [where sda5 is your swap partition] in your GRUB_CMDLINE_LINUX_DEFAULT. This will work even if your swap partition is in LVM or you are using a swap file. In case of LVM it becomes /dev/mapper/... and in case of swap file you are supposed to use the absolute path to the swap file from /. Dont forget to sudo update-grub
Using an alias Mac address
Ref: https://wiki.archlinux.org/title/MAC_address_spoofing The advantage/main reason for using an alias Mac address is that it can be used as your "nickname" of sort in that you can give that to your network provider who can assume it to be your Mac address that does not change even though it is actually not yours. It however does not prevent you being tracked because your fake mac address will still be unique to you. I have found the best option to use systemd.link method to change my Mac address.

Assume that the actual mac address is a1:b1:c1:d1:e1:f1 and you need to switch to a2:b2:c2:d2:e2:f2,
Then you would change /etc/systemd/network/01-mac.link as follows,

Code: Select all

[Match]
PermanentMACAddress=a1:b1:c1:d1:e1:f1

[Link]
MACAddress=a2:b2:c2:d2:e2:f2
You can set MACAddressPolicy=random instead to randomize it
"Skipping" Grub
You do not actually skip grub. Grub is your bootloader. Here by skip, I mean to just skip showing boot menu. Unlike in other distributions, to "skip" grub, you need to set grub timeout to 0.5. You can set
[*]GRUB_DEFAULT=0.5
[*]GRUB_TIMEOUT=0.5

In this case, you want to use the F12 boot menu to boot into other operating system rather than selecting that in GRUB.
Audio stutters/skips randomly in VLC
In VLC Media player, change Output Module to ALSA as,
[*] Tools -> Preferences
[*] Audio Tab
[*] Output Module: ALSA Output Module
Recommended to do but I dont truly understand the effects
I see these being recommended all the time, I dont really understand these fully but have no problem with these. These may help with some issues I have not experienced or something. But again, unlike previous enteries I do not fully understand what these do

Setting swappiness value to 10
In my understanding, it will set it such that swapping occures only after 90% RAM usage but its debated.
sudo nano /etc/sysctl.conf
Add

Code: Select all

vm.swappiness=10
Using Sound with Sound Open Firmware(Again, I have no idea about this)
As per this article: https://wiki.archlinux.org/title/Acer_S ... parameters
(And in case you are asking, the link from Acer swift 3 links to this Acer swift 5 page suggesting they should be pretty similar laptops where Swift 5 has a touchscreen at most)
Edit /etc/modprobe.d/swift5.conf and add the following

Code: Select all

options snd_sof_intel_hda_common hda_model=alc255-acer
Last edited by myuser123123123 on Fri Apr 19, 2024 12:54 pm, edited 6 times in total.
User avatar
SMG
Level 25
Level 25
Posts: 32007
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Setting up Linux Mint in Acer Swift 3 (SF314-42)

Post by SMG »

myuser123123123 wrote: Thu Feb 15, 2024 3:29 amSuspend will actually shut down the computer
Tested in Linux kernel version 5.19 and 6.5.0, it is still the same. This is because the laptop uses "Modern Standby" sleep method which seems to not be supported natively in Linux(upto this point) The best solution is to switch to "S3 Sleep" mode. Unfortunately, this is not available from the default set of options provided by Acer UEFI setup. Luckily, you can use this github project https://github.com/lbschenkel/acer-sf314_43-acpi-fix to boot from a flash drive and fix it. The instructions are available in the project readme which is pretty simple. You can use the included "Disks" application to format a USB drive as FAT and proceed.
The listed GitHub link makes no mention of suspend shutting down the computer. You seem to be confusing two different issues and making changes to the Acer UEFI (which is what that does). Making changes like that is not something one should just randomly do because you are changing the hardware instructions. You are messing with the BIOS/UEFI that Acer installed on your laptop and you have voided any warranty you might have.
myuser123123123 wrote: Thu Feb 15, 2024 3:29 amCannot access the UEFI setup screen after the previous sleep mode fix
There is a bug in that tool where it will add whole bunch of "UEFI-Misc-*" enteries into your one time boot menu (F12 boot menu). You can boot using the tool, go to BootManager section and delete all those "UEFI-Misc-*" enteries, save the changes and now you should be able to go to UEFI settings. Again, it is very important that you do not
You cannot access the UEFI set-up screen because you changed the BIOS/UEFI that Acer delivered with your computer.
myuser123123123 wrote: Thu Feb 15, 2024 3:29 amAMD screen tearing
[*] Open /usr/share/X11/xorg.conf.d/10-radeon.conf
Add in Option "TearFree" "true" and Option "DRI" "3"
Example:

Code: Select all

Section "OutputClass"
	Identifier "Radeon"
	MatchDriver "radeon"
	Driver "radeon"
	Option "TearFree" "true"
	Option "DRI" "3"
EndSection
The specs I found for an Acer Swift 3 (SF314-42) indicates it has a Ryzen APU which means it uses the amdgpu driver (and not the radeon) so this change does not apply to your computer.

myuser123123123 wrote: Thu Feb 15, 2024 3:29 amRecommended to do but I dont truly understand the effects
I see these being recommended all the time, I dont really understand these fully but have no problem with these. These may help with some issues I have not experienced or something. But again, unlike previous enteries I do not fully understand what these do

Setting swappiness value to 10
sudo nano /etc/sysctl.conf
Add

Code: Select all

vm.swappiness=10
Recommended by who? The standard recommendation is to leave swappiness at its default.
myuser123123123 wrote: Thu Feb 15, 2024 3:29 am Using Sound with Sound Open Firmware(Again, I have no idea about this)
As per this article: https://wiki.archlinux.org/title/Acer_S ... parameters
(And in case you are asking, the link from Acer swift 3 links to this Acer swift 5 page suggesting they should be pretty similar laptops where Swift 5 has a touchscreen at most)
Edit /etc/modprobe.d/swift5.conf and add the following

Code: Select all

options snd_sof_intel_hda_common hda_model=alc255-acer
LM21 versions use a much newer kernel than the one listed in that link and you should not be making the change you listed. SOF will be used without doing that.

Basic rule: If you don't understand a change, then leave the defaults as they are.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
myuser123123123
Level 1
Level 1
Posts: 4
Joined: Thu Jan 18, 2024 9:32 am

Re: Setting up Linux Mint in Acer Swift 3 (SF314-42)

Post by myuser123123123 »

Thanks for reply,

1: That sleep mode fix

Well, its not something I think should be done lightly as there is a very good reason Acer decided to hide those advanced settings away. But changing sleep mode to S3 sleep was necessary to fix it for me.

I do not know if this is only me. Some report laptop wont even suspend while some report suspend shuts down the computer. But one thing is clear, sleep mode has to be changed to s3 sleep in order for suspend to work as expected as of this point.

But I should still have put in that Warranty void warning in there. I will fix it quickly.

That github project is a fork of another project and the parent project mentions this issue of being unable to access UEFI settings again unless those redundant UEFI-Misc- enteries be removed which can be achived with the same bootable "OS?" that was used to change to S3 sleep. I will edit the post and write these warnings.

2: radeon vs amdgpu

I was myself confused and did not want to talk about it. But somehow implied in that example where I suggest to change DRI to 3 which seems to improve power and performance but since I did not experience issues changing amdgpu to radeon I did not take it too far.

That part about swappiness=10 as I was told uses 90% RAM before starts swapping into swap. So I decided to do it myself and wrote about it.

That part about SOF, Arch Wiki writes "In kernels after linux-5.10, audio with SOF (Sound Open Firmware) from Intel is fully working (speakers, jack, internal and external mics) with the following setup: " and I assume implies to do so after kernels 5.10

Everything I have written, I have also done myself and will change/update when something changes or I learn something new.
User avatar
SMG
Level 25
Level 25
Posts: 32007
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Setting up Linux Mint in Acer Swift 3 (SF314-42)

Post by SMG »

myuser123123123 wrote: Thu Feb 15, 2024 3:29 amThis is because the laptop uses "Modern Standby" sleep method which seems to not be supported natively in Linux(upto this point)
This is not a correct statement. Linux Mint most certainly does support "modern standby". I've shown many people who thought their computer was not going to sleep (because so much battery was being consumed) that it was going to sleep but the mode was S2idle and not S3.

If you check the link you provided (https://github.com/lbschenkel/acer-sf314_43-acpi-fix), you see that explained.
This laptop is designed for Windows and modern standby, and the firmware does not advertise S3 sleep state by default:

Code: Select all

# dmesg | grep ACPI | grep supports
kernel: ACPI: PM: (supports S0 S4 S5)

# cat /sys/power/mem_sleep
[s2idle]
This means that Linux never uses suspend-to-RAM but only suspend-to-idle which uses more battery power when sleeping.
That last statement should read "Linux never uses S3, but uses suspend to idle (S2idle). Both of those states suspend to RAM. Here is an explanation of What is the difference between (these four) sleep states?.
myuser123123123 wrote: Fri Apr 19, 2024 12:09 pm I do not know if this is only me. Some report laptop wont even suspend while some report suspend shuts down the computer. But one thing is clear, sleep mode has to be changed to s3 sleep in order for suspend to work as expected as of this point.
The issue with sleep not working is likely because of how Acer designed the BIOS/UEFI. I've seen others have to make changes in BIOS/UEFI for their laptops to sleep properly. And sometimes BIOS/UEFI updates fix these problems, but you cannot update yours after the change you made.

By the way, you did a nice job making clear what items are risky to do. :)
myuser123123123 wrote: Thu Feb 15, 2024 3:29 amAMD screen tearing
[*] Open /usr/share/X11/xorg.conf.d/10-radeon.conf
Add in Option "TearFree" "true" and Option "DRI" "3"
Example:

Code: Select all

Section "OutputClass"
	Identifier "Radeon"
	MatchDriver "radeon"
	Driver "radeon"
	Option "TearFree" "true"
	Option "DRI" "3"
EndSection
Please provide the output of inxi -Gx so I can show you that you are not using the radeon driver and this is not relevant to your install. See this post to see the difference with what you posted.
myuser123123123 wrote: Fri Apr 19, 2024 12:09 pm That part about swappiness=10 as I was told uses 90% RAM before starts swapping into swap.
How and when a system uses swap is not a simple process. If you really want to know the details, please read this What Is Swappiness on Linux? (and How to Change It).
Image
A woman typing on a laptop with LM20.3 Cinnamon.
Post Reply

Return to “Tutorials”