Bug#1008296: Workaround for my machine

2022-10-05 Thread Sebastián Lacuesta
Now added nvidia_drm.modeset=1 as a kernel parameter and doing cat
/sys/module/nvidia_drm/parameters/modeset gives me: Y
Still need to have the `ln -s /dev/null /etc/udev/rules.d/61-gdm.rules`
hack in order to have Wayland properly. I do have the kms-modifiers
activated too.
Versions of libxcb, egl-wayland are 1.15 and 1.1.10 respectively.

Issue starts by not having wayland options in gdm and in turn, my gnome
session later.

El lun, 19 sept 2022 a las 14:27, Alban Browaeys ()
escribió:

> About modeset, ie Kernel Mode Setting being required or not I found
> this about https://wiki.archlinux.org/title/Wayland#Requirements 5.1
> that "Enabling DRM KMS is required.". THe next link points to
>
> https://download.nvidia.com/XFree86/Linux-x86_64/515.48.07/README/xwayland.html
> which tells that:
> "
> Requirements
>
> The following are necessary to enable accelerated rendering on Xwayland
> with the NVIDIA driver:
>
>- DRM KMS must be enabled. See Chapter 36, Direct Rendering Manager
> Kernel Modesetting (DRM KMS) for details.
>
>- The installed copy of Xwayland should be a build from the master
> branch of https://gitlab.freedesktop.org/xorg/xserver at least as
> recent as commit c468d34c. Note that if this requirement is not
> satisfied, the NVIDIA GPU can still be used for rendering, however it
> will fall back to a suboptimal path for presentation resulting in
> degraded performance.
>
>- libxcb version 1.13 or later must be present.
>
>- egl-wayland version 1.1.7 or later must be present (if installed
> separately from the the NVIDIA driver).
>
>- If using the GNOME desktop environment, kms-modifiers must be
> enabled through gsettings. This can be done with the following command
> gsettings set org.gnome.mutter experimental-features [\"kms-
> modifiers\"]
>
> "
>
> So currently, once logged in gnome wayland without modeset enabled, you
> should not have Xwayland application (most games) running hardware
> accelerated.
> To not end up on software acceleration you have to enable KMS (by the
> settings I sent you previously) and also setting an experimental
> feature in the gnome session:
> gsettings set org.gnome.mutter experimental-features [\"kms-modifiers\"]
>
> maybe you can check if you are on software acceleration on Xwayland
> with glxgears/glxinfo . Maybe you can send your glxinfo output without
> nvidia modeset set and logged in a wayland session?
>
>
> Kind regards,
>
> Alban
>


Bug#1008296: Workaround for my machine

2022-09-19 Thread Alban Browaeys
About modeset, ie Kernel Mode Setting being required or not I found
this about https://wiki.archlinux.org/title/Wayland#Requirements 5.1
that "Enabling DRM KMS is required.". THe next link points to
https://download.nvidia.com/XFree86/Linux-x86_64/515.48.07/README/xwayland.html
which tells that:
"
Requirements

The following are necessary to enable accelerated rendering on Xwayland
with the NVIDIA driver:

   - DRM KMS must be enabled. See Chapter 36, Direct Rendering Manager
Kernel Modesetting (DRM KMS) for details.

   - The installed copy of Xwayland should be a build from the master
branch of https://gitlab.freedesktop.org/xorg/xserver at least as
recent as commit c468d34c. Note that if this requirement is not
satisfied, the NVIDIA GPU can still be used for rendering, however it
will fall back to a suboptimal path for presentation resulting in
degraded performance.

   - libxcb version 1.13 or later must be present.

   - egl-wayland version 1.1.7 or later must be present (if installed
separately from the the NVIDIA driver).

   - If using the GNOME desktop environment, kms-modifiers must be
enabled through gsettings. This can be done with the following command
gsettings set org.gnome.mutter experimental-features [\"kms-
modifiers\"]

"

So currently, once logged in gnome wayland without modeset enabled, you
should not have Xwayland application (most games) running hardware
accelerated.
To not end up on software acceleration you have to enable KMS (by the
settings I sent you previously) and also setting an experimental
feature in the gnome session:
gsettings set org.gnome.mutter experimental-features [\"kms-modifiers\"]

maybe you can check if you are on software acceleration on Xwayland
with glxgears/glxinfo . Maybe you can send your glxinfo output without
nvidia modeset set and logged in a wayland session?


Kind regards,

Alban



Bug#1008296: Workaround for my machine

2022-09-19 Thread alban . browaeys
On Thu, 8 Sep 2022 17:22:00 -0300 =?UTF-8?Q?Sebasti=C3=A1n_Lacuesta?=
 wrote:
> Hi Alban,
> 
> My nvidia driver version: 510.85.02-1
> 
> cat /sys/module/nvidia_drm/parameters/modeset
> N


the gdm udev rules work how they ought to, ie:
/lib/udev/rules.d/61-gdm.rules "
# disable wayland if nvidia-drm modeset is not enabled
ATTR{parameters/modeset}!="Y", GOTO="gdm_disable_wayland"
"

a way around is
https://wiki.archlinux.org/title/GDM#Wayland_and_the_proprietary_NVIDIA_driver
ie https://wiki.archlinux.org/title/NVIDIA#DRM_kernel_mode_setting,
that is, add in /etc/default/grub to "GRUB_CMDLINE_LINUX_DEFAULT":
"nvidia_drm.modeset=1"
the run update-grub as root.

> 
> grep nomodeset /proc/cmdline
> 
> 
> Cheers,
> 
> Sebastián
> 
> El sáb, 27 ago 2022 a las 3:20,  escribió:
> 
> > On Fri, 8 Apr 2022 18:19:06 -0300 =?UTF-
8?Q?Sebasti=C3=A1n_Lacuesta?=
> >  wrote:
> > > Overwritting 61-gdm.rules with
> > >
> > > ln -s /dev/null /etc/udev/rules.d/61-gdm.rules
> > >
> > > solves the issue for me.
> >


About drm modeset
https://ubuntuforums.org/showthread.php?t=1613132  "
The newest kernels have moved the video mode setting into the kernel.
So all the programming of the hardware specific clock rates and
registers on the video card happen in the kernel rather than in the X
driver when the X server starts.. This makes it possible to have high
resolution nice looking splash (boot) screens and flicker free
transitions from boot splash to login screen. Unfortunately, on some
cards this doesnt work properly and you end up with a black screen.
Adding the nomodeset parameter instructs the kernel to not load video
drivers and use BIOS modes instead until X is loaded.
"
So enabling Kernel Mode Setting might lead to a black screen before the
nvidia driver is loaded (gdm start) if the nvidia driver is broken (or
not loaded).



>From https://wiki.archlinux.org/title/Wayland#XWayland 5.1 tells
enabling DRM KMS is required (for XWayland application only ?, ie most
games).



For early loading (console with optional "high resolution nice looking
splash (boot) screens and flicker free transitions from boot splash to
login screen") add in /etc/initramfs-tools/modules:
"nvidia nvidia_modeset nvidia_uvm nvidia_drm"
then run:
update-initramfs -u
(this only update the latest installed kernel), or for all kernels:
update-initramfs -u -k all
This if you want o try plymouth or want to set "GRUB_GFXMODE=" in
/etc/default/grub.

https://wiki.archlinux.org/title/kernel_mode_setting 2.1 tells that
NVIDIA kms has to be manually enabled (what we saw above).

All in all I do not believe this is software gdm bug that you cannot
start gdm in wayland mode with nvidia modesetting disabled (even if it
is disabled by default).

Can you confirm that with nvidia modeset enabled you do not need any
hack to start GDM in wayland mode (ie as i GDM shows gnome xorg and
wayland options)?
This is still an issue but a note on 
/usr/share/doc/gdm3/README.Debian might be enough to clarify that on
nvidia setups one has to enable modeset on grub?

Kind regards,

Alban


PS: I still do not know if current NVIDIA driver default to not enable
modeset is really an issue for gnome wayland or if only helps with
screen flickers when switching from wyaland to console and helps with
advanced graphics on boot console.
Maybe this requirement could be removed, and in this case this bug
should be forwarded upstream.



Bug#1008296: Workaround for my machine

2022-09-08 Thread Sebastián Lacuesta
Hi Alban,

My nvidia driver version: 510.85.02-1

cat /sys/module/nvidia_drm/parameters/modeset
N

grep nomodeset /proc/cmdline


Cheers,

Sebastián

El sáb, 27 ago 2022 a las 3:20,  escribió:

> On Fri, 8 Apr 2022 18:19:06 -0300 =?UTF-8?Q?Sebasti=C3=A1n_Lacuesta?=
>  wrote:
> > Overwritting 61-gdm.rules with
> >
> > ln -s /dev/null /etc/udev/rules.d/61-gdm.rules
> >
> > solves the issue for me.
>
> regarding this file disables wayland if nvidia driver below 510 (which
> is not your case) or modesetting is disabled, could you confirm you
> have the nvidia_drm driver with modesetting disabled ?
>
> cat /sys/module/nvidia_drm/parameters/modeset
>
> and
>
> grep nomodeset /proc/cmdline
>
> > Let me know if I can help testing new defaults so this can be solved.
> >
> > Regards
> > Sebastián
>
> Cheers,
>
> Alban
>
>


Bug#1008296: Workaround for my machine

2022-08-27 Thread alban . browaeys
On Fri, 8 Apr 2022 18:19:06 -0300 =?UTF-8?Q?Sebasti=C3=A1n_Lacuesta?=
 wrote:
> Overwritting 61-gdm.rules with
> 
> ln -s /dev/null /etc/udev/rules.d/61-gdm.rules
> 
> solves the issue for me.

regarding this file disables wayland if nvidia driver below 510 (which
is not your case) or modesetting is disabled, could you confirm you
have the nvidia_drm driver with modesetting disabled ?

cat /sys/module/nvidia_drm/parameters/modeset

and

grep nomodeset /proc/cmdline

> Let me know if I can help testing new defaults so this can be solved.
> 
> Regards
> Sebastián

Cheers,

Alban



Bug#1008296: Workaround for my machine

2022-04-08 Thread Sebastián Lacuesta
Overwritting 61-gdm.rules with

ln -s /dev/null /etc/udev/rules.d/61-gdm.rules

solves the issue for me.
Now I have X11 and Wayland options back, tested Wayland and works great. I
also can use new optimus environment variables to choose between discrete
and integrated cards. For vulkan apps, the Nvidia card is selected first,
but nothing I can't override by setting VK_ICD_FILENAMES environment
variables for radv.

Let me know if I can help testing new defaults so this can be solved.

Regards
Sebastián