Skip to content

Instantly share code, notes, and snippets.

@inscapist
Last active September 22, 2024 18:35
Show Gist options
  • Save inscapist/83fd43b49c17e46059eb4fe0c1ae8bea to your computer and use it in GitHub Desktop.
Save inscapist/83fd43b49c17e46059eb4fe0c1ae8bea to your computer and use it in GitHub Desktop.

Revisions

  1. inscapist revised this gist Apr 9, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion .xinitrc
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@ setxkbmap -option caps:escape
    xbacklight -set 10

    # paired with `Xft.dpi: 144`
    export GDK_DPI_SCALE=1.2
    export GDK_DPI_SCALE=1.4

    if [ -z "${XDG_RUNTIME_DIR}" ]; then
    export XDG_RUNTIME_DIR=/tmp/${USER}-runtime-dir
  2. inscapist revised this gist Apr 7, 2024. No changes.
  3. inscapist revised this gist Apr 7, 2024. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion .xinitrc
    Original file line number Diff line number Diff line change
    @@ -15,4 +15,6 @@ fi

    #exec herbstluftwm --locked
    #exec xmonad
    exec i3

    # the bus will be known at $DBUS_SESSION_BUS_ADDRESS
    exec dbus-run-session -- i3
  4. inscapist revised this gist Apr 7, 2024. 1 changed file with 8 additions and 0 deletions.
    8 changes: 8 additions & 0 deletions .xinitrc
    Original file line number Diff line number Diff line change
    @@ -5,6 +5,14 @@ xbacklight -set 10
    # paired with `Xft.dpi: 144`
    export GDK_DPI_SCALE=1.2

    if [ -z "${XDG_RUNTIME_DIR}" ]; then
    export XDG_RUNTIME_DIR=/tmp/${USER}-runtime-dir
    if [ ! -d "${XDG_RUNTIME_DIR}" ]; then
    mkdir "${XDG_RUNTIME_DIR}"
    chmod 0700 "${XDG_RUNTIME_DIR}"
    fi
    fi

    #exec herbstluftwm --locked
    #exec xmonad
    exec i3
  5. inscapist revised this gist Apr 7, 2024. 2 changed files with 5 additions and 1 deletion.
    4 changes: 4 additions & 0 deletions .xinitrc
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,9 @@
    xset r rate 250 60
    setxkbmap -option caps:escape
    xbacklight -set 10

    # paired with `Xft.dpi: 144`
    export GDK_DPI_SCALE=1.2

    #exec herbstluftwm --locked
    #exec xmonad
    2 changes: 1 addition & 1 deletion principles.md
    Original file line number Diff line number Diff line change
    @@ -37,7 +37,7 @@ Then run `dracut --force` or `dracut -f`
    Don't install xorg, but install xorg-minimal to prevent installing unrelated and potentially conflicting video drivers:

    ```sh
    sudo xbps-install xorg-minimal xorg-server-devel xrdb
    sudo xbps-install xorg-minimal xorg-server-devel xrdb xbacklight
    ```

    _`-server-devel` is to provide package config for `nvidia-xconfig` to work_
  6. inscapist revised this gist Apr 7, 2024. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion principles.md
    Original file line number Diff line number Diff line change
    @@ -37,11 +37,13 @@ Then run `dracut --force` or `dracut -f`
    Don't install xorg, but install xorg-minimal to prevent installing unrelated and potentially conflicting video drivers:

    ```sh
    sudo xbps-install xorg-minimal xorg-server-devel
    sudo xbps-install xorg-minimal xorg-server-devel xrdb
    ```

    _`-server-devel` is to provide package config for `nvidia-xconfig` to work_

    _`xrdb` is needed for dpi settings_

    I also need this for changing keyboard repeat rate and swapping CAPSLOCK with ESCAPE key
    ```sh
    sudo xbps-install xset setxkbmap
  7. inscapist revised this gist Apr 7, 2024. 1 changed file with 5 additions and 4 deletions.
    9 changes: 5 additions & 4 deletions principles.md
    Original file line number Diff line number Diff line change
    @@ -34,20 +34,21 @@ _Note: surrounding space is important_
    Then run `dracut --force` or `dracut -f`

    ## Xorg
    Don't install xorg, but install xorg-minimal to prevent installing unrelated and potentially conflicting video drivers
    Don't install xorg, but install xorg-minimal to prevent installing unrelated and potentially conflicting video drivers:

    ```sh
    sudo xbps-install xorg-minimal xorg-server-devel
    ```

    _`-server-devel` is to provide package config for `nvidia-xconfig` to work_

    I also need this for changing keyboard repeat rate and swapping CAPSLOCK with ESCAPE key
    ```sh
    sudo xbps-install xset setxkbmap
    ```

    _`-server-devel` is to provide package config for `nvidia-xconfig` to work_

    Now, make sure nvidia drivers are installed, and run:
    By now, `/etc/X11` should not contain any xorg related configs.
    Next, make sure nvidia drivers are already installed, then run:
    ```sh
    sudo nvidia-xconfig
    ```
  8. inscapist revised this gist Apr 7, 2024. 1 changed file with 6 additions and 0 deletions.
    6 changes: 6 additions & 0 deletions .xinitrc
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    xset r rate 250 60
    setxkbmap -option caps:escape

    #exec herbstluftwm --locked
    #exec xmonad
    exec i3
  9. inscapist revised this gist Apr 7, 2024. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions principles.md
    Original file line number Diff line number Diff line change
    @@ -40,6 +40,11 @@ Don't install xorg, but install xorg-minimal to prevent installing unrelated and
    sudo xbps-install xorg-minimal xorg-server-devel
    ```

    I also need this for changing keyboard repeat rate and swapping CAPSLOCK with ESCAPE key
    ```sh
    sudo xbps-install xset setxkbmap
    ```

    _`-server-devel` is to provide package config for `nvidia-xconfig` to work_

    Now, make sure nvidia drivers are installed, and run:
  10. inscapist revised this gist Apr 7, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion principles.md
    Original file line number Diff line number Diff line change
    @@ -42,7 +42,7 @@ sudo xbps-install xorg-minimal xorg-server-devel

    _`-server-devel` is to provide package config for `nvidia-xconfig` to work_

    Now, once nvidia drivers are installed, run:
    Now, make sure nvidia drivers are installed, and run:
    ```sh
    sudo nvidia-xconfig
    ```
  11. inscapist revised this gist Apr 7, 2024. 1 changed file with 9 additions and 0 deletions.
    9 changes: 9 additions & 0 deletions principles.md
    Original file line number Diff line number Diff line change
    @@ -14,6 +14,15 @@ sudo xbps-install nvidia
    Set `nvidia-drm.modeset=1` to kernel parameters in `/etc/default/grub`.
    Then run `update-grub`

    ---

    It seems that there's an alternative which is adding nvidia.conf to /etc/modprobe.d with
    ```
    options nvidia_drm modeset=1
    ```

    Still, it is better documentation to do it at kernel parameters level.

    ## Initramfs
    Void uses dracut instead of mkinitcpio.
    Create a file at `/etc/dracut.conf.d/nvidia.conf` with the content:
  12. inscapist revised this gist Apr 7, 2024. 1 changed file with 16 additions and 15 deletions.
    31 changes: 16 additions & 15 deletions principles.md
    Original file line number Diff line number Diff line change
    @@ -1,20 +1,7 @@
    ## Xorg
    Don't install xorg, but install xorg-minimal to prevent installing unrelated and potentially conflicting video drivers

    ```sh
    sudo xbps-install xorg-minimal xorg-server-devel
    ```

    _`-server-devel` is to provide package config for `nvidia-xconfig` to work_

    Now, once nvidia drivers are installed, run:
    ```sh
    sudo nvidia-xconfig
    ```

    ## Installation
    Use chroot method to install void. or add `nomodeset` in the installer screen (press "e" in grub menu)


    ## Drivers
    For most up-to-date info, refer [here](https://github.com/korvahannu/arch-nvidia-drivers-installation-guide).

    @@ -35,4 +22,18 @@ add_drivers+=" nvidia nvidia_modeset nvidia_uvm nvidia_drm "
    ```
    _Note: surrounding space is important_

    Then run `dracut --force` or `dracut -f`
    Then run `dracut --force` or `dracut -f`

    ## Xorg
    Don't install xorg, but install xorg-minimal to prevent installing unrelated and potentially conflicting video drivers

    ```sh
    sudo xbps-install xorg-minimal xorg-server-devel
    ```

    _`-server-devel` is to provide package config for `nvidia-xconfig` to work_

    Now, once nvidia drivers are installed, run:
    ```sh
    sudo nvidia-xconfig
    ```
  13. inscapist revised this gist Apr 7, 2024. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions principles.md
    Original file line number Diff line number Diff line change
    @@ -5,6 +5,8 @@ Don't install xorg, but install xorg-minimal to prevent installing unrelated and
    sudo xbps-install xorg-minimal xorg-server-devel
    ```

    _`-server-devel` is to provide package config for `nvidia-xconfig` to work_

    Now, once nvidia drivers are installed, run:
    ```sh
    sudo nvidia-xconfig
  14. inscapist revised this gist Apr 7, 2024. 1 changed file with 9 additions and 0 deletions.
    9 changes: 9 additions & 0 deletions principles.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,15 @@
    ## Xorg
    Don't install xorg, but install xorg-minimal to prevent installing unrelated and potentially conflicting video drivers

    ```sh
    sudo xbps-install xorg-minimal xorg-server-devel
    ```

    Now, once nvidia drivers are installed, run:
    ```sh
    sudo nvidia-xconfig
    ```

    ## Installation
    Use chroot method to install void. or add `nomodeset` in the installer screen (press "e" in grub menu)

  15. inscapist revised this gist Apr 7, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion principles.md
    Original file line number Diff line number Diff line change
    @@ -7,7 +7,7 @@ Use chroot method to install void. or add `nomodeset` in the installer screen (p
    ## Drivers
    For most up-to-date info, refer [here](https://github.com/korvahannu/arch-nvidia-drivers-installation-guide).

    Or simply:
    Or simply do the following and let the other dependencies be computed:
    ```
    sudo xbps-install nvidia
    ```
  16. inscapist revised this gist Apr 7, 2024. 1 changed file with 5 additions and 2 deletions.
    7 changes: 5 additions & 2 deletions principles.md
    Original file line number Diff line number Diff line change
    @@ -5,9 +5,12 @@ Don't install xorg, but install xorg-minimal to prevent installing unrelated and
    Use chroot method to install void. or add `nomodeset` in the installer screen (press "e" in grub menu)

    ## Drivers
    For most up-to-date info, refer [here](https://github.com/korvahannu/arch-nvidia-drivers-installation-guide)
    For most up-to-date info, refer [here](https://github.com/korvahannu/arch-nvidia-drivers-installation-guide).

    Install nvidia-dkms nvidia-libs nvidia-gtklibs
    Or simply:
    ```
    sudo xbps-install nvidia
    ```

    ## Kernel parameters
    Set `nvidia-drm.modeset=1` to kernel parameters in `/etc/default/grub`.
  17. inscapist revised this gist Apr 7, 2024. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions principles.md
    Original file line number Diff line number Diff line change
    @@ -6,6 +6,7 @@ Use chroot method to install void. or add `nomodeset` in the installer screen (p

    ## Drivers
    For most up-to-date info, refer [here](https://github.com/korvahannu/arch-nvidia-drivers-installation-guide)

    Install nvidia-dkms nvidia-libs nvidia-gtklibs

    ## Kernel parameters
  18. inscapist revised this gist Apr 7, 2024. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions principles.md
    Original file line number Diff line number Diff line change
    @@ -5,6 +5,7 @@ Don't install xorg, but install xorg-minimal to prevent installing unrelated and
    Use chroot method to install void. or add `nomodeset` in the installer screen (press "e" in grub menu)

    ## Drivers
    For most up-to-date info, refer [here](https://github.com/korvahannu/arch-nvidia-drivers-installation-guide)
    Install nvidia-dkms nvidia-libs nvidia-gtklibs

    ## Kernel parameters
  19. inscapist renamed this gist Apr 7, 2024. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  20. inscapist created this gist Apr 7, 2024.
    22 changes: 22 additions & 0 deletions Basic ideas
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    ## Xorg
    Don't install xorg, but install xorg-minimal to prevent installing unrelated and potentially conflicting video drivers

    ## Installation
    Use chroot method to install void. or add `nomodeset` in the installer screen (press "e" in grub menu)

    ## Drivers
    Install nvidia-dkms nvidia-libs nvidia-gtklibs

    ## Kernel parameters
    Set `nvidia-drm.modeset=1` to kernel parameters in `/etc/default/grub`.
    Then run `update-grub`

    ## Initramfs
    Void uses dracut instead of mkinitcpio.
    Create a file at `/etc/dracut.conf.d/nvidia.conf` with the content:
    ```
    add_drivers+=" nvidia nvidia_modeset nvidia_uvm nvidia_drm "
    ```
    _Note: surrounding space is important_

    Then run `dracut --force` or `dracut -f`