This widget could not be displayed.
This widget could not be displayed.
cancel
Showing results for 
Search instead for 
Did you mean: 

Linux on Zenbook S 13 OLED ?

AeolusOne
Star II
System: Zenbook S 13 OLED
Battery or AC: N/A
Model: UM5302TA
Frequency of occurrence: Always
Reset OS: N/A
Screenshot or video: N/A
========================
Detailed description:I recently bought the Zenbook S 13 OLED and wanted to try out linux on it but couldn't manage to make it work because the internal keyboard wasn't working and maybe wifi but can't confirm since my keyboard isn't working. I tried manjaro linux xfce,kde,gnome (kernel 5.15) as well as popOS and Ubuntu 22.04 and the result is the same, the keyboard just doesn't work but apart from that and numpad i think everything else is working. I must mention that the keyboard does work in grub but not linux for some reason. I tried changing the keyboard layout (nothing). I also notice that apperently @Blueskull managed to run linux with kernel 5.19 and didn't mention any keyboard problems in his post about usb4 bios request. I need to run linux for my studies, does anyone know of a solution ?
PS: I do not have a spare keyboard or an ethernet cable.
15 REPLIES 15

IhorIvanov
Star I
Dear @Blueskull,
Is there any chance that ASUS engineers can fix BIOS ACPI tables, so it will report correct IRQ logic to the kernel?
Maybe we should ask ASUS engineers to fix the keyboard problem by the BIOS update.

Maks2002
Star II
Unfortunately, I have the same issues with my new UM5302TA laptop and Kubuntu 22.04LTS. Keyboard, speakers, microphone, Bluetooth, web camera, fingerprint neither of those work. 
I'm using my old Asus ASUS ZenBook 13 UX331UAL with Kubuntu and I have had too many troubles when I tried to install Linux on this laptop a few years ago.
Asus engineers, crap, why do you use so non-standard solutions with the basic things like keyboard or audio.

Maks2002
Star II
Blueskull

You can install Linux on your laptop without wired LAN or keyboard. The process is tricky, though.

First, you need to know why the KB doesn't work. The KB controller was not implemented in the CPU/PCH, but in the EC. The EC emulated an i8042 KB controller, and talks to the host over LPC interface. The EC generated a high-enable interrupt signal while Linux kernel, by default, expects a low-enable interrupt signal, hence the kernel never gets triggered by the KB controller.

The kernel, however, is capable of being triggered by positive IRQ signals, you just have to tell it to anticipate positive IRQ signal. This can be done in a few ways, one of them being adding a quirk in the kernel. A quirk is a device-specific workaround in kernel codebase, aimed to solve a particular problem on a particular device, rather than solving its root cause. Proper quirk was added since Linux 6.0rc1, but I guess you can't wait for this.

Another solution is to tell the kernel in ACPI table that this device has a positive IRQ logic, which is what the BIOS is supposed to do, but apparently it failed to do so. Do not worry, you can construct a DSDT (differentiated system description table) to trick the kernel that the BIOS has reported IRQ positive, so the kernel can anticipate that.

To do so, you first need another computer and use that computer to create a Linux installation disc, in this case, I use Ubuntu 22.04, which comes with 5.15 kernel. Once you've dd'ed the ISO to the flash drive, you will see a Ubuntu partition and a writable partition. Use a partition editor (Disks or GParted, etc.) to create another partition at the end of the drive, doesn't have to be large, 100MiB should be fine, use FAT32 or ext4. In the newly created partition, copy the attached file I provided (modified DSDT image). You don't have to trust me on the security of the file, you can make one later on your own once you have a working keyboard.

Then, press F12 to boot from flash drive in UEFI mode, do NOT let it boot Linux just now, you need to halt the booting process in grub. Go to command line mode, the type ls to list partitions. You should see a list of partitions, like (gptx,hdy). By default, grub only lists your boot drive, so you should only see partitions on your flash drive. The last one (with largest y number in hdy) is the newly created one, and is the one containing the DSDT override file. Press ESC to go back to grub menu. Then choose Install Ubuntu, and edit the command line. You should see a line specifying initrd, modify this line, prepend (gptx,hdy)/acpi_override before the actual initrd filename. You should have something like "initrd (gpt0,hd4)/acpi_override initrd.img-5.15.xxxx", then boot (CTRL+x).

Once you've installed Linux, do NOT reboot. You will need to copy your acpi_override file to your newly installed Linux OS, to the /boot folder. I forgot what the mounting point it is, but you can figure that out using mount -l (lower case L) command. The remove the flash drive and reboot.

Now, you should be able to boot from your own hard drive, but your KB should still not be working. You need to, again, pause the boot process by pressing shift, and edit your grub command line. Prepend acpi_override before your initrd file like we've done before. This time since it is in the /boot folder, you no longer need to specify the partition. Hit CTRL+x to boot.

In your newly installed OS, use a text editor (nano, etc.) to edit /etc/default/grub, you will need sudo privilege. After GRUB_CMDLINE_LINUX="" add a new line "GRUB_EARLY_INITRD_LINUX_CUSTOM=acpi_override". Then, execute sudo update-grub. This will update your grub with ACPI override, and will make sure on every subsequent grub updates (installed new kernel module, new kernel version, etc.) the ACPI override is applied.

Now, if you have doubt on the security of my provided file, you can create your own by following the Reddit thread "Keyboard in Multiple Ryzen 6000 Laptops Not Functional", the first post posted by user shifty-phil is the one I followed. If you can read Chinese or have someone who can translate for you, the first link in his post should also be followed. It has a myriad of valuable information on improving Linux experience on Ryzen 6000 series laptops.

That's it. I hope you enjoy your new laptop.

File: bit dot ly slash 3BbYmnK


View post
Thank you for your posts. I found the original post you mentioned on Reddit and I get back to work the keyboard on my Asus UM5302TA. It was tricky.
So I updated my kernel to 5.19.11, overrode the IRQ, and updated the grub. And finally, the keyboard begins to work. The URL is https: // www.reddit.com/r/linuxhardware/comments/vdc6tz/keyboard_in_multiple_ryzen_6000_laptops_not/
But. I can't get apply patch from "ArchLinux AUR repo um5302ta-linux" to get work speakers. For undefined reason Mainline kernel source does not have the files need to be updated. So, will appreciate if anyone did it and provide some instructions.

UPD: with Kernel 6.0.0rc7 get to work BlueTooth.

Blueskull
Star III
Patch sound/pci/hda/cs35l41_hda.c, sound/pci/hda/patch_realtek.c and sound/soc/amd/yc/acp6x-mach.c.
The first file overrides DSD check, which allows laptops without a proper DSD to enable speakers.
The second file overrides I2C control path, so your computer knows how to control speaker amp in the first place.
The third file tells the digital microphone driver that your computer has a DMIC, so the microphones can work.
As for BT, it works out of the box for me since RC2.
A word of caution: amdgpu support for 6000 series built-in GPU is not very stable to say at least. When using with external monitors, expect a few crashed per day. This seems to alleviate a lot since RC6 (so far for 2 weeks on RC6 and RC7, I've only experienced once), older RCs can be hella unstable.

Maks2002
Star II
Blueskull

Patch sound/pci/hda/cs35l41_hda.c, sound/pci/hda/patch_realtek.c and sound/soc/amd/yc/acp6x-mach.c.

The first file overrides DSD check, which allows laptops without a proper DSD to enable speakers.

The second file overrides I2C control path, so your computer knows how to control speaker amp in the first place.

The third file tells the digital microphone driver that your computer has a DMIC, so the microphones can work.

As for BT, it works out of the box for me since RC2.

A word of caution: amdgpu support for 6000 series built-in GPU is not very stable to say at least. When using with external monitors, expect a few crashed per day. This seems to alleviate a lot since RC6 (so far for 2 weeks on RC6 and RC7, I've only experienced once), older RCs can be hella unstable.


View post
Thank you for your guideline.
I understand what a patch is (we apply changes into the kernel src, and then compile the kernel, and finally install a new kernel). The problem is that the Kernel sources does not contains "sound/pci/hda/cs35l41_hda.c" or "sound/soc/amd/yc/acp6x-mach.c" files. I have the "/usr/src/linux-headers-6.0.0-060000rc7-generic/sound/pci/hda/" directory but there are "Kconfig" and "Makefile" only. Just to remind, I use Kubuntu 22.04 and installed Kernel using Mainline. Will appreciate some advice on where I missed.
I also use the external monitor connected via DP (type-c to type-c). For several days I use my laptop for work I have had no crashes at all. I use RC7 kernel installed using Mainline.