You are not logged in.

#1 2024-11-18 07:56:02

tdtooke
Member
Registered: 2023-04-11
Posts: 170

Gamemode on Wayland

Is it known if the GPU portion of gamemode works on Wayland?  I've been experimenting with overclocking and everything works if I'm on X11 but when I'm on Wayland it doesn't work.  I first get an error having to do with it incorrectly choosing the GPU # because it isn't the same as it's DRM number, but only on Wayland and on nvidia-settings it's missing important things like Powermizer.  I know on Github there's this thing that makes overclocking work on Wayland but I was thinking if they can do it surely gamemode can too.

Last edited by tdtooke (2024-11-18 07:56:35)

Offline

#2 2024-11-18 19:19:32

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,300

Re: Gamemode on Wayland

nvidia-settings Power logistics are hard tied to Xorg currently, so if it's using that then likely these won't work.

Offline

#3 2024-11-24 04:20:00

live4thamuzik
Member
Registered: 2024-02-27
Posts: 49

Re: Gamemode on Wayland

Not sure if this is helpful at all but I use Prasanth Rangan's dotfiles for Hyprland.  His dots came with a good amount of scripts located in ~/.local/share/bin.  One of this is called gamemode.sh and it can be used with keybind SUPER+ALT+G. Basically it shuts off all animations, decorations, and waybar. It helps marginally, but maybe it could be reworked for your DE?

gamemode.sh

install_nvidia_drivers() {
  log_output "Detecting NVIDIA GPUs..."

  # Detect NVIDIA GPUs
  readarray -t dGPU < <(lspci -k | grep -E "(VGA|3D)" | grep -i nvidia)

  # Check if any NVIDIA GPUs were found
  if [ ${#dGPU[@]} -gt 0 ]; then
    log_output "NVIDIA GPU(s) detected:"
    for gpu in "${dGPU[@]}"; do
      log_output "  $gpu"
    done

    log_output "Installing NVIDIA drivers..."

    # Install NVIDIA drivers and related packages
    if ! pacman -S --noconfirm --needed nvidia libglvnd nvidia-utils opencl-nvidia lib32-libglvnd lib32-nvidia-utils lib32-opencl-nvidia nvidia-settings; then
      log_error "Failed to install NVIDIA packages" $?
      exit 1
    fi

    log_output "Updating initramfs..."

    # Add NVIDIA modules to initramfs
    if ! sed -i '/^MODULES=()/c\MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)' /etc/mkinitcpio.conf || \
       ! mkinitcpio -p linux; then
      log_error "Failed to update initramfs with NVIDIA modules" $?
      exit 1
    fi

    log_output "Updating GRUB configuration..."

    # Update GRUB configuration with NVIDIA settings
    if [[ $DISK == "/dev/nvme"* ]]; then
      PART_PREFIX="p"
    else
      PART_PREFIX=""
    fi
    if ! sed -i '/^GRUB_CMDLINE_LINUX_DEFAULT="quiet cryptdevice='${DISK}${PART_PREFIX}'3:volgroup0 loglevel=3"/c\GRUB_CMDLINE_LINUX_DEFAULT="quiet cryptdevice='${DISK}${PART_PREFIX}'3:volgroup0 nvidia_drm_modeset=1 loglevel=3"' /etc/default/grub || \
       ! grub-mkconfig -o /boot/grub/grub.cfg; then
      log_error "Failed to update GRUB configuration with NVIDIA settings" $?
      exit 1
    fi

  else
    log_output "No NVIDIA GPUs detected. Skipping NVIDIA driver installation."
  fi
}

As far as tools for power consumption I am using auto-cpufreq from the AUR and powertop

Offline

#4 2024-11-24 12:18:26

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,300

Re: Gamemode on Wayland

The only thing of note that script tries to do is setting the modesetting parameter and it fails doing that... And that is the default anyway. No one should run this script, it has a high chance of breaking your boot and little else. tdtooke is talking about https://archlinux.org/packages/extra/x86_64/gamemode/

Offline

Board footer

Powered by FluxBB