pop-os / linux

Pop!_OS fork of https://launchpad.net/ubuntu/+source/linux
Other
111 stars 13 forks source link

Display issues wih kernel 5.16 and i7-11370H Intel graphics #126

Open squalou opened 2 years ago

squalou commented 2 years ago

Distribution (run cat /etc/os-release):

NAME="Pop!_OS"
VERSION="21.10"
ID=pop
ID_LIKE="ubuntu debian"
PRETTY_NAME="Pop!_OS 21.10"
VERSION_ID="21.10"
HOME_URL="https://pop.system76.com"
SUPPORT_URL="https://support.system76.com"
BUG_REPORT_URL="https://github.com/pop-os/pop/issues"
PRIVACY_POLICY_URL="https://system76.com/privacy"
VERSION_CODENAME=impish
UBUNTU_CODENAME=impish
LOGO=distributor-logo-pop-os

Related Application and/or Package Version (run apt policy $PACKAGE NAME):

linux-image-5.16.11-76051611-generic

Intel based hardware, using modesetting driver. Tested with Xorg and Wayland

Issue/Bug Description:

With recent update to 5.16 kernel series, it's impossible to change resolution of laptop to any non-native value. (even scaling thing fails), resulting in a black screen under Xorg.

Works fin with 5.15.23

I tried with Wayland too, and in this case the screen is not black, but it is not upscaled : a smaller screen is displayed in top left corner of the monitor, leaving the remaining space black.

HAs also been reported here : ArchLinux with a System76 hardware :

https://bbs.archlinux.org/viewtopic.php?pid=2025620#p2025620

Steps to reproduce (if you know):

Update to 5.16.11 kernel reboot change resolution of laptop screen to lower than native

Expected behavior:

Switch to correct resolution

Other Notes:

When resoution change is attempted using xandr command, it ends up with "crtc 0 failed" but I have no other information.

squalou commented 2 years ago

Additional tests seem to poin to "modesetting" driver.

I've just reverted back to intel ones

sudo apt install xserver-xorg-video-intel 
sudo touch /usr/share/X11/xorg.conf.d/99-intel.conf

add this in the file

Section "Device"
    Identifier "Device0"
    Driver "intel"
EndSection

reboot, works fine again with kernel 5.16.

Let's consider it a workaround, given intel driver status ;-)

(sidenote : does not solve issue when using wayland)

jacobgkau commented 2 years ago

What specific Tuxedo model are you using? The other Arch user (with a System76 Gazelle) doesn't mention if he tried Pop!_OS or not, or what generation of Gazelle he's using.

squalou commented 2 years ago

TUXEDO InfinityBook Pro 14 Gen6

The one with 2880x1800 native display

jacobgkau commented 2 years ago

So it's a Core i7-11370H CPU.

squalou commented 2 years ago

For the records,

https://gitlab.freedesktop.org/drm/intel/-/issues/5252

I managed an ugly workaround with manual Modelines.

What remains to be seen is : what should be "fixed" . X ? hardware (laptop panel) ? driver ? Other ?

no idea :)

wagnerck commented 2 years ago

I can confirm an extremely similar issue occurring on two different oryp6 systems, a customer's (ticket 60692) and my own. It happens in both Nvidia and Integrated graphics modes, and only affects the internal display, not external monitors. Reverting to kernel 5.13.0-39-generic from the Ubuntu repos fixes the problem; 5.16.11, 5.16.15, and 5.17.1 all fail to change resolutions.

Using arandr (and therefore xrandr) to change resolutions results in the following error: xrandr failed

I haven't had the time to experiment further with this but I don't think it's restricted to a particular CPU. I concur with some of the folks at https://gitlab.freedesktop.org/drm/intel/-/issues/5252 that this is probably some kind of issue with the i915 kernel module (since it's used even in Nvidia graphics mode as a Prime passthrough) detecting the display hardware. Being able to manually specify the modelines supports that theory, I think.

ahoneybun commented 2 years ago

I'm able to see similar behavior on my oryp6 as well and in ticket 62087. I also saw the same message when trying to use Arandr to set the reosolution.

wagnerck commented 2 years ago

We're tagging these in the ticket system with oryp6-resolution and oryp5-resolution as those are the two System76 models we've seen this on, so far.

wagnerck commented 2 years ago

Problem is still present on v22.04 with multiple kernels, including 5.17.2-76051702-generic and initrd.img-5.16.15-76051615-generic.

squalou commented 2 years ago

if I may, as an end user, I'd be glad to be able to use 5.15 lts kernel and stick to it. (at least for a while). It's generally a good idea on weird / old hardware. In Arch I used to block kernel version to prevent auto-update (which where too frequent to my taste in arch). Within debian-like (thus popOs) I don't know if such a mechanism is available.

wagnerck commented 2 years ago

There's Ubuntu packaging for older kernel versions, which is part of their Hardware Enablement system (https://wiki.ubuntu.com/Kernel/LTSEnablementStack). On Ubuntu and Pop!OS version 22.04 you can install the linux-image-generic-hwe-22.04 package, which will bring in a v5.15 kernel that can be chosen instead of the default one.

I don't really consider this a good fix, though, as eventually we will proceed further into newer and newer kernels and the HWE kernels will get newer as well. I'm still looking into reasons why this is occurring on 5.16 and up and when I have something I'll share it here and take additional steps if necessary.

squalou commented 2 years ago

Thanks for the info. It's probably out of context in this discussion, yet it's the occasion to ask : when trying to install these kernels, grub is pulled as dependency. Pop is not using grub so I always wondered if it would work / how update properly systemd-boot. Any pointer to a doc / other place to discuss it would be much appreciated :-)

wagnerck commented 2 years ago

Ubuntu kernel packages do list some GRUB support packages as dependencies, but they don't install the actual GRUB bootloader. systemd-boot will continue to work normally; I've tested this on my work system.

squalou commented 2 years ago

Hi again, finally upgraded to 22.04, really smooth operation. Then installed hwe kernel with sudo apt install linux-generic-hwe-22.04 but ... kernelstub / systemd-boot ... did not do magic to add this kernel in /boot/efi/Pop... or wherever. (it did copy files under /boot that's all). It's pretty much off topic now but I really don't know where to get help specifically about this.) so I could not boot on it unless fiddling with conf. A bit of context : I need to have a simple operation for a smal team, to keep it as automated as possible I was hoping a kind of hook could be configured. (I can't ask them to manually play with boot config each time a kernel is installed)

wagnerck commented 2 years ago

The kernel files installed by linux-generic-hwe-22.04 are (at this moment) 5.15.0-27-generic, so you'd need to run something like this:

sudo apt install linux-image-generic-hwe-22.04
sudo kernelstub -k /boot/vmlinuz-5.15.0-27-generic -i /boot/initrd.img-5.15.0-27-generic

and then reboot to use that kernel. I think that v5.15 doesn't have this issue and that it was introduced in 5.16, but I'm not 100% sure on that.

squalou commented 2 years ago

ended up with Wayland, which works not that bad tbh