hluk / CopyQ

Clipboard manager with advanced features
GNU General Public License v3.0
8.81k stars 449 forks source link

Strange Behavior with copyQ: List View and Appearance on NVIDIA 470 #1835

Open th-lange opened 2 years ago

th-lange commented 2 years ago

Describe the bug I use copyQ on multiple computers and only have this issue on one computer. I think it is related to my GPU.

It happens independent of the way I install it (ubuntu repo, ppa or flatpack).

The main issue is, that my copyQ Screen does not show Items in the List view but only a color (blue on flatpack installs, green on repo installs). I added a screenshot. You can see, that the "Preview" Screen (F7) is working, just not the list view.

image

When I start copyQ - I also get a warning:

>  flatpak run com.github.hluk.copyq                                                                                                                                         ✔  3m 13s 

Gtk-Message: 10:34:35.672: Failed to load module "xapp-gtk3-module"

The next (related?) issue is, that when I open the Preferences:Appearance, my Mem Usage of CopyQ Spikes to 21GB

image

When staying inside Preferences and switching between Appearance and other items (Appearance -> Items -> Appearance -> General) this slowly grows. Leaving preferences ends the issue! (Mem down to 10-15MB)

To Reproduce Steps to reproduce the behavior (ListView):

  1. Copy simple items
  2. Show CopyQ

Steps to reproduce the behavior (Settings):

  1. Show CopyQ
  2. Open SystemMonitor
  3. CopyQ -> Open Preferences
  4. Preferences -> Open Appearance
  5. System Memory Spikes (21GB!)

Expected behavior Well - all times displayed and no memory spike...

Screenshots Scrrenshot see above.

Version, OS and Environment CopyQ

CopyQ Clipboard Manager v5.0.0
Qt: 5.15.3
KNotifications: 5.86.0
Compiler: GCC
Arch: x86_64-little_endian-lp64
OS: KDE Flatpak **runtime**

System

System:    Kernel: 5.11.0-40-generic x86_64 bits: 64 compiler: N/A Desktop: Cinnamon 5.0.7 wm: muffin 5.0.2 dm: LightDM 1.30.0 
           Distro: Linux Mint 20.2 Uma base: Ubuntu 20.04 focal 
Machine:   Type: Desktop System: Micro-Star product: MD34964 v: 1.0 serial: <filter> 
           Mobo: Micro-Star model: B550M PRO-VDH WIFI (MS-7C95) v: 1.0 serial: <filter> UEFI: American Megatrends LLC. v: 2.60 
           date: 01/14/2021 
Battery:   Device-1: hidpp_battery_0 model: Logitech Craft Advanced Keyboard serial: <filter> charge: 55% (should be ignored) 
           rechargeable: yes status: Discharging 
           Device-2: hidpp_battery_1 model: Logitech Wireless Mouse MX Master 3 serial: <filter> 
           charge: 100% (should be ignored) rechargeable: yes status: Discharging 
CPU:       Topology: 8-Core model: AMD Ryzen 7 5800X bits: 64 type: MT MCP arch: Zen 3 L2 cache: 4096 KiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 121594 
           Speed: 2198 MHz min/max: 2200/3800 MHz boost: enabled Core speeds (MHz): 1: 2199 2: 2213 3: 2202 4: 2198 5: 2194 
           6: 2198 7: 2197 8: 2200 9: 2199 10: 2198 11: 2193 12: 2218 13: 2199 14: 2200 15: 2199 16: 2195 
Graphics:  Device-1: NVIDIA vendor: ZOTAC driver: nvidia v: 470.82.00 bus ID: 2b:00.0 chip ID: 10de:2484 
           Display: x11 server: X.Org 1.20.11 driver: nvidia unloaded: fbdev,modesetting,nouveau,vesa 
           resolution: 5120x1440~60Hz, 2560x1440~60Hz 
           OpenGL: renderer: NVIDIA GeForce RTX 3070/PCIe/SSE2 v: 4.6.0 NVIDIA 470.82.00 direct render: Yes 
Audio:     Device-1: NVIDIA vendor: ZOTAC driver: snd_hda_intel v: kernel bus ID: 2b:00.1 chip ID: 10de:228b 
           Device-2: Advanced Micro Devices [AMD] Starship/Matisse HD Audio vendor: Micro-Star MSI driver: snd_hda_intel 
           v: kernel bus ID: 2d:00.4 chip ID: 1022:1487 
           Device-3: GN Netcom type: USB driver: jabra,snd-usb-audio,usbhid bus ID: 3-1.4.2:15 chip ID: 0b0e:245d 
           serial: <filter> 
           Sound Server: ALSA v: k5.11.0-40-generic 
Network:   Device-1: Intel Dual Band Wireless-AC 3168NGW [Stone Peak] driver: iwlwifi v: kernel bus ID: 29:00.0 
           chip ID: 8086:24fb 
           IF: wlo1 state: up mac: <filter> 
           Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: Micro-Star MSI driver: r8169 v: kernel 
           port: f000 bus ID: 2a:00.0 chip ID: 10ec:8168 
           IF: enp42s0 state: down mac: <filter> 
           IF-ID-1: br-392dfa9a9aed state: down mac: <filter> 
           IF-ID-2: br-d4c093b422fb state: down mac: <filter> 
           IF-ID-3: docker0 state: down mac: <filter> 
Drives:    Local Storage: total: 953.87 GiB used: 226.43 GiB (23.7%) 
           ID-1: /dev/nvme0n1 model: E12-1TB-PHISON-SSD-B27-BB1 size: 953.87 GiB speed: 31.6 Gb/s lanes: 4 serial: <filter> 
           rev: ECFM22.6 scheme: GPT 
           ID-2: /dev/nvme1n1 vendor: Samsung model: SSD 970 EVO Plus 1TB size: 931.51 GiB speed: 31.6 Gb/s lanes: 4 
           serial: <filter> rev: 2B2QEXM7 scheme: GPT 
Partition: ID-1: / size: 915.40 GiB used: 226.40 GiB (24.7%) fs: ext4 dev: /dev/nvme1n1p2 
Sensors:   System Temperatures: cpu: 41.1 C mobo: N/A gpu: nvidia temp: 37 C 
           Fan Speeds (RPM): N/A gpu: nvidia fan: 0% 
Repos:     No active apt repos in: /etc/apt/sources.list 
           Active apt repos in: /etc/apt/sources.list.d/docker.list 
           1: deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu focal stable
           Active apt repos in: /etc/apt/sources.list.d/google-chrome.list 
           1: deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
           Active apt repos in: /etc/apt/sources.list.d/google-cloud-sdk.list 
           1: deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main
           Active apt repos in: /etc/apt/sources.list.d/hluk-copyq-focal.list 
           1: deb http://ppa.launchpad.net/hluk/copyq/ubuntu focal main
           Active apt repos in: /etc/apt/sources.list.d/neovim-ppa-stable-focal.list 
           1: deb http://ppa.launchpad.net/neovim-ppa/stable/ubuntu focal main
           Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list 
           1: deb https://ftp.fau.de/mint/packages uma main upstream import backport
           2: deb http://artfiles.org/ubuntu.com focal main restricted universe multiverse
           3: deb http://artfiles.org/ubuntu.com focal-updates main restricted universe multiverse
           4: deb http://artfiles.org/ubuntu.com 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/sublime-text.list 
           1: deb https://download.sublimetext.com/ apt/stable/
           Active apt repos in: /etc/apt/sources.list.d/vscode.list 
           1: deb [arch=amd64,arm64,armhf] http://packages.microsoft.com/repos/code stable main
Info:      Processes: 405 Uptime: 9m Memory: 31.28 GiB used: 3.88 GiB (12.4%) Init: systemd v: 245 runlevel: 5 Compilers: 
           gcc: 9.3.0 alt: 9 Shell: zsh v: 5.8 running in: guake inxi: 3.0.38 

Running with Debug: (Normal Copy operation)

DEBUG: [qt5ct] QtDebug: using qt5ct plugin
DEBUG: Server "/home/letigre/.config/copyq/.copyq_s" started.
DEBUG: [qt5ct] QtDebug: D-Bus global menu: no
DEBUG: Geometry: Window "MainWindow": New geometry "Options/MainWindow_geometry_screen_1": 645x421,6077,509 -> 645x421,6077,509
DEBUG: Focus window is "Guake!"
DEBUG: Loading configuration
DEBUG: [qt5ct] QtDebug: D-Bus system tray: yes
DEBUG: Configuration loaded
DEBUG: Starting monitor
DEBUG: Executing: copyq --clipboard-access monitorClipboard
DEBUG: Starting callback: onStart
DEBUG: Executing: copyq onStart
DEBUG: Got theme change event
DEBUG: Got save state request from session manager.
DEBUG: Loading configuration
DEBUG: Terminating monitor
DEBUG: Configuration loaded
DEBUG: Monitor finished
DEBUG: Starting monitor
DEBUG: Executing: copyq --clipboard-access monitorClipboard
DEBUG: Focus window is "Guake!"
DEBUG: Tab "&clipboard": Loading items
DEBUG: Tab "&clipboard": 2 items loaded
DEBUG: Raising window "CopyQ"
DEBUG: Geometry: Window "MainWindow": New geometry "Options/MainWindow_geometry": 645x421,2237,509 -> 645x421,2237,509
DEBUG: Executing: copyq eval -- runMenuCommandFilters()
DEBUG: Saving items on application state change (2)
DEBUG: Focus window is "Guake!"
DEBUG: Auto-hiding unfocused main window
DEBUG: Focus window is "Guake!"

Running with Debug: (Open Settings): There was no output to DEBUG Logs - in the whole 5 secs it took. When ready, it stated:

DEBUG: Saving items on application state change (2)
DEBUG: Geometry: Window "ConfigurationManager": Save geometry "Options/ConfigurationManager_geometry_5120x1440": 1661x752,2220,433
DEBUG: Saving items on application state change (2)
hluk commented 2 years ago

Thanks for the detailed report.

Looks like this is same as #1728.

Can you try overriding the app style with the following commands?

# List available styles
❯ flatpak run com.github.hluk.copyq styles
HighContrastInverse
HighContrast
Adwaita-HighContrastInverse
Adwaita-HighContrast
Adwaita-Dark
Adwaita
Breeze
Windows
Fusion

# Pick an available style
❯ flatpak run com.github.hluk.copyq config style Adwaita

# See if it helps (if not try also restarting the app).
❯ flatpak run com.github.hluk.copyq show
Multiboxer commented 2 years ago

Have had this exact issue twice before and each occurrence was resolved by swapping to a different theme and back again in Preferences > Appearance, similar to as mentioned above.

th-lange commented 2 years ago

Hello,

thx for your help and sorry for me replying that late.

But it did not help. I tried switching between different styles. To no avail. What struck me, though, was that I only had 3 styles:

~ flatpak run com.github.hluk.copyq styles
Breeze Windows Fusion

Is this an issue? Is there an issue with my Flatpak setup? The same is the case for my regular installation...

th-lange commented 2 years ago

In anyway... For me this does not only happen with flatpak. It happens with all forms of copyQ installations....

Even with releases as old as v3.10.0... This is strange. Because there is nothing in the logs that shoves me in a direction or gives hints on how to solve. I will now try to boot from a USB stick and see what happens... I currently assume, it has something to do with my graphics card / driver—or the installation thereof.... And will try to rule that out.... If this not should be the case, I will just try a clean reinstall....

th-lange commented 2 years ago

Ok. I did a clean install of linux mint 20.2 It did work, until I installed the nvidia-driver 470.... As xorg / nouveau was not working for me....

So I assume, this is not a copyq issue. But either a driver / graphics stack issue... Or something...

I wanted to thank the everyone woking on this project! It is a awesome tool! Thx to you all. Thx to those who tried to provide help. It is much appreciated!

If anyone has a hint on how to debug or find out how to solve this issue please ping me!

Apart from that - I no longer think this is a bug of copyq... Rather a issue somewhere in how qt and nvidia play together. So I think (... sadly...) this can be closed....

th-lange commented 2 years ago

Ok. This does not work on any other distro as well. Tried different flavors of manjaro and mx-linux. It seems to be related to nvidia.