Modeset=1 not detected

I tried to set nvidia-drm.modeset=1. I added a line to /etc/default/grub to write that line but I think it isn’t done.

I run cat /proc/cmdline and get:

BOOT_IMAGE=/boot/vmlinuz-linux-zen root=UUID=395df181-dfdb-4e8e-a66f-bd5c7f4cba4d rw loglevel=3 nowatchdog nvme_load=YES

I was following this to add it: https://bbs.archlinux.org/viewtopic.php?id=257509 based on it, cat command should show it but it doesn’t.

I use zen kernel with dkms nvidia drivers (proprietary).

Can we see the contents of your /etc/default/grub?

Also, you did, run sudo grub-mkconfig -o /boot/grub/grub.cfg and reboot after making the change, correct?

3 Likes

Just to add what @dalto mentioned, this is what I did, with some help from the EndeavourOS wiki also here:

START HERE FOR NVIDIA DRIVERS:

https://discovery.endeavouros.com/nvidia/nvidia-optional-enhancements-and-troubleshooting/2021/03/

To force nvidia-drm.modeset=1, by adding it to the grub.cfg run the following:

sudo nano /etc/default/grub

Inside the Grub config, you’ll add nvidia-drm.modeset=1 to the GRUB_CMDLINE_LINUX_DEFAULT line. You may have other options within the quotes " " there too, leave them there and just add the modeset part either in the beginning or the end.

GRUB_DEFAULT=0

GRUB_TIMEOUT=5

GRUB_DISTRIBUTOR="EndeavourOS"

GRUB_CMDLINE_LINUX_DEFAULT="nvidia-drm.modeset=1 quiet loglevel=3 nowatchdog"

GRUB_CMDLINE_LINUX=""

save the file, ctrl+x, hit Y to save and rebuild the grub.cfg via the following command:

sudo grub-mkconfig -o /boot/grub/grub.cfg

2 Likes

Ah, yes, another isue I forgot to mention:

/etc/default/grub: line 66: nvidia-drm.modeset=1: command not found

The command you posted says this. As for the content of the file, here it is:

Summary
# GRUB boot loader configuration

GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="EndeavourOS"
GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 nowatchdog nvme_load=YES"
GRUB_CMDLINE_LINUX=""

# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"

# Uncomment to enable booting from LUKS encrypted devices
#GRUB_ENABLE_CRYPTODISK=y

# Set to 'countdown' or 'hidden' to change timeout behavior,
# press ESC key to display menu.
GRUB_TIMEOUT_STYLE=menu

# Uncomment to use basic console
GRUB_TERMINAL_INPUT=console

# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE=auto

# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX=keep

# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY=true

# Uncomment and set to the desired menu colors.  Used by normal and wallpaper
# modes only.  Entries specified as foreground/background.
#GRUB_COLOR_NORMAL="light-blue/black"
#GRUB_COLOR_HIGHLIGHT="light-cyan/blue"

# Uncomment one of them for the gfx desired, a image background or a gfxtheme
#GRUB_BACKGROUND="/path/to/wallpaper"
#GRUB_THEME="/path/to/gfxtheme"
GRUB_THEME=/boot/grub/themes/EndeavourOS/theme.txt

# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"

# Uncomment to make GRUB remember the last selection. This requires
# setting 'GRUB_DEFAULT=saved' above.
#GRUB_SAVEDEFAULT=true

# Uncomment to disable submenus in boot menu
GRUB_DISABLE_SUBMENU=y

# Probing for other operating systems is disabled for security reasons. Read
# documentation on GRUB_DISABLE_OS_PROBER, if still want to enable this
# functionality install os-prober and uncomment to detect and include other
# operating systems.
GRUB_DISABLE_OS_PROBER=false

nvidia-drm.modeset=1

You added nvidia-drm.modeset=1 at the very bottom of your grub.cfg. Please delete that part and add it within the quotes of the line towards the top that is here in your file:

GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 nowatchdog nvme_load=YES"

So you’re NEW line should look like this:

GRUB_CMDLINE_LINUX_DEFAULT="nvidia-drm.modeset=1 loglevel=3 nowatchdog nvme_load=YES"

Save it and exit.Then rebuild your grub via the following, then reboot and you should be good to go:

sudo grub-mkconfig -o /boot/grub/grub.cfg

1 Like

Thank you so much!

1 Like

I have one very last question.

It works, but I want to ask if this is enough if I wanted force Vsync through the GPU.

You should have an application already installed called nvidia-settings (if not sudo pacman -S nvidia-settings ), and when you open that to verify if synchronization is forced, check under the XServer tab and it should show that it is ON like mine does in the below screenshot:

2022-07-30_18-33

Edit: if you have only one display, this will be enough. IF you have more than one display, you may have to run an additional step, just FYI.

2 Likes

I’d rather want to create another post to not spam the forum, and I guess this is pretty short but my panel looks differently:
Panel

There is no synchronization anywhere. Looking I found the Arch wiki pages of Prime and Optimus, which I don’t even think what I’m looking for. I needed all this thread to force Vsync though my GPU panel because I have a low frame rate problem which fix is doing this.

Don’t worry it’s not spam to post about issues that you are having. I would create a new post with that specific issue and when you do make a new post also mention how you installed your Nvidia drivers and how you installed and set up Optimus manager because there are right and wrong ways to do it since Nvidia makes the whole process a pain. Always good to give as much information as you can when troubleshooting.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.