This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
hardwarerelated:mac_notes [2018/06/10 01:02] – [Virtualization] chris | hardwarerelated:mac_notes [2024/03/25 04:35] (current) – [Linux@apple silicon, my conclusion for now] chris | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ===== Linux on Apple silicon ===== | ||
+ | * My system here: Macbook pro 2023 M2 | ||
+ | * [[https:// | ||
+ | * Installer: https:// | ||
+ | * **What works/what I use:** | ||
+ | * Fedora Asahi remix, minimal install for Fedora 39, then sway installation | ||
+ | * Screen brightness setting via package (and command line utility) ' | ||
+ | * webcam, tested with https:// | ||
+ | * Wlan, Bluetooth, Fcitx5 for Japanese input | ||
+ | * disk encryption: Not offered by installer, one has to boot from a usb-stick and then encrypt | ||
+ | * KVM virtualization, | ||
+ | * 3.5mm sound jack | ||
+ | * HDMI output was implemented December 2023, for no without audio over HDMI. Before that, I investigated [[/ | ||
+ | * Skype via https:// | ||
+ | * buildin speaker: support added in December 2023, [[https:// | ||
+ | * **What works not yet:** | ||
+ | * monitor output via USB-C (but HDMI-output works) | ||
+ | * builtin microphone (but I use the Sony bluetooth headset anyway) | ||
+ | ===== First things after installation ===== | ||
+ | * [[software/ | ||
+ | < | ||
+ | systemctl enable --now sshd | ||
+ | dnf update | ||
+ | dnf install -y vim | ||
+ | echo ' | ||
+ | |||
+ | dnf -y install sway sddm | ||
+ | systemctl set-default graphical.target | ||
+ | systemctl start sddm | ||
+ | # If sddm starts and you can not login, reboot and | ||
+ | # use kernel option systemd.unit=multi-user.target | ||
+ | |||
+ | # further fonts | ||
+ | dnf install google-noto-fonts-common google-noto-sans-vf-fonts \ | ||
+ | google-noto-sans-mono-vf-fonts google-noto-serif-vf-fonts \ | ||
+ | google-noto-emoji-color-fonts google-noto-naskh-arabic-vf-fonts \ | ||
+ | google-noto-sans-gurmukhi-fonts google-noto-sans-gurmukhi-vf-fonts \ | ||
+ | google-noto-sans-lisu-fonts google-noto-sans-mandaic-fonts \ | ||
+ | google-noto-sans-math-fonts google-noto-sans-meetei-mayek-fonts \ | ||
+ | google-noto-sans-sinhala-vf-fonts google-noto-serif-cjk-vf-fonts \ | ||
+ | google-noto-sans-mono-cjk-vf-fonts google-noto-sans-cjk-vf-fonts | ||
+ | | ||
+ | # add your user to video/audio groups. | ||
+ | # Required so chromium can access camera, etc. | ||
+ | usermod -G audio,video chris | ||
+ | |||
+ | # Lightup keyboard leds | ||
+ | echo 5 >/ | ||
+ | # Turn off keyboard leds | ||
+ | echo 0 >/ | ||
+ | </ | ||
+ | |||
+ | * Touchpad config you might want to apply: https:// | ||
+ | * There is no build of Google Chrome for aarch64. So far I had the habit of using Google Chrome for company related video chat etc, had only the company google user there. Chrome also seemed to work more smoothly with google meet, which I have to use for the company. Using Chromium now instead, works nicely so far. | ||
+ | |||
+ | ===== Fedora remix harddisk encryption ===== | ||
+ | For company use, one needs hardware encryption. I used [[https:// | ||
+ | |||
+ | Eventually, installation to a USB3 connected enclosure with a NVMe worked. | ||
+ | |||
+ | After booting via usb, I could mount the installed btrfs subvolumes, and encrypt them. | ||
+ | |||
+ | When the encryption is done, you reboot, and then on normal reboots you have to enter the passphrase. | ||
+ | |||
+ | Then you should activate TRIM: | ||
+ | < | ||
+ | vi / | ||
+ | # add ' | ||
+ | cat / | ||
+ | fedora-root UUID=8faa8bde-522d-4c59-9827-958afa662374 none discard | ||
+ | |||
+ | # then rebuild initrd (maybe not required) | ||
+ | dracut -f | ||
+ | |||
+ | # then reboot | ||
+ | reboot | ||
+ | </ | ||
+ | With that, you can execute ' | ||
+ | |||
+ | ===== Virt/ | ||
+ | * aarch64 virtualization: | ||
+ | * emulation x86 via qemu-system-x86_64: | ||
+ | * https:// | ||
+ | * https:// | ||
+ | * Memory is a topic. | ||
+ | * Performance comparison RHEL installation, | ||
+ | * emulation amd64: rhel6.10, source loopback mounted local iso: 916sec | ||
+ | * emulation amd64: rhel7.7, source loopback mounted local iso: 1207sec, Ansible preparation: | ||
+ | * emulation amd64: rhel8.6, source loopback mounted local iso: 1452sec | ||
+ | * emulation amd64: rhel8.9, source via network: 2781sec, Ansible preparation: | ||
+ | * emulation amd64: rhel8.2, source loopback mounted local iso: 1477sec, Ansible preparation: | ||
+ | * virtualization aarch64: rhel9.3, source loopback mounted local iso: 157sec, Ansible preparation: | ||
+ | * Performance comparison RHEL installation, | ||
+ | * 1 cores: 904sec, Ansible playbook: 94sec | ||
+ | * 2 cores: 1084sec, Ansible playbook: 97sec | ||
+ | * 4 cores: 1477sec, Ansible playbook: 109sec | ||
+ | * 8 cores: 1591sec, Ansible playbook: 109sec | ||
+ | * Performance comparison RHEL installation, | ||
+ | * 2GB RAM: 1045sec, Ansible playbook: 96sec | ||
+ | * 4GB RAM: 904sec, Ansible playbook: 94sec (900sec/ | ||
+ | * 8GB RAM: 889sec, Ansible playbook: 96sec | ||
+ | | ||
+ | |||
+ | ===== Installing Fedora as KVM guest ===== | ||
+ | This is for aarch64 rhel9 guests, where virtualization can be used. | ||
+ | < | ||
+ | # as root | ||
+ | dnf install libvirt-daemon virt-install libvirt-daemon-kvm | ||
+ | |||
+ | cat virt-net.xml | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | <bridge name=' | ||
+ | <mac address=' | ||
+ | <ip address=' | ||
+ | < | ||
+ | <range start=' | ||
+ | </ | ||
+ | </ip> | ||
+ | </ | ||
+ | |||
+ | virsh net-define virt-net-example.xml | ||
+ | virsh net-start default-internal-net | ||
+ | |||
+ | # as user | ||
+ | virsh destroy | ||
+ | virsh undefine | ||
+ | qemu-img create -f qcow2 / | ||
+ | virt-install -n fed39 -r 4096 --vcpus 4 \ | ||
+ | --disk path=/ | ||
+ | --location http:// | ||
+ | --graphics vnc --os-variant fedora38 \ | ||
+ | --network bridge=virbr0, | ||
+ | --extra-args " | ||
+ | </ | ||
+ | |||
+ | ===== Installing Fedora as emulated x86_64 guest ===== | ||
+ | This is for x86_64 guests, where virtualization can not be used. Memory is an issue on 16GB macbook. RHEL8.6 needs 3 or 4GB of RAM to install. | ||
+ | < | ||
+ | virt-install -n $HOSTNAMESHORT -r 4096 --vcpus 4 --arch x86_64 \ | ||
+ | --disk path=$BASEDIR/ | ||
+ | --location / | ||
+ | --graphics none \ | ||
+ | --console pty \ | ||
+ | --noreboot \ | ||
+ | --network bridge=virbr0, | ||
+ | --os-variant rhel8.6 \ | ||
+ | --extra-args " | ||
+ | </ | ||
+ | |||
+ | ===== Emulating x86 systems, plain qemu ===== | ||
+ | I need this to replicate customer issues. With the following, I can boot rhel8.6 x86 install media: | ||
+ | < | ||
+ | / | ||
+ | -machine pc-q35-2.12, | ||
+ | -name guest=rhel9u3a \ | ||
+ | -smp 4 \ | ||
+ | -m 2048 \ | ||
+ | -overcommit mem-lock=off \ | ||
+ | -uuid 1874d8d1-c8ab-49ec-91e8-8b66617ac15d \ | ||
+ | -rtc base=utc -no-shutdown -boot d \ | ||
+ | -sandbox on, | ||
+ | -msg timestamp=on \ | ||
+ | -chardev pty, | ||
+ | -drive media=cdrom, | ||
+ | -drive media=disk, | ||
+ | -net nic -net user | ||
+ | </ | ||
+ | |||
+ | ===== Hints / Issues to research ===== | ||
+ | * research cut' | ||
+ | * seems like paste with ctrl+shift+v works | ||
+ | * clicking with 3 fingers acts like mouse-middle-button-click, | ||
+ | * I used crtl+pageup and ctrl+pagedown on other keyboards to switch through browser tabs, these keys do not exist - need to find replacements | ||
+ | ===== Linux@apple silicon, my conclusion for now ===== | ||
+ | All the important pieces at least for my work are together for use at work: encrypted disk, openvpn access, wlan/ | ||
+ | |||
+ | The Macbook hardware is quite nice, the screen has nice colours, compared to my Thinkpad T590. Performance Co-Pilot compiles in under 6min. For replicating customer issues, only rhel9 (or Fedora) can be run with virtualization, | ||
+ | |||
+ | There is an ANE driver for Neural Network Engine on Asahi, getting that wider supporter would also be nice for running local models. |