Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mixalbl4-127/337d40819ea837d241e5dd0cb59f3251 to your computer and use it in GitHub Desktop.
Save mixalbl4-127/337d40819ea837d241e5dd0cb59f3251 to your computer and use it in GitHub Desktop.
0. DONT try to install "Ubuntu 21.10" from ISO because kernel 5.13 has bug and installer doesnt see NVME!
Details: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1942624
https://askubuntu.com/questions/1369636/ssd-nvme-m-2-not-detected-on-ubuntu-21-10-during-installation
1. Install w10 as regular
1.1. Download MediaCreationTool21H2.exe from https://www.microsoft.com/ru-ru/software-download/windows10
1.2. Write ISO to USB flash
1.3. Install it
1.4. Only this image Windows 10 x64 Pro works fine with UEFI Activation Key !!!
1.5. Any DRIVERS for GS66-Stealth-11UH-054PL on POLAND MSI Site here: https://pl.msi.com/Laptop/GS66-Stealth-11UX/support?sku_id=68905
2. https://www.mikekasberg.com/blog/2020/04/08/dual-boot-ubuntu-and-windows-with-encryption.html from Phase 3 (without making SWAP)
2.1. if windows doesnt start (just MSI logo and black screen), boot from windows installer, go to Restore, command line:
BOOTREC /FIXMBR
BOOTREC /FIXBOOT
BOOTREC /scanos
BOOTREC /rebuildbcd
2.2. OLD: update kernel to latest 5.15 besause of NVME bug/wifi
NEW: 5.15 doent work with nvidia drivers :(
Use wifi backport (NEED TO DISABLE SECUREBOOT IN BIOS):
https://askubuntu.com/questions/1324314/no-wifi-adapter-found-with-fresh-ubuntu-20-04-install-on-msi-ge66-laptop-and-ot
https://www.intel.ru/content/www/ru/ru/support/articles/000058909/wireless/intel-wireless-products.html
3. restore hybernation https://askubuntu.com/a/1273803/854571
4. keyboard light https://github.com/Askannz/msi-perkeyrgb using --model gs65
4.1. IMPORTANT enable highlight by FN + F10 before!!!
5. Dont do because any combination with ctrl+shif+key will change lang too! >> change lang switch combination https://askubuntu.com/a/1029605
6. FIX ctrl+shift combinations: https://askubuntu.com/questions/1009352/os-keyboard-shortcuts-conflict-with-apps-keyboard-shortcuts-in-gnome-3/1009356#1009356
7. returm gksu for making normal .desktop shortcuts for apps https://askubuntu.com/a/1067364
8. install nvidia drivers (495 or 510):
sudo apt-get purge *nvidia*
sudo ubuntu-drivers autoinstall
9. a4 mouse drivers https://github.com/Marisa-Chan/init-gmouse
9.0. sudo apt install g++ make libusb-1.0-0-dev
9.1. add "a4tool init" to autostart!
9.2. add to re-init after resume from hybernation:
sudo touch /lib/systemd/system-sleep/00restart_a4tech_init.sh
sudo chmod 755 00restart_a4tech_init.sh
=== Put this script to file /lib/systemd/system-sleep/00restart_a4tech_init.sh : ===
#!/bin/sh
case "$1" in
# pre)
# echo "$(date) - $1: Restarting norvpnd" >> /tmp/a4tech_suspend.txt
# /usr/bin/systemctl restart nordvpnd
# ;;
post)
/usr/bin/a4tool init
echo "$(date)- $1: Re init" >> /tmp/a4tech_suspend.txt
;;
esac
10. hybernation on lid close: https://ubuntuhandbook.org/index.php/2020/05/lid-close-behavior-ubuntu-20-04/
11. Freeze on suspend sometimes: "nvidia-modeset: ERROR: GPU:0: Error while waiting for GPU progress: 0x0000c67d:0 2:0:4048:4040"
Try to remove nvidia drivers: sudo apt purge nvidia-*
reboot
install LATEST drivers using Drivers app
12. Safe remove: https://askubuntu.com/questions/1396369/how-to-add-safe-remove-option-to-context-menu-with-srm-ubuntu-20-04
13. Ungroup windows and move task panel to bottom: https://askubuntu.com/a/1347545/854571
14: For enabling OnePlus Buds pro as microphone: https://askubuntu.com/a/1339908/854571
14.1. For 22.04 maybe better this one but I didnt test it https://gist.github.com/the-spyke/2de98b22ff4f978ebf0650c90e82027e?permalink_comment_id=4072809
15. How to limit battery max charging percent on MSI SG66 Stealth: Go to Windows, install MSI Center, inside MSI Center find and install "System diagnosis", choose Balance or any other setup, reboot to Ubuntu :)
16. Setup old scanner "Mustek BearPaw 2400 TA Plus":
16.1 Download A2Dfw.usb from here http://www.meier-geinitz.de/sane/gt68xx-backend/
16.2 Move it to /usr/share/sane/gt68xx (sudo mkdir /usr/share/sane/gt68xx)
16.3 sudo apt-get install sane xsane
16.4 Use regular scanner app in ubuntu 20.04
17. 22.04 hide errors on boot scree like ACPI BIOS ERROR... https://forums.linuxmint.com/viewtopic.php?p=1950944&sid=ff200e306915aebac6b82d613e97325f#p1950944
18. Fix "hcd_pci_suspend+0x0/0x30 returns -16" on boot: https://askubuntu.com/a/1047754
19. Disable locking screen before hibernation gsettings set org.gnome.desktop.screensaver ubuntu-lock-on-suspend false https://askubuntu.com/questions/1272264/lock-on-suspend-but-do-not-lock-on-suspend-to-swap-hibernation
if you want to reinstall Windows when Ubuntu already installed, you can do this but need restore grub from ubuntu live-cd using chroot like here: https://www.mikekasberg.com/blog/2020/04/08/dual-boot-ubuntu-and-windows-with-encryption.htm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment