Thanks forbytten for the instructions. That worked for me too on Ubuntu 24.04 and Linux Mint 22.
-- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux in Ubuntu. https://bugs.launchpad.net/bugs/2081803 Title: kernel >= 6.8.0-44.44 vmwgfx regression in Ubuntu 24.04.1 Desktop VM guest (VMWare Workstation Pro 17.5.2/17.6) Status in linux package in Ubuntu: Confirmed Bug description: Acknowledgements ================ This bug was originally posed as a question: https://answers.launchpad.net/ubuntu/+question/818765. Contributions from actionparsnip, Phil B and Amir Cicak have been incorporated into this report. Expected behavior ================= When running an Ubuntu 24.04.1 Desktop VM guest with linux-generic 6.8.0-44.44 in VMWare Workstation Pro 17.5.2/17.6 in full screen mode with VMWare "Stretch guest" display preference set and using a 4k (3840x2160) monitor, the detected screen resolutions selectable in the Gnome Screen Display settings should be as follows: 3840x2160 (16:9) 2880x1800 (16:10) 2560x1600 (16:10) 2560x1440 (16:9) 1920x1440 (4:3) etc. Please also see the attached ubuntu24.04.1-vm-hw-version-21-open-vm- tools-2:12.4.5-1-gnome-resolutions-expected.png. Actual behavior =============== The actual resolutions available in the Gnome Screen Display settings do not include 4k (3840x2160) but strangely include a 4096x2160 resolution that exceeds the physical monitor resolution. The selected resolution also defaults to 1280x800 (16:10). 4096x2160 (9:5) 2560x1600 (16:10) 2048x1152 (16:9) 1920x1440 (4:3) etc. Please also see the attached ubuntu24.04.1-vm-hw-version-21-open-vm- tools-2:12.4.5-1-gnome-resolutions-actual.png. xrandr also omits the 4k resolution so I do not believe this is a Gnome specific issue: $ xrandr|grep 3840 Although xrandr does not include the 4096 resolution, either: $ xrandr |grep 4096 Tested versions: - Ubuntu 24.04.1 Desktop VM guest - linux-generic >= 6.8.0-44.44 - VMWare Workstation Pro 17.5.2/17.6 full screen display preferences set to "Stretch guest" - Please note: I have only tested under VMWare Workstation Pro 17.5.2 due to unrelated issues upgrading to 17.6. However, Phil B confirmed the issue also affects 17.6 in their response to the original question: https://answers.launchpad.net/ubuntu/+question/818765. - GNOME Shell 46.0 (as displayed by gnome-shell --version) Workarounds, which show that the guest does technically support the 4k resolution ================================================================================= Workaround option 1 ------------------- The following workaround has to be performed upon each boot, albeit it can be automated - please see the attached vmware-missing-4k-res- workaround.sh as an example. 1. In the Ubuntu 24.04.1 guest OS, explicitly set the guest screen topology: sudo vmwgfxctrl --set-topology 3840x2160+0+0 2. Toggle VMWare Workstation Pro out of and back into full screen mode. 3. Observe the Gnome Screen Display settings now has 3840x2160 (16:9) as the selected resolution. 4. Fractional scaling can also be manually set and will persist across reboots. Workaround option 2 ------------------- Ensure the VMWare Workstation Pro 17.5.2 settings: - Display Preference: - Autofit - Autofit Window: disabled - Autofit guest: disabled - Full screen: Autofit guest (change guest resolution) However, auto fitting the guest can break some scenarios for some other guest VMs and VMWare Workstation Pro does not allow configuring per-VM display preferences. So this workaround can be significantly less convenient than the automated version of option 1. Testing steps ============= 1. Ensure your system is connected to a single native 4k (3840x2160) monitor. DisplayPort vs HDMI connector makes no difference. My monitor supports DisplayPort 1.4 and HDMI 2.0. 2. (optional) I don't think it matters but my host OS was: $ grep VERSION= /etc/os-release VERSION="24.04.1 LTS (Noble Numbat)" $ uname -r 6.8.0-45-generic 3. VMWare Workstation Pro 17.5.2 settings: Edit->Preferences->Display - Autofit - Autofit window: disabled - Autofit guest: disabled - Full Screen - Stretch guest (no resolution change): enabled 4. Ensure the Ubuntu 24.04.1 guest VM is using the latest VMWare hardware version. This can be verified from the version in the VM's .vmx file, which is 21 for 17.5.x: $ grep virtualHW.version "$(ls *.vmx)" virtualHW.version = "21" According to Phil B, the latest VMWare Workstation Pro 17.6, which I could not test due to unrelated upgrade errors, doesn't make a difference. 5. Ensure the Ubuntu 24.04.1 guest VM has a kernel >= 6.8.0-44 $ uname -r 6.8.0-44-generic $ dpkg -l linux-generic Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-==============-============-============-========================================= ii linux-generic 6.8.0-44.44 amd64 Complete Generic Linux kernel and headers In my case, one of my guests already had this version due to upgrading from 23.10 to 24.04.1 on Sep 16 2024. However, if you have already upgraded to the latest stable kernel (6.8.0-45.45), you can downgrade the kernel as follows, assuming you did not explicitly remove the old kernel: 4.1 Reboot the system, holding down the Shift key 4.2 In the Grub "Advanced options for Ubuntu", select the option for the 6.8.0-44-generic kernel 4.3 Once booted, confirm the kernel version: $ uname -r 6.8.0-44-generic 6. Ensure the VM is using the latest open-vm-tools and open-vm-tools- desktop $ sudo apt update && sudo apt install open-vm-tools open-vm-tools-desktop $ dpkg -l open-vm-* Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-===========================-==========================-============-============================================================= ii open-vm-tools 2:12.4.5-1~ubuntu0.24.04.1 amd64 Open VMware Tools for virtual machines hosted on VMware (CLI) un open-vm-tools-containerinfo <none> <none> (no description available) ii open-vm-tools-desktop 2:12.4.5-1~ubuntu0.24.04.1 amd64 Open VMware Tools for virtual machines hosted on VMware (GUI) un open-vm-tools-dev <none> <none> (no description available) un open-vm-tools-salt-minion <none> <none> (no description available) un open-vm-tools-sdmp <none> <none> (no description available) 7. If open-vm-tools or open-vm-tools-desktop were newly installed or updated, reboot the VM just in case. 8. Display the VM in windowed mode. 9. In the VM, check the available resolutions in the Gnome Screen Display settings are wrong: 4096x2160 (9:5) 2560x1600 (16:10) 2048x1152 (16:9) 1920x1440 (4:3) etc. 10. Display the VM in full screen mode. Confirm the available resolutions are still wrong. 11. Observe the host log during boot. Logs are located under /tmp/vmware-$USER and the number will be runtime dependent. The log seemed to indicate VMWare is aware of the 4k resolution screen: $ tail -f vmware-ui-3652.log |grep -i topology 2024-09-17T09:12:48.104Z In(05) vmui HandleGuestTopologyChange: main UI rect: 3840x2160 @ 0,0 2024-09-17T09:12:48.104Z In(05) vmui HandleGuestTopologyChange: Found 1 present screens 2024-09-17T09:12:48.104Z In(05) vmui HandleGuestTopologyChange: Windows for extra guest monitors will be shown 12. In the guest VM, /var/log/vmware* seemed to indicate resolutionCheckForKMS is running, which according to https://docs.vmware.com/en/VMware- Tools/12.4.0/com.vmware.vsphere.vmwaretools.doc/GUID-0BD592B1-A300-4C09-808A-BB447FAE2C2A.html, "Handles communicating guest user interface topology to the vmwgfx drm (direct rendering manager) driver". $ sudo grep -i resolution vmware* ... vmware-vmsvc-root.log:[2024-09-17T09:12:49.394Z] [ message] [resolutionCommon] [1327] resolutionCheckForKMS: dlopen succeeded. vmware-vmsvc-root.log:[2024-09-17T09:12:49.397Z] [ message] [resolutionCommon] [1327] resolutionCheckForKMS: System support available for resolutionKMS. vmware-vmsvc-root.log:[2024-09-17T09:12:49.397Z] [ message] [vmtoolsd] [1327] Plugin 'resolutionKMS' initialized. ... vmware-vmusr-REDACTED.log:[2024-09-17T09:14:52.683Z] [ message] [resolutionCommon] [3348] resolutionCheckForKMS: dlopen succeeded. vmware-vmusr-REDACTED.log:[2024-09-17T09:14:52.685Z] [ message] [resolutionCommon] [3348] resolutionCheckForKMS: System support available for resolutionKMS. vmware-vmusr-REDACTED.log:[2024-09-17T09:14:52.685Z] [ message] [resolutionSet] [3348] ResolutionToolkitInit: Backing off for resolutionKMS. 13. (optional) On Sep 24, 2024, for good measure I also verified that `sudo apt update && sudo apt upgrade` did not change the observed behavior so the latest Ubuntu stable release appears to be affected and I do not believe any other packages affect the observed behavior. Furthermore, the latest stable release kernel at this time was: uname -r 6.8.0-45-generic Testing steps - latest mainline kernel v6.11 ============================================ The latest mainline kernel was also tested from https://kernel.ubuntu.com/mainline/v6.11/ with the same observed behavior. 1. Checksums of version used: # Checksums, check with the command below: # shasum -c CHECKSUMS # # Checksums-Sha1: 59d8a86a327389bafda66d18baaa4b8db6351e66 linux-headers-6.11.0-061100-generic_6.11.0-061100.202409151536_amd64.deb 98cf819f700c596a3a61d54ec3165a011ef842ea linux-headers-6.11.0-061100_6.11.0-061100.202409151536_all.deb a479c725d1f846e2b7d7d45daf0f6ef7f5fe596b linux-image-unsigned-6.11.0-061100-generic_6.11.0-061100.202409151536_amd64.deb 2408c34f460a98883a046995be16831f03d7a60e linux-modules-6.11.0-061100-generic_6.11.0-061100.202409151536_amd64.deb # # Checksums-Sha256: 3d13b2ee8327e73d68220687604382847e43b9dcdf115e37b52bebb68cde4faf linux-headers-6.11.0-061100-generic_6.11.0-061100.202409151536_amd64.deb 9d296b9e5172cf78bf2fc535c72667c8cb0160a457617b580e79e82897cd0280 linux-headers-6.11.0-061100_6.11.0-061100.202409151536_all.deb 8881567927f704a03e80b7d7af2e94e6741af49e4a00c073ef5b3e70da631b89 linux-image-unsigned-6.11.0-061100-generic_6.11.0-061100.202409151536_amd64.deb f2ad25b72ad8be3478a7d679e9ad70e4ed4c3d5904fcb75da76acebc82357717 linux-modules-6.11.0-061100-generic_6.11.0-061100.202409151536_amd64.deb 2. Install kernel in Ubuntu 24.04.1: $ sudo dpkg -i *.deb (Reading database ... 310509 files and directories currently installed.) Preparing to unpack linux-headers-6.11.0-061100_6.11.0-061100.202409151536_all.deb ... Unpacking linux-headers-6.11.0-061100 (6.11.0-061100.202409151536) over (6.11.0-061100.202409151536) ... Preparing to unpack linux-headers-6.11.0-061100-generic_6.11.0-061100.202409151536_amd64.deb ... Unpacking linux-headers-6.11.0-061100-generic (6.11.0-061100.202409151536) over (6.11.0-061100.202409151536) ... Preparing to unpack linux-image-unsigned-6.11.0-061100-generic_6.11.0-061100.202409151536_amd64.deb ... Unpacking linux-image-unsigned-6.11.0-061100-generic (6.11.0-061100.202409151536) over (6.11.0-061100.202409151536) ... /var/lib/dpkg/info/linux-image-unsigned-6.11.0-061100-generic.postrm ... removing pending trigger Preparing to unpack linux-modules-6.11.0-061100-generic_6.11.0-061100.202409151536_amd64.deb ... Unpacking linux-modules-6.11.0-061100-generic (6.11.0-061100.202409151536) over (6.11.0-061100.202409151536) ... Setting up linux-headers-6.11.0-061100 (6.11.0-061100.202409151536) ... Setting up linux-headers-6.11.0-061100-generic (6.11.0-061100.202409151536) ... Setting up linux-modules-6.11.0-061100-generic (6.11.0-061100.202409151536) ... Setting up linux-image-unsigned-6.11.0-061100-generic (6.11.0-061100.202409151536) ... Processing triggers for linux-image-unsigned-6.11.0-061100-generic (6.11.0-061100.202409151536) ... /etc/kernel/postinst.d/initramfs-tools: update-initramfs: Generating /boot/initrd.img-6.11.0-061100-generic /etc/kernel/postinst.d/zz-update-grub: Sourcing file `/etc/default/grub' Generating grub configuration file ... Found linux image: /boot/vmlinuz-6.11.0-061100-generic Found initrd image: /boot/initrd.img-6.11.0-061100-generic Found linux image: /boot/vmlinuz-6.8.0-45-generic Found initrd image: /boot/initrd.img-6.8.0-45-generic Found linux image: /boot/vmlinuz-6.8.0-41-generic Found initrd image: /boot/initrd.img-6.8.0-41-generic Found memtest86+x64 image: /boot/memtest86+x64.bin Warning: os-prober will not be executed to detect other bootable partitions. Systems on them will not be added to the GRUB boot configuration. Check GRUB_DISABLE_OS_PROBER documentation entry. Adding boot menu entry for UEFI Firmware Settings ... done 3. Reboot with the new kernel: 2.1 Reboot the system, holding down the Shift key 2.2 In the Grub "Advanced options for Ubuntu", select the option for the 6.11.0-061100-generic kernel 2.3 Once booted, confirm the kernel version: $ uname -r 6.11.0-061100-generic 4. Same bug observed. (optional) Testing steps - Fedora ================================= In the original posted question, tests of a different distribution, Fedora, were also conducted at actionparsnip's suggestion and exhibited the same bug. This information is probably irrelevant now that I've tested the latest mainline kernel but is included here for completeness. Phil B's contribution: "I just installed Fedora 40 in VMWare to find out: uname -r 6.10.10-200.fc40.x86_64 Same problem. So it's kernel thing, I guess." I also verified the same: 1. Installed SHA256 (Fedora-Workstation-Live-x86_64-40-1.14.iso) = dd1faca950d1a8c3d169adf2df4c3644ebb62f8aac04c401f2393e521395d613 without installing updates 2. Worked fine but kernel is older than Phil B's $ uname -r 6.8.5-301.fc40.x86_64 $ echo $XDG_SESSION_TYPE wayland $ gnome-shell --version GNOME Shell 46.0 # After changing resolution in Gnome settings $ xrandr |grep -o 3840x2160 3840x2160 3840x2160 3. Upgraded $ sudo dnf check-update 4. Shutdown and reboot 5. Same bug encountered with same kernel as Phil B $ uname -r 6.10.10-200.fc40.x86_64 $ echo $XDG_SESSION_TYPE wayland Identification of regression introduced in linux-generic 6.8.0-44.44 ==================================================================== The bug appears to be a regression introduced with linux-generic 6.8.0-44.44. However, instead of bisecting the kernel, I arrived at this conclusion based on observations from 2 of my existing guest VMs. Phil B also confirmed "the issue arose when upgrading linux-generic kernel from 6.8.0-41.41 to 6.8.0-44.44" when commenting on my original posted question. Ubuntu 24.04.1 VM Guest 1: - Was already Ubuntu 24.04.1, screen resolution worked fine and kernel was 6.8.0-41-generic from linux-generic 6.8.0-41.41: $ uname -r 6.8.0-41-generic $ dpkg -l linux-generic Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-==============-============-============-========================================= ii linux-generic 6.8.0-41.41 amd64 Complete Generic Linux kernel and headers - apt list --upgradeable |grep 'linux-' showed upgrades available to 6.8.0-45.45: linux-generic/noble-updates 6.8.0-45.45 amd64 [upgradable from: 6.8.0-41.41] linux-headers-generic/noble-updates 6.8.0-45.45 amd64 [upgradable from: 6.8.0-41.41] linux-image-generic/noble-updates 6.8.0-45.45 amd64 [upgradable from: 6.8.0-41.41] linux-libc-dev/noble-updates 6.8.0-45.45 amd64 [upgradable from: 6.8.0-41.41] linux-tools-common/noble-updates,noble-updates 6.8.0-45.45 all [upgradable from: 6.8.0-41.41] - Selectively upgrading the above resulted in the same bug upon reboot: sudo apt-get install --only-upgrade linux-generic linux-headers- generic linux-image-generic linux-libc-dev linux-tools-common Ubuntu 24.04.1 VM Guest 2: - Was on Ubuntu 23.10, screen resolution worked fine and kernel was 6.5.0-44-generic: ``` $ uname -r 6.5.0-44-generic ``` - Upgrading to Ubuntu 24.04.01 resulted in the same bug. - Unlike Guest 1, though, the kernel was the older 6.8.0-44-generic due to the timing of my upgrade: $ uname -r 6.8.0-44-generic $ dpkg -l linux-generic Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-==============-============-============-========================================= ii linux-generic 6.8.0-44.44 amd64 Complete Generic Linux kernel and headers Hence, the above indicates: - linux-generic 6.8.0-41.41 did not exhibit the bug - linux-generic 6.8.0-44.44 exhibited the bug Further evidence is from the two diffs listed at https://launchpad.net/ubuntu/+source/linux/6.8.0-44.44: 1. diff from 6.8.0-41.41 (in ~canonical-kernel-team/ubuntu/ppa2) to 6.8.0-44.44 2. diff from 6.8.0-43.43 to 6.8.0-44.44 (6.0 KiB) Only the first lists changes made to vmwgfx, which I believe is the VMware Linux graphics driver: - drm/vmwgfx: Refactor drm connector probing for display modes - drm/vmwgfx: Filter modes which exceed graphics memory - drm/vmwgfx: 3D disabled should not effect STDU memory limits - drm/vmwgfx: Remove STDU logic from generic mode_valid function - drm/vmwgfx: Don't memcmp equivalent pointers Thus, it seems linux-generic 6.8.0-44.44 is responsible for the regression in behavior due to the above changes. From the git comments, these changes appear to correspond to upstream kernel changes: - drm/vmwgfx: Refactor drm connector probing for display modes --> https://github.com/torvalds/linux/commit/935f795045a6f9b13d28d46ebdad04bfea8750dd - drm/vmwgfx: Filter modes which exceed graphics memory --> https://github.com/torvalds/linux/commit/426826933109093503e7ef15d49348fc5ab505fe - drm/vmwgfx: 3D disabled should not effect STDU memory limits --> https://github.com/torvalds/linux/commit/fb5e19d2dd03eb995ccd468d599b2337f7f66555 - drm/vmwgfx: Remove STDU logic from generic mode_valid function --> https://github.com/torvalds/linux/commit/dde1de06bd7248fd83c4ce5cf0dbe9e4e95bbb91 - drm/vmwgfx: Don't memcmp equivalent pointers --> https://github.com/torvalds/linux/commit/5703fc058efdafcdd6b70776ee562478f0753acb I am unsure of how to determine what upstream release the Ubuntu kernel is based on as the info at https://people.canonical.com/~kernel/info/kernel-version-map.html appears to be out of date. Appendix - Wayland vs X11 seems to be irrelevant ================================================ In my original posted question, Amir Cicak suggested that the bug only affects Wayland, not X11 but did not provide detailed testing steps. However, I was unable to reproduce their findings. Potentially they have a different issue. Testing steps: 1. Confirm using Wayland $ echo $XDG_SESSION_TYPE wayland 2. Disable Wayland sudo sed -i.bak -e 's/^#WaylandEnable=false/WaylandEnable=false/' /etc/gdm3/custom.conf 3. Reboot to be sure reboot 4. Confirm X11 $ echo $XDG_SESSION_TYPE x11 5. Same bug observed. ProblemType: Bug DistroRelease: Ubuntu 24.04 Package: linux-generic 6.8.0-45.45 ProcVersionSignature: Ubuntu 6.8.0-45.45-generic 6.8.12 Uname: Linux 6.8.0-45-generic x86_64 ApportVersion: 2.28.1-0ubuntu3.1 Architecture: amd64 AudioDevicesInUse: USER PID ACCESS COMMAND /dev/snd/seq: redacted_username 2951 F.... pipewire /dev/snd/controlC0: redacted_username 2955 F.... wireplumber CRDA: N/A CasperMD5CheckResult: pass CurrentDesktop: ubuntu:GNOME Date: Tue Sep 24 17:54:44 2024 InstallationDate: Installed on 2023-04-03 (540 days ago) InstallationMedia: Ubuntu 22.10 "Kinetic Kudu" - Release amd64 (20221020) IwConfig: lo no wireless extensions. ens33 no wireless extensions. docker0 no wireless extensions. Lsusb: Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 001 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse Bus 001 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub Bus 001 Device 004: ID 1050:0407 Yubico.com Yubikey 4/5 OTP+U2F+CCID MachineType: VMware, Inc. VMware Virtual Platform ProcFB: 0 vmwgfxdrmfb ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-6.8.0-45-generic root=/dev/mapper/vgubuntu-root ro find_preseed=/preseed.cfg auto noprompt priority=critical locale=en_US quiet splash RelatedPackageVersions: linux-restricted-modules-6.8.0-45-generic N/A linux-backports-modules-6.8.0-45-generic N/A linux-firmware 20240318.git3b128b60-0ubuntu2.3 RfKill: SourcePackage: linux UpgradeStatus: Upgraded to noble on 2024-09-16 (8 days ago) dmi.bios.date: 11/12/2020 dmi.bios.release: 4.6 dmi.bios.vendor: Phoenix Technologies LTD dmi.bios.version: 6.00 dmi.board.name: 440BX Desktop Reference Platform dmi.board.vendor: Intel Corporation dmi.board.version: None dmi.chassis.asset.tag: No Asset Tag dmi.chassis.type: 1 dmi.chassis.vendor: No Enclosure dmi.chassis.version: N/A dmi.ec.firmware.release: 0.0 dmi.modalias: dmi:bvnPhoenixTechnologiesLTD:bvr6.00:bd11/12/2020:br4.6:efr0.0:svnVMware,Inc.:pnVMwareVirtualPlatform:pvrNone:rvnIntelCorporation:rn440BXDesktopReferencePlatform:rvrNone:cvnNoEnclosure:ct1:cvrN/A:sku: dmi.product.name: VMware Virtual Platform dmi.product.version: None dmi.sys.vendor: VMware, Inc. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2081803/+subscriptions -- Mailing list: https://launchpad.net/~kernel-packages Post to : kernel-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~kernel-packages More help : https://help.launchpad.net/ListHelp