Skip to content

Instantly share code, notes, and snippets.

Assuming that you already have Windows installed on your desktop, you want to install a Ubuntu from a hard disk (NTFS). Before following the instructions bellow, you have installed the bootloader GRUB2 (Search how to install GRUB2 on Windows).

What you need is to create a menuentry in GRUB2. 0. Check your disk partitions in grub: press c and ls to find your partitions.

  1. (If you have a older version of linux) Append the following menuentry into the file 40_custom at /etc/grub.d/
menuentry "Ubuntu 20.04 install" {
        insmod ntfs
        insmod iso9660
        rmmod tpm #bug for grub2.04, removing module tpm
@SwaySZ
SwaySZ / setupCUDAonDesktop.md
Last active January 6, 2022 09:31
Use Intel GPU for display & Nvidia GPU for CUDA computation

A very straightforward way is to set the BIOS to use your onboard device (i.e., Intel graphics) if possible. Your Nvidia card will be powered but 100% idle. Tested on Intel UHD graphics 630 on Ubuntu 20.04.3, and the Nvidia driver is the latest 495.46.

  1. CAUTION: connect your monitor to the onboard port rather than the Nvidia card.
  2. If you have fuzzy desktop, then try to uninstall intel driver by sudo apt purge xserver-xorg-video-intel.
  3. Install the Nvidia driver with the official .run file with the option "--no-opengl-files". (No need to use this option. If you did, you would miss some libs like optix.)
  4. For the problem "unable to load nvidia-drm", you may blacklist nvidia, e.g., by using prime-select intel. Check the blacklist under /lib/modprobe.d/.
  5. Using modprobe to load kernel modules.
  6. Using rmmod to unload a kernel module.
  7. Using lsmod to see what kernel modules have been loaded.
@SwaySZ
SwaySZ / ubuntu-x11vnc.md
Created August 21, 2020 11:53 — forked from mgeeky/ubuntu-x11vnc.md
Quick and dirty Ubuntu x11vnc configuration

Ubuntu x11vnc setup with start upon interactive user login to the without-monitor box.

Quick intro

After much time wasted with struggling to get VNC working on Ubuntu that stands for without monitor box - I've compiled the below draft notes on how I finally managed to configure the damn VNC. This should be stated, that I've come a long journey from systemd/init.d configuration scripts, through various VNC daemons (tightvnc, tigervnc, xvnc) and experienced lot of issues (VNC starting before X, VNC not having Xauthority, VNC not being able to open display :0, and so on) .

Finally, this below setup got me working with VNC.