Hyprland - switching to nvidia gpu in hybrid graphics

Hi,

Could someone more savvy help me with switching gpu to an nvidia card on Hyprland WM?
I’ve seen that plenty of people have no problems, so it is feasible.
In my case, I’ve already installed Hyprland with modified dotfiles from a script and then replaced hyprland with hyprland-nvidia. I’m not able to go through the next steps listed on hyprland wiki (https://wiki.hyprland.org/Nvidia/) because there is no mkinitcpio file. Switching to nvidia with envycontrol isn’t working, although I have the driver installed:

glxinfo | grep "OpenGL renderer"
OpenGL renderer string: Mesa Intel(R) Graphics (RPL-P)
inxi -Ga
Graphics:
  Device-1: Intel Raptor Lake-P [Iris Xe Graphics] vendor: Lenovo driver: i915
    v: kernel arch: Gen-13 process: Intel 7 (10nm) built: 2022+ ports:
    active: eDP-2 empty: DP-2, DP-3, DP-4, DP-5 bus-ID: 00:02.0
    chip-ID: 8086:a7a0 class-ID: 0300
  Device-2: NVIDIA AD107M [GeForce RTX 4060 Max-Q / Mobile] vendor: Lenovo
    driver: nvidia v: 545.29.02 alternate: nouveau,nvidia_drm non-free: 545.xx+
    status: current (as of 2023-10) arch: Lovelace code: AD1xx
    process: TSMC n4 (5nm) built: 2022+ pcie: gen: 4 speed: 16 GT/s lanes: 8
    ports: active: none empty: DP-1,HDMI-A-1,eDP-1 bus-ID: 01:00.0

EOS uses dracut. So you need to do the things mentioned inside the link for dracut (instead of mkinitcpio). Sadly I don’t use dracut, but someone else will sure help you with how it works!

This should be how it works with dracut. Check the arch wiki on how to build the initramfs.

1 Like

Have a look at the following article from EnOS’ wiki:

https://discovery.endeavouros.com/installation/dracut/2022/12/

1 Like

Wow, I cautiously think it’s worked, the glxinfo command returns the nvidia gpu card :smiley: I’ll check if it really works.
Thanks for the links, I wouldn’t have figured it out on my own!

1 Like