GithubHelp home page GithubHelp logo

hyprland-ubuntu's Introduction

System conf

HP Pavillion Gaming 15-xx

  • CPU: AMD Ryzen 5600H
  • GPU1:
  • GPU2: NVIDIA RTX 3050 Mobile (NV177)

Operating System

  • Ubuntu 23.10 (Mantic Minotaur)
  • Kernel: 6.5.0-14-generic

NVIDIA Only

Installing Nvidia Drivers (Closed Source)

sudo apt -y update
sudo apt -y upgrade
sudo ubuntu-drivers install

Adding DRM params

  • add nvidia_drm.modeset=1 to /etc/default/grub in GRUB_CMDLINE_LINUX_DEFAULT=
GRUB_CMDLINE_LINUX_DEFAULT='quiet splash nvidia_drm.modeset=1

Installing Hyprland

Either run the script or follow step-by-step

Installing dependencies

sudo apt-get install -y nala
sudo nala install -y meson wget build-essential ninja-build cmake-extras cmake gettext gettext-base fontconfig libfontconfig-dev libffi-dev libxml2-dev libdrm-dev libxkbcommon-x11-dev libxkbregistry-dev libxkbcommon-dev libpixman-1-dev libudev-dev libseat-dev seatd libxcb-dri3-dev libvulkan-dev libvulkan-volk-dev  vulkan-validationlayers-dev libvkfft-dev libgulkan-dev libegl-dev libgles2 libegl1-mesa-dev glslang-tools libinput-bin libinput-dev libxcb-composite0-dev libavutil-dev libavcodec-dev libavformat-dev libxcb-ewmh2 libxcb-ewmh-dev libxcb-present-dev libxcb-icccm4-dev libxcb-render-util0-dev libxcb-res0-dev libxcb-xinput-dev libpango1.0-dev xdg-desktop-portal-wlr hwdata libwlroots-dev libliftoff-dev libinput-tools

Clone Sources

Hyprland release

wget https://github.com/hyprwm/Hyprland/releases/download/v0.34.0/source-v0.34.0.tar.gz
tar -xvf source-v0.34.0.tar.gz

Libraries that needs to be built and installed manually

wget https://gitlab.freedesktop.org/wayland/wayland-protocols/-/releases/1.32/downloads/wayland-protocols-1.32.tar.xz
tar -xvJf wayland-protocols-1.32.tar.xz

wget https://gitlab.freedesktop.org/wayland/wayland/-/releases/1.22.0/downloads/wayland-1.22.0.tar.xz
tar -xvJf wayland-1.22.0.tar.xz

wget https://gitlab.freedesktop.org/emersion/libdisplay-info/-/releases/0.1.1/downloads/libdisplay-info-0.1.1.tar.xz
tar -xvJf libdisplay-info-0.1.1.tar.xz

wget https://dri.freedesktop.org/libdrm/libdrm-2.4.119.tar.xz
tar -xvf libdrm-2.4.119.tar.xz

wget https://github.com/marzer/tomlplusplus/archive/refs/tags/v3.4.0.tar.gz
tar -xvf v3.4.0.tar.gz

Build and install

Building Wayland

cd wayland-1.22.0
mkdir build &&
cd    build &&

meson setup ..            \
      --prefix=/usr       \
      --buildtype=release \
      -Ddocumentation=false &&
ninja
sudo ninja install

cd ../..

Building Wayland-protocols

cd wayland-protocols-1.32

mkdir build &&
cd    build &&

meson setup --prefix=/usr --buildtype=release &&
ninja

sudo ninja install

cd ../..

Building libdisplay-info

cd libdisplay-info-0.1.1/

mkdir build &&
cd    build &&

meson setup --prefix=/usr --buildtype=release &&
ninja

sudo ninja install

cd ../..

Building libdrm

cd libdrm-2.4.119/

mkdir build &&
cd    build &&

meson setup --prefix=/usr \
            --buildtype=release   \
            -Dudev=true           \
            -Dvalgrind=disabled   \
            ..                    &&
ninja
sudo ninja install

Building tomlplusplus

cd tomlplusplus-3.4.0/

mkdir build &&
cd    build &&

meson setup --prefix=/usr --buildtype=release

ninja
sudo ninja install

cd ../..

Build and install Hyprland

chmod a+rw hyprland-source
cd hyprland-source/

Apply NVIDIA patch (optional, needed only when building for NVIDIA)

sed 's/glFlush();/glFinish();/g' -i subprojects/wlroots/render/gles2/renderer.c

Build and install

meson setup build -Dbuildtype=release
ninja -C build
cd build
sudo ninja install

Post-Install Config (NVIDIA Only)

Add these env vars for .config/hypr/hyprland.conf

env = LIBVA_DRIVER_NAME,nvidia
env = XDG_SESSION_TYPE,wayland
env = GBM_BACKEND,nvidia-drm
env = __GLX_VENDOR_LIBRARY_NAME,nvidia
env = WLR_NO_HARDWARE_CURSORS,1

If Hyprland crashes on launch, then remove env = GBM_BACKEND,nvidia-drm

Source

Scripts based on

Script Nvidia Patch

hyprland-ubuntu's People

Contributors

thedroiddiv avatar

Stargazers

Ariel avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.