ガジェット

<@556408276678475777>  <@168355927315972096> easier method if you wish

BEFORE ALL: DISABLE FAST BOOT in BIOS>BOOT menu (keep pressing Esc on on a connected keyboard right after you press the power button to turn the device on, this will take you to the BIOS)

Easy Method (This is my script to execute the fix, USE ONLY IF TRUST IT, ANY BRICKED SYSTEMS ARE NOT MY LIABILITY )

open Konsole app from application launcher and run the following (while connected to internet), it'll trigger install script for holoiso and apply file changes as required after the install is finished.
```
curl -o- https://pastebin.com/raw/vMc5Yy7u | bash
```

A little more involved method:
1. boot into live environment
2. connect to network and do deck-experience install as usual
3. once installation is complete run the following in konsole (do not reboot yet)
```
sudo arch-chroot /mnt
```
this will put you in root terminal for target filesystem of installation.
4. run
```
curl https://raw.githubusercontent.com/theVakhovskeIsTaken/grub-holoiso-pkgbuild/main/grub.default > /etc/default/grub
curl https://raw.githubusercontent.com/NikhilSaini38/aokzoe-holoiso-fix-script/main/gamescope-session > /usr/bin/gamescope-session
holoiso-grub-update
```
in grub file i have added a missing conditional config for aokzoe device (copied from config for oxp device list) and in gamescope-session file i have replaced aokzoe device orientation as 'left' instead of 'upsidedown'.

5. Unplug the pendrive and reboot into installed os, everything should be fixed.


for using non-gamepad buttons use handygccs (AOKZOE test branch)

1. switch to desktop mode
2. open konsole
3. run
```
git clone https://github.com/ShadowBlip/HandyGCCS.git
cd HandyGCCS
git checkout aokzoe
sudo make install
```
see respective repository for full info https://github.com/ShadowBlip/HandyGCCS
NOTE: this message will be updated with latest fixes and configurations, so please consider revisiting it in future.
# = Root Terminal
$ = User Terminal (requires sudo for root permissions)
**From Fresh install, else skip to appropriate section**
Download latest holoISO, put on ventoy flash drive
Boot up to live linux system and use installer.

Once installed, don't reboot, open a terminal (Konsole)
`$ sudo su` (to become root)
`# arch-chroot /mnt`

**Fixing Gamescope screen rotation, starting from desktop mode**
`# vim /usr/bin/gamescope-session`
Type "/AOKZOE" to find the right line
Press “X” to delete “upsidedown”
Press “i” to insert “left” in its place
Press “escape” key and type “:wq” and press “enter” key to Write and Quit.

**fixing screen rotation in terminal, kernel selection, etc from boot**
`# vim /etc/default/grub`
You can do 1 of 2 things.
1. Comment out extra lines that are unnecessary so you can preserve original options and change the TIMEOUT to 2.
2. OR delete unnecessary lines and end up with only this:
```
GRUB_TIMEOUT=2

GRUB_CMDLINE_LINUX_DEFAULT="video=efifb fbcon=rotate:3 quiet splash loglevel=3 rd.udev.log_priority=3 vt.global_cursor_default=0"
GRUB_DEFAULT="Advanced options for SteamOS>SteamOS, with Linux linux-holoiso"
GRUB_SAVEDEFAULT="false"

# Define "breeze" Steam Deck GRUB Theme here
GRUB_THEME="/usr/share/grub/themes/breeze/theme.txt"
```

Then hit escape key and type ":wq" to write and quit. Yes the colon is required for VIM commands.

This sets the default boot settings, but you still need to apply them. You can do this 2 ways:
1. `# holoiso-grub-update`
2. `# grub-mkconfig -o /boot/grub/grub.cfg`

Now you should be booting into the 5.18 holoISO kernel by default. This should get you better stability etc compared to 5.13.

If you're happy with this you can stop, if you want the 6.1 LTS kernel which will have much better support for Zen3+ and RDNA2 as well as the sound card. Continue on.
**Downloading a newer kernel, MANUAL INSTALL**
open a web browser (on the device in desktopmode), and go to https://kernel.org .
From here click "tarball" on the kernel you're wanting (most likely 6.1+). Once finished open a terminal and install compilers then navigate to the downloads folder via

`$ sudo pacman -Su base-devel cpio perl xmlto python-sphinx python-sphinx_rtd_theme graphviz texlive-latexextra git`
`$ cd ~/Downloads`

Now you'll decompress the downloaded file like

`$ gunzip linux-6.1-rc5.tar.gz`

That will leave you with the tape archive (a.k.a. tar file) which we can extract from using

`$ tar -xvf linux-6.1-rc5.tar`

Now you'll have a folder called linux-6.1-rc5 which contains the kernel source code. Lets get started with a copy of the current system config.
```
$ cd linux-6.1-rc5
$ zcat /proc/config.gz > .config
$ make olddefconfig (if you don't want to change kernel config options)
$ make nconfig (advanced: only if you want a menu to change kernel options, skip if you're uncomfortable)
```
Now lets start building the kernel. make by default will only be single threaded. the 6800u is 8cores 16threads. Thus we want 16 jobs to speed up this process. We can enforce this by using the -j16 flag.
```
$ make -j16
$ make -j16 modules
$ sudo make -j16 modules_install
```
Now we need the kernel image and then the base modules for boot in the "initial ramdisk". Arch has presets that makes initial ramdisks, we'll just copy and tweak the one from holoiso.
```
$ make bzImage (this is your compressed kernel image)
$ sudo cp -v arch/x86/boot/bzImage /boot/vmlinuz-linux-6.1-rc5
$ sudo su
# cat /etc/mkinitcpio.d/linux-holoiso.preset | sed 's/holoiso/6.1-rc5/g' > /etc/mkinitcpio.d/linux-6.1-rc5.preset
# mkinitcpio -p linux-6.1-rc5 (this makes your initial ramdisk with required modules to just boot.)
```
OK, now you must let the GRUB bootloader know how and where to boot the new kernel.

1. `# holoiso-grub-update`
OR
2. `# grub-mkconfig -o /boot/grub/grub.cfg`

-ガジェット