linuxmint / cinnamon

A Linux desktop featuring a traditional layout, built from modern technology and introducing brand new innovative features.
GNU General Public License v2.0
4.48k stars 729 forks source link

Hi-DPI scaling broken on 2-in-1 Dell XPS 13 notebook #9476

Open kryssb opened 4 years ago

kryssb commented 4 years ago
 * Cinnamon version 4.6.6 
 * Distribution - (Mint 20 Ulyana)
 * Intel HD Graphics 615 vendor: Dell driver: i915
 * 64 bit

Issue

On Dell XPS 13 2-in-1 notebook, Hi-DPI scaling is randomly broken (i.e. icons and text are very small) immediately after logging in; it is systematically broken if the notebook is rotated and the screen changes to vertical configuration.

Steps to reproduce

First way: 1) Keep "Cinnamon Settings Daemon - xrandr" activated with no delay 2) log in and out - approximately half of the times the DPI scaling is ignored and text and icons are very small. The bad behavior disappears if the "Cinnamon Settings Daemon - xrandr" is disabled; The bad behavior is highly mitigated if the "Cinnamon Settings Daemon - xrandr" starts 10s after login;

Second way: 1) With "Cinnamon Settings Daemon - xrandr" activated, rotate the notebook to cause screen reconfiguration to vertical mode: DPI scaling settings are ignored. 2) With "Cinnamon Settings Daemon - xrandr" activated, rotate the notebook to cause screen reconfiguration to horizontal mode: DPI scaling settings are ignored.

Expected behaviour

I would expect that DPI scaling is applied irrespective of the screen orientation. My impression is that DPI scaling is applied only at logon and in the monitor resolution dialog, and is ignored in any other automatic reconfiguration event.

Other information

Configuration info, if applicable If this bug report is related to an Applet, Desklet or Extension, please paste (or use a pastebin service) the offending extension's settings, if it has any. You can obtain this by opening its configuration, clicking the 'hamburger' button in the upper-right corner of the window, and selecting "Export to a file". Please be sure to review the contents and remove any personal data it may contain.


System:
  Kernel: 5.4.0-40-generic x86_64 bits: 64 compiler: gcc v: 9.3.0 
  Desktop: Cinnamon 4.6.6 wm: muffin dm: LightDM 
  Distro: Linux Mint 20 Ulyana base: Ubuntu 20.04 focal 
Machine:
  Type: Convertible System: Dell product: XPS 13 9365 v: N/A 
  serial: <filter> Chassis: type: 31 serial: <filter> 
  Mobo: Dell model: 0KP45X v: A00 serial: <filter> UEFI: Dell v: 1.0.21 
  date: 08/08/2017 
Battery:
  ID-1: BAT0 charge: 44.3 Wh condition: 45.2/46.0 Wh (98%) volts: 8.7/7.6 
  model: LGC-LGC6.130 DELL NP0V377 serial: <filter> status: Discharging 
CPU:
  Topology: Dual Core model: Intel Core i7-7Y75 bits: 64 type: MT MCP 
  arch: Amber Lake rev: 9 L2 cache: 4096 KiB 
  flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx 
  bogomips: 12799 
  Speed: 600 MHz min/max: 400/3600 MHz Core speeds (MHz): 1: 600 2: 600 
  3: 600 4: 600 
Graphics:
  Device-1: Intel HD Graphics 615 vendor: Dell driver: i915 v: kernel 
  bus ID: 00:02.0 chip ID: 8086:591e 
  Display: x11 server: X.Org 1.20.8 driver: modesetting unloaded: fbdev,vesa 
  resolution: 3200x1800~60Hz 
  OpenGL: renderer: Mesa Intel HD Graphics 615 (KBL GT2) v: 4.6 Mesa 20.0.8 
  direct render: Yes 
Audio:
  Device-1: Intel Sunrise Point-LP HD Audio vendor: Dell 
  driver: snd_hda_intel v: kernel bus ID: 00:1f.3 chip ID: 8086:9d71 
  Sound Server: ALSA v: k5.4.0-40-generic 
Network:
  Device-1: Intel Wireless 8265 / 8275 driver: iwlwifi v: kernel port: efa0 
  bus ID: 3c:00.0 chip ID: 8086:24fd 
  IF: wlp60s0 state: up mac: <filter> 
  IF-ID-1: docker0 state: down mac: <filter> 
Drives:
  Local Storage: total: 476.94 GiB used: 181.42 GiB (38.0%) 
  ID-1: /dev/nvme0n1 vendor: Toshiba model: KXG50ZNV512G NVMe 512GB 
  size: 476.94 GiB speed: 31.6 Gb/s lanes: 4 serial: <filter> 
Partition:
  ID-1: / size: 241.18 GiB used: 181.35 GiB (75.2%) fs: ext4 
  dev: /dev/nvme0n1p7 
  ID-2: swap-1 size: 7.87 GiB used: 0 KiB (0.0%) fs: swap 
  dev: /dev/nvme0n1p8 
Sensors:
  System Temperatures: cpu: 39.5 C mobo: 29.8 C 
  Fan Speeds (RPM): N/A 
Repos:
  No active apt repos in: /etc/apt/sources.list 
  Active apt repos in: /etc/apt/sources.list.d/mono-official-vs.list 
  1: deb https://download.mono-project.com/repo/ubuntu vs-bionic main
  Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list 
  1: deb http://packages.linuxmint.com ulyana main upstream import backport #id:linuxmint_main
  2: deb http://archive.ubuntu.com/ubuntu focal main restricted universe multiverse
  3: deb http://archive.ubuntu.com/ubuntu focal-updates main restricted universe multiverse
  4: deb http://archive.ubuntu.com/ubuntu focal-backports main restricted universe multiverse
  5: deb http://security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
  6: deb http://archive.canonical.com/ubuntu/ focal partner
Info:
  Processes: 230 Uptime: 6m Memory: 7.64 GiB used: 2.03 GiB (26.6%) 
  Init: systemd v: 245 runlevel: 5 Compilers: gcc: 9.3.0 alt: 7/9 
  Shell: bash v: 5.0.17 running in: gnome-terminal inxi: 3.0.38 
ItzSwirlz commented 4 years ago

Do you have a log of this or something? Use mintreport to report if possible.

kryssb commented 4 years ago

Mintreport shows no errors. I could post a video instead. If there is a way to log DPI-scaling setting events I am willing to produce it, but I need instructions. Whatever I can do to support, including testing solutions, scripts, fixes, patches, I am willing to do. This is system info.

System: Kernel: 5.4.0-42-generic x86_64 bits: 64 compiler: gcc v: 9.3.0 Desktop: Cinnamon 4.6.6 wm: muffin dm: LightDM Distro: Linux Mint 20 Ulyana base: Ubuntu 20.04 focal Machine: Type: Convertible System: Dell product: XPS 13 9365 v: N/A serial: Chassis: type: 31 serial: Mobo: Dell model: 0KP45X v: A00 serial: UEFI: Dell v: 1.0.21 date: 08/08/2017 Battery: ID-1: BAT0 charge: 23.5 Wh condition: 45.2/46.0 Wh (98%) volts: 7.7/7.6 model: LGC-LGC6.130 DELL NP0V377 serial: status: Discharging CPU: Topology: Dual Core model: Intel Core i7-7Y75 bits: 64 type: MT MCP arch: Amber Lake rev: 9 L2 cache: 4096 KiB flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 12799 Speed: 2133 MHz min/max: 400/3600 MHz Core speeds (MHz): 1: 1629 2: 1600 3: 1600 4: 1647 Graphics: Device-1: Intel HD Graphics 615 vendor: Dell driver: i915 v: kernel bus ID: 00:02.0 chip ID: 8086:591e Display: x11 server: X.Org 1.20.8 driver: modesetting unloaded: fbdev,vesa resolution: 3200x1800~60Hz OpenGL: renderer: Mesa Intel HD Graphics 615 (KBL GT2) v: 4.6 Mesa 20.0.8 direct render: Yes Audio: Device-1: Intel Sunrise Point-LP HD Audio vendor: Dell driver: snd_hda_intel v: kernel bus ID: 00:1f.3 chip ID: 8086:9d71 Sound Server: ALSA v: k5.4.0-42-generic Network: Device-1: Intel Wireless 8265 / 8275 driver: iwlwifi v: kernel port: efa0 bus ID: 3c:00.0 chip ID: 8086:24fd IF: wlp60s0 state: up mac: IF-ID-1: docker0 state: down mac: Drives: Local Storage: total: 476.94 GiB used: 181.45 GiB (38.0%) ID-1: /dev/nvme0n1 vendor: Toshiba model: KXG50ZNV512G NVMe 512GB size: 476.94 GiB speed: 31.6 Gb/s lanes: 4 serial: Partition: ID-1: / size: 241.18 GiB used: 181.38 GiB (75.2%) fs: ext4 dev: /dev/nvme0n1p7 ID-2: swap-1 size: 7.87 GiB used: 0 KiB (0.0%) fs: swap dev: /dev/nvme0n1p8 USB: Hub: 1-0:1 info: Full speed (or root) Hub ports: 12 rev: 2.0 chip ID: 1d6b:0002 Device-1: 1-2:2 info: Intel type: Bluetooth driver: btusb rev: 2.0 chip ID: 8087:0a2b Device-2: 1-7:3 info: Validity Sensors VFS7552 Touch Fingerprint Sensor type: driver: N/A rev: 2.0 chip ID: 138a:0091 Device-3: 1-9:4 info: Realtek Integrated_Webcam_HD type: Video driver: uvcvideo rev: 2.0 chip ID: 0bda:5690 Hub: 2-0:1 info: Full speed (or root) Hub ports: 6 rev: 3.0 chip ID: 1d6b:0003 Sensors: System Temperatures: cpu: 55.0 C mobo: 29.8 C Fan Speeds (RPM): N/A Repos: No active apt repos in: /etc/apt/sources.list Active apt repos in: /etc/apt/sources.list.d/mono-official-vs.list 1: deb https: //download.mono-project.com/repo/ubuntu vs-bionic main Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list 1: deb http: //packages.linuxmint.com ulyana main upstream import backport #id:linuxmint_main 2: deb http: //archive.ubuntu.com/ubuntu focal main restricted universe multiverse 3: deb http: //archive.ubuntu.com/ubuntu focal-updates main restricted universe multiverse 4: deb http: //archive.ubuntu.com/ubuntu focal-backports main restricted universe multiverse 5: deb http: //security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse 6: deb http: //archive.canonical.com/ubuntu/ focal partner Info: Processes: 223 Uptime: 20m Memory: 7.64 GiB used: 2.80 GiB (36.6%) Init: systemd v: 245 runlevel: 5 Compilers: gcc: 9.3.0 alt: 7/9 Client: Unknown python3.8 client inxi: 3.0.38

kryssb commented 4 years ago

Additional info: DPI scaling is also lost with Zoom conference because Zoom goes full screen; when leaving, scaling goes back to 1x and everything is very small.

mtwebster commented 4 years ago

Hi, it sounds like part of the problem here is that hidpi scaling is now part of the xrandr configuration, rather than a separate 'global' setting. I have a couple of ideas for mitigating this in these situations that I'll play around with.

Do have automatic screen rotation enabled?

kryssb commented 4 years ago

Yes, the problem shows up when "Cinnamon Settings Daemon - xrandr" is active. When it is active, automatic rotation is available and every event that changes the screen configuration (including automatic rotations, Zoom full screen etc.) breaks DPI scaling. When "Cinnamon Settings Daemon - xrandr" is turned off, DPI scaling never breaks. If you have code to test I am available to try.

astromatt42 commented 3 years ago

I am experiencing a similar issue and I bet it's related. I have a Dell Inspiron 7000 2in1 and connect to external displays at work and home. When connected to the docking station (D6000) everything works fine and I can run two external displays without issue. Connecting to a single display though through a HDMI to USB-C adapter sets the fractional scaling on both displays to 200%, which messes up the external monitor as it's not a high definition device. I cannot select the fractional scaling separately (it's greyed out), so either display is unusable. There is a reproducible solution however: Select some random setting, hit apply, then revert back to previous configuration. The select restore to defaults, et voila, scaling is set appropriately on both displays (100% on external, 200% on laptop screen). Whether this is a bug that fixes a bug, I am not sure. I should probably also mention that this only happens with certain displays that have relatively high resolution (below HD though), e.g. a slightly smaller screen (23" vs 24") didn't have the problem. Regards, M

astromatt42 commented 3 years ago

Brief update on the situation: Various kernel updates in the 5.8 line have this problem in different versions. There is no consistency to it. In the latest iteration I can have both screens scaled appropriately using the method detailed above, however if I change which monitor is the primary display it will mess it all up again - in part because the above recovery method doesn't work I guess, i.e. if hit restore defaults primary and secondary restore to the default config too. No system reports, system info attached below.

Edit: I should also mention that the mouse pointer suffers from an annoying flicker on the HIDPI screen but behaves normally on the lower resolution external screen. This would suggest there's a rendering problem.

System: Kernel: 5.8.0-45-generic x86_64 bits: 64 compiler: N/A Desktop: Cinnamon 4.8.6 wm: muffin dm: LightDM Distro: Linux Mint 20.1 Ulyssa base: Ubuntu 20.04 focal Machine: Type: Convertible System: Dell product: Inspiron 7591 2n1 v: N/A serial: Chassis: type: 31 serial: Mobo: Dell model: 0NNW5N v: A00 serial: UEFI: Dell v: 1.9.1 date: 11/05/2020 Battery: ID-1: BAT0 charge: 49.6 Wh condition: 51.4/68.0 Wh (76%) volts: 8.5/7.6 model: SMP DELL C5GV285 serial: status: Charging Device-1: hid-0018:04F3:241E.0002-battery model: CUST0000:00 04F3:241E serial: N/A charge: N/A status: N/A CPU: Topology: Quad Core model: Intel Core i7-10510U bits: 64 type: MT MCP arch: Kaby Lake rev: C L2 cache: 8192 KiB flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 36799 Speed: 3281 MHz min/max: 400/4900 MHz Core speeds (MHz): 1: 3064 2: 3032 3: 3021 4: 2990 5: 2992 6: 3086 7: 3046 8: 3071 Graphics: Device-1: Intel UHD Graphics vendor: Dell driver: i915 v: kernel bus ID: 00:02.0 chip ID: 8086:9b41 Device-2: NVIDIA GP108M [GeForce MX250] vendor: Dell driver: N/A bus ID: 3c:00.0 chip ID: 10de:1d13 Display: x11 server: X.Org 1.20.9 driver: modesetting unloaded: fbdev,vesa resolution: 3840x2160~60Hz, 1920x1080~60Hz OpenGL: renderer: Mesa Intel UHD Graphics (CML GT2) v: 4.6 Mesa 20.2.6 direct render: Yes Audio: Device-1: Intel vendor: Dell driver: sof-audio-pci bus ID: 00:1f.3 chip ID: 8086:02c8 Sound Server: ALSA v: k5.8.0-45-generic Network: Device-1: Intel Wireless-AC 9462 driver: iwlwifi v: kernel port: 4000 bus ID: 00:14.3 chip ID: 8086:02f0 IF: wlp0s20f3 state: up mac: Device-2: Realtek RTL8153 Gigabit Ethernet Adapter type: USB driver: r8152 bus ID: 4-1.1:7 chip ID: 0bda:8153 IF: enx00249b52544a state: up speed: 1000 Mbps duplex: full mac: IF-ID-1: gpd0 state: down mac: N/A Drives: Local Storage: total: 476.94 GiB used: 453.95 GiB (95.2%) ID-1: /dev/nvme0n1 model: CL1-3D512-Q11 NVMe SSSTC 512GB size: 476.94 GiB speed: 31.6 Gb/s lanes: 4 serial: Partition: ID-1: / size: 287.37 GiB used: 226.95 GiB (79.0%) fs: ext4 dev: /dev/nvme0n1p6 USB: Hub: 1-0:1 info: Full speed (or root) Hub ports: 12 rev: 2.0 chip ID: 1d6b:0002 Hub: 1-4:8 info: Genesys Logic 4-port hub ports: 3 rev: 2.1 chip ID: 05e3:0610 Hub: 1-4.2:9 info: Microchip (formerly SMSC) USB 2.0 Hub ports: 4 rev: 2.0 chip ID: 0424:2514 Device-1: 1-4.3:10 info: Action Star Enterprise type: Billboard driver: N/A rev: 2.0 chip ID: 0835:2a01 Device-2: 1-5:3 info: Shenzhen Goodix FingerPrint type: driver: N/A rev: 2.0 chip ID: 27c6:538d Device-3: 1-6:5 info: Realtek Integrated_Webcam_HD type: Video driver: uvcvideo rev: 2.0 chip ID: 0bda:565a Device-4: 1-10:7 info: Intel type: Bluetooth driver: btusb rev: 2.0 chip ID: 8087:0aaa Hub: 2-0:1 info: Full speed (or root) Hub ports: 6 rev: 3.1 chip ID: 1d6b:0003 Hub: 3-0:1 info: Full speed (or root) Hub ports: 2 rev: 2.0 chip ID: 1d6b:0002 Hub: 4-0:1 info: Full speed (or root) Hub ports: 2 rev: 3.1 chip ID: 1d6b:0003 Hub: 4-1:6 info: Genesys Logic USB3.1 Hub ports: 2 rev: 3.1 chip ID: 05e3:0620 Device-5: 4-1.1:7 info: Realtek RTL8153 Gigabit Ethernet Adapter type: Network driver: r8152 rev: 3.0 chip ID: 0bda:8153 Sensors: System Temperatures: cpu: 49.0 C mobo: N/A Fan Speeds (RPM): cpu: 0 Repos: No active apt repos in: /etc/apt/sources.list Active apt repos in: /etc/apt/sources.list.d/additional-repositories.list 1: deb https: //dl.bintray.com/celestia/releases-deb focal main Active apt repos in: /etc/apt/sources.list.d/nordvpn.list 1: deb https: //repo.nordvpn.com/deb/nordvpn/debian stable main Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list 1: deb https: //mirror.aarnet.edu.au/pub/linuxmint-packages ulyssa main upstream import backport 2: deb https: //ubuntu.mirror.digitalpacific.com.au/archive focal main restricted universe multiverse 3: deb https: //ubuntu.mirror.digitalpacific.com.au/archive focal-updates main restricted universe multiverse 4: deb https: //ubuntu.mirror.digitalpacific.com.au/archive focal-backports main restricted universe multiverse 5: deb http: //security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse 6: deb http: //archive.canonical.com/ubuntu/ focal partner Active apt repos in: /etc/apt/sources.list.d/signal-xenial.list 1: deb [arch=amd64] https: //updates.signal.org/desktop/apt xenial main Active apt repos in: /etc/apt/sources.list.d/skype-stable.list 1: deb [arch=amd64] https: //repo.skype.com/deb stable main Active apt repos in: /etc/apt/sources.list.d/spotify.list 1: deb http: //repository.spotify.com stable non-free Active apt repos in: /etc/apt/sources.list.d/teams.list 1: deb [arch=amd64] https: //packages.microsoft.com/repos/ms-teams stable main Info: Processes: 285 Uptime: 17m Memory: 15.43 GiB used: 2.70 GiB (17.5%) Init: systemd v: 245 runlevel: 5 Compilers: gcc: 9.3.0 alt: 7/9 Client: Unknown python3.8 client inxi: 3.0.38

mcatkins commented 1 month ago

Regarding your:

Edit: I should also mention that the mouse pointer suffers from an annoying flicker on the HIDPI screen but behaves normally on the lower resolution external screen. This would suggest there's a rendering problem.

I raised this as a separate issue last week (not having seen this comment), with the title:

Mouse pointer flickers at 200% scaling, with two monitors #12333

I would add that the mouse does not flicker at 175%. Which is lucky, as a workaround! (I'm also on a dell 7000 2-in-1)