LukeShortCloud / winesapOS

winesapOS - Game with Linux anywhere, no installation required!
GNU General Public License v3.0
871 stars 31 forks source link

[install][upgrade] Add ASUS ROG laptop support #814

Closed LukeShortCloud closed 3 months ago

LukeShortCloud commented 4 months ago

Things such as brightness control do not work on all ASUS ROG laptops. I know there is a project with Linux firmware files for ASUS devices. Those will work with the kernel-fsync Linux kernel.

Originally brought up: https://github.com/LukeShortCloud/winesapOS/discussions/813

Related: https://github.com/LukeShortCloud/winesapOS/issues/809

GuestSneezeOSDev commented 3 months ago

What are the spec's of the ASUS ROG laptop?

LukeShortCloud commented 3 months ago

Great question! I personally have a relatively new ASUS ROG laptop and it works great. However, there are minor issues with other devices out there.

What I specifically want to tackle in this GitHub Issue is the following:

GuestSneezeOSDev commented 3 months ago

isn't there like drivers for For Arch Linux based distro's like for example from here or use supergfxctl from aur or from here

LukeShortCloud commented 3 months ago

Thanks for pointing that out! Sure, we can include the asusctl, rog-control-center, and supergfxctl utilities.

The drivers and firmware are still coming from the ASUS Linux project you mentioned. linux-fsync pulls in the required patches from that project.

GuestSneezeOSDev commented 3 months ago

Also you havent added storage requirements in the README.md

LukeShortCloud commented 3 months ago

All the requirements, including storage, are listed here:

https://github.com/LukeShortCloud/winesapOS/tree/4.1.0-alpha.0?tab=readme-ov-file#requirements

Do you have any suggestions on where else I should list it?

GuestSneezeOSDev commented 3 months ago

everythings alright

LukeShortCloud commented 3 months ago

Good news, audio support for the latest ASUS ROG laptops is coming in upstream Linux 6.10. This will eventually make its way to our separate Linux LTS kernel (we ship two kernels: Nobara/Bazzite and LTS).

https://www.phoronix.com/news/Linux-6.10-ASUS-ROG-2024-13X

LukeShortCloud commented 3 months ago
Package Notes
asus-firmware Not packaged in the AUR yet
asusctl-git Built in the Chaotic AUR repository
rog-control-center Not in the Chaotic AUR, we need to provide it in the winesapOS repository
supergfxctl Not specific to ASUS but can be used for any laptops, only required to use this for Xorg (not Wayland as it natively supports hybrid GPUs)
LukeShortCloud commented 3 months ago

I looked at all of the firmware files from the ASUS Linux project. I wrote a small script to find and compare to what the latest winesapOS development builds provide (and we now install literally every available firmware package). These are the missing firmware files:

cs35l41-dsp1-spk-cali-1043123f-spkid1-l0.bin
cs35l41-dsp1-spk-cali-1043123f-spkid1-r0.bin
cs35l41-dsp1-spk-cali-10431473-spkid0-l0.bin
cs35l41-dsp1-spk-cali-10431473-spkid0-r0.bin
cs35l41-dsp1-spk-cali-10431483-spkid0-l0.bin
cs35l41-dsp1-spk-cali-10431483-spkid0-r0.bin
cs35l41-dsp1-spk-cali-10431ee2-spkid1-l0.bin
cs35l41-dsp1-spk-cali-10431ee2-spkid1-r0.bin
cs35l41-dsp1-spk-cali-10431f1f-spkid1-l0.bin
cs35l41-dsp1-spk-cali-10431f1f-spkid1-r0.bin
cs35l41-dsp1-spk-cali-10432004-spkid1-l0.bin
cs35l41-dsp1-spk-cali-10432004-spkid1-r0.bin
cs35l41-dsp1-spk-cali-10432064-spkid1-l0.bin
cs35l41-dsp1-spk-cali-10432064-spkid1-r0.bin
cs35l41-dsp1-spk-prot-1043123f-spkid1-l0.bin
cs35l41-dsp1-spk-prot-1043123f-spkid1-r0.bin
cs35l41-dsp1-spk-prot-10431473-spkid0-l0.bin
cs35l41-dsp1-spk-prot-10431473-spkid0-r0.bin
cs35l41-dsp1-spk-prot-10431483-spkid0-l0.bin
cs35l41-dsp1-spk-prot-10431483-spkid0-r0.bin
cs35l41-dsp1-spk-prot-10431ee2-spkid1-l0.bin
cs35l41-dsp1-spk-prot-10431ee2-spkid1-r0.bin
cs35l41-dsp1-spk-prot-10431f1f-spkid1-l0.bin
cs35l41-dsp1-spk-prot-10431f1f-spkid1-r0.bin
cs35l41-dsp1-spk-prot-10432004-spkid1-l0.bin
cs35l41-dsp1-spk-prot-10432004-spkid1-r0.bin
cs35l41-dsp1-spk-prot-10432064-spkid1-l0.bin
cs35l41-dsp1-spk-prot-10432064-spkid1-r0.bin
cs35l41/v6.39.0/halo_cspl_RAM_revB2_29.41.0.wmfw
cs35l41/v6.47.0/halo_cspl_RAM_revB2_29.49.0.wmfw
cs35l41/v6.61.1/halo_cspl_RAM_revB2_29.63.1.wmfw
cs35l41/v6.63.0/halo_cspl_RAM_revB2_29.65.0.wmfw
cs35l41/v6.68.0/halo_cspl_RAM_revB2_29.70.0.wmfw
cs35l41/v6.78.0/halo_cspl_RAM_revB2_29.80.0.wmfw
LukeShortCloud commented 3 months ago

For the firmware, this means we only need to provide 34 out of the 182 files that they provide. Most are upstream now in linux-firmware.

LukeShortCloud commented 3 months ago

I have created a PKGBUILD for linux-firmware-asus and submitted it to the AUR.

https://aur.archlinux.org/packages/linux-firmware-asus

LukeShortCloud commented 3 months ago

The rog-control-center GUI takes a long time to build and has lots of build issues recently. That is probably why it is not even in the Chaotic AUR repository. We will at least provide the asusctl CLI tool that it uses.

GuestSneezeOSDev commented 3 months ago

you could add a systemd service like this: `/etc/systemd/system/battery-charge-threshold.service [Unit] Description=Set the battery charge threshold After=multi-user.target StartLimitBurst=0

[Service] Type=oneshot Restart=on-failure ExecStart=/bin/bash -c 'echo value > /sys/class/power_supply/BAT0/charge_control_end_threshold'

[Install] WantedBy=multi-user.target`