Thomas
April 15, 2022, 12:00pm
#1
I hope you can help me to find the problem i searched a lot here but i cant found some hint which resolved the problems yet.
I updated dom0 already to latest kernel. But its still same problem
I used befor 4.0 and there i never had this problems
The Moving of windows have time lag in between aprox 1 sec from postition to next position.
opening a a VM like the “work” Filemanger takes approx 25sec and the shutdown ~19sec
any idea how this could be solved ?
thanks br
i forgot but memory is extended to 64 Gig so enough i think.
There are several ongoing glitches in Qubes R4.1 afaik.
opened 04:31PM - 02 Apr 22 UTC
T: bug
C: gui-virtualization
C: Xen
P: blocker
diagnosed
[How to file a helpful issue](https://www.qubes-os.org/doc/issue-tracking/)
#… ## Qubes OS release
4.1 current-testing in dom0, fedora-35 and debian-11 templates
### Brief summary
There appears to be a memory leak when starting applications in VMs. Closing applications does not free all the memory that was allocated. Starting and killing applications over and over will eventually OOM the VM and things like Xorg will no longer function. Given that this is observable with 2 programs (nautilus and vlc), I believe this to be a Qubes issue
### Steps to reproduce
Start an AppVM and check memory usage:
```
[user@disp1785 ~]$ free -m
total used free shared buff/cache available
Mem: 1166 311 513 2 341 713
Swap: 1023 0 1023
```
Run this funny loop for a while
```
while true; do
nautilus & sleep 1
pkill nautilus
done
```
After a while, check the memory usage again
```
[user@disp834 ~]$ free -m
total used free shared buff/cache available
Mem: 1166 811 85 1 269 214
Swap: 1023 3 1020
```
### Expected behavior
the VM does not run out of memory
### Actual behavior
the VM runs out of memory
opened 01:44PM - 16 Feb 21 UTC
T: bug
C: kernel
P: major
needs diagnosis
**Qubes OS version**
4.0
**Affected component(s) or functionality**
…
Dom0 / Qrexec?
**Brief summary**
During/after shutdown of a VM, Dom0 partially freezes (I can partially interact with UI, also from VMs, but not all). The VM appears red in the Qubes Manager widget. When I choose "Kill" there, a message containing "Domain is powered off" appears, but nothing else changes.
**How Reproducible**
Almost always appears, although freeze times differ a lot
**To Reproduce**
Steps to reproduce the behavior:
1. shutdown a domain (no matter if standalone or from template)
2. see dom0 partially freeze
3. wait a few (sometimes up to 20 or more) minutes
4. VM shows powered off and system goes back to normal
**Expected behavior**
VM shuts down clean
**Actual behavior**
- Dom0 partially freezes. I can interact with some UI, also from VMs, but generally not open any new windows in VM or Dom0, switch tabs in browser etc.. Qrexec also does not react. Sometimes in between I can not interact at all.
- The VM appears red in the Qubes Manager widget. When I choose "Kill" there, a message containing "Domain is powered off" appears, but nothing else changes.
- The VM's log itself shows a clean shutdown, from what I can tell
- After some time the VM appears shutdown and everything goes back to normal
**Additional context**
This has been happening for quite a long time, i just manged to take care about it now. So i cannot say anymore, what specific package versions were present at that time, just that it's a 4.0 install.
**Solutions you've tried**
Went through a few upgrades of Xen, Kernels and so on for about a year, but no change
**Relevant [documentation](https://www.qubes-os.org/doc/) you've consulted**
searched the issues archive and mailing list
One of the significant downside is that Qubes OS boots show and shutdowns slow.
I kind of understand why Qubes OS shutdowns slow - that is because Qubes OS want to shut down the remaining appVMs (what I do not understand is that why a VM using 10GB ram spends ~2 minutes shutting down, and ~5 minutes if it has 20GB ram; I suspect that the VM spends their time flushing the memory cache).
I does not understand why Qubes OS boots slow. Usually it takes more than 5 minutes to boot up. By pressing F…
Also saying “latest kernel” is ambiguous - if you suspect that the problem lies in linux kernel (which is probable for new hardwares), you do not “update” to the latest kernel but rather try kernel-latest
. The following documentation page talks about the difference between kernel
, kernel-latest
, kernel-qubes-vm
and kernel-latest-qubes-vm
.
You might also want to check if the CPU is running at the proper speed:
opened 10:23PM - 12 Dec 18 UTC
T: bug
C: Xen
P: major
hardware support
needs diagnosis
### Qubes OS version:
<!-- (e.g., `R3.2`)
You can get it from the dom0 te… rminal with the command
`cat /etc/qubes-release`
Type below this line. -->
R4.0
### Affected component(s):
intel_pstate
acpi-cpufreq
xenpm
---
### Steps to reproduce the behavior:
<!-- Use single backticks (`) for in-line code snippets and
triple backticks (```) for code blocks.
Type below this line. -->
Tested on:
- Lenovo T480s
- Lenovo X1 Carbon Gen. 6
- Huawei Matebook X Pro.
All with Intel i7-8550U.
Latest BIOS revisions for the respective systems as of Dec. 2018
Kernel: 4.19.2-3.pvops.qubes.x86_64.
EFI install.
In dom0, `sudo xenpm get-cpufreq-para`
### Expected behavior:
The processor is rated at 1.8 GHz (4.0 turbo), so we would expect to see appropriate scaling in that range, available frequencies from 1800000 - 4000000.
Further, we would expect to see `scaling_driver = intel_pstate`.
### Actual behavior:
The CPU frequencies do not scale correctly. Why?
Frequencies are pinned at 2 GHz max, 400 MHz min, across all cores.
```
# xenpm cpu-freq-para
...
cpu id : 0
affected_cpus : 0
cpuinfo frequency : max [2001000] min [400000] cur [2001000]
scaling_driver : acpi-cpufreq
scaling_avail_gov : userspace performance powersave ondemand
current_governor : ondemand
ondemand specific :
sampling_rate : max [10000000] min [10000] cur [20000]
up_threshold : 80
scaling_avail_freq : 2001000 2000000 1900000 1800000 1700000 1500000 1400000 1300000 1200000 1100000 1000000 800000 700000 600000 500000 *400000
scaling frequency : max [2001000] min [400000] cur [400000]
turbo mode : enabled
...
```
Confirmed with `watch -n1 "cat /proc/cpuinfo | grep \"[c]pu MHz\""`
`xenpm set-scaling-maxfreq` and `-minfreq` have no effect.
`xenpm get-cpufreq-states` shows 16 total/usable P-states.
Changing the governor to `performance` has no effect. Default is `ondemand`
`dmidecode` reports a max of 2 GHz on the Lenovos, and an apparently erroneous speed on the Huawei (~ 8 GHz).
```
# dmidecode | grep -i speed
Speed: 2400 MT/s
Configured Clock Speed: 2400 MT/s
Speed: 2400 MT/s
Configured Clock Speed: 2400 MT/s
Speed: Unknown
Speed: Unknown
Speed: Unknown
Max Speed: 2000 MHz
Current Speed: 1800 MHz
```
The `scaling_driver` is legacy `acpi-cpufreq`. Interestingly, `intel_pstate` can be seen initializing during boot, but it does not take over handling anything. Attempting to `blacklist acpi-cpufreq` in `modprobe.d` has no effect.
```
# dmesg | grep pstate
[ 5.067624] intel_pstate: Intel P-state driver initializing
```
`/sys/devices/system/cpu/intel_pstate/` contains the expected attributes, but as mentioned in the "related issue" linked below, `no_turbo`, `num_pstates`, and `turbo_pct` error `Resource temporarily unavailable`.
`/sys/devices/system/cpu/intel_pstate/status` always returns `off`, and does not respond to `echo "active" >`. This behavior has been tested with various kernel command line parameters, including `intel_pstate=force`, `intel_pstate=disabled`, `intel_pstate=no_hwp`, `intel_pstate=enable` with no change in performance aside from `../cpu/intel_pstate/` attributes disappearing when `no_hwp` or `disabled` were in effect. Also tried `processor.ignore_ppc=1`.
Strangely, none of the appropriate attributes for `cpufreq` exist in `/sys/devices/system/cpu/cpu*/`.
```
# ls /sys/devices/system/cpu/cpu0/
acpi_cppc driver hotplug power topology
cache firmware_node node0 subsystem uevent
```
`lsmod | grep cpufreq` shows no results, trying to `modprobe acpi-cpufreq` or `cpufreq-xen` returns errors. `xen_acpi_processor` is loaded.
```
# modprobe acpi-cpufreq
modprobe: ERROR: could not insert 'acpi_cpufreq': No such device
# modprobe cpufreq-xen
modprobe: FATAL: Module cpufreq-xen not found in directory /lib/modules/4.19.2-3.pvops.qubes.x86_64
```
`cpupower frequency-info` is completely unresponsive, with zero information available about the processor.
```
analyzing CPU 0:
no or unknown cpufreq driver is active on this CPU
CPUs which run at the same hardware frequency: Not Available
CPUs which need to have their frequency coordinated by software: Not Available
maximum transition latency: Cannot determine or is not supported.
Not Available
available cpufreq governors: Not Available
Unable to determine current policy
current CPU frequency: Unable to call hardware
current CPU frequency: Unable to call to kernel
boost state support:
Supported: yes
Active: yes
```
Though it shouldn't have any effect, testing was attempted with `smt=on` and `off`, and `Hyperthreading` enabled/disabled in the BIOS appropriately.
Testing was also performed while toggling various BIOS settings.
- enable/disable `Intel SpeedStep`
- power settings at `Maximum Performance` vs. `Balanced`
It does not appear to be a thermal throttling issue, with idle ~ 37*C and under load ~60*C observed consistently.
`tlp` was tested with no effect on the frequency scaling, regardless of being enabled or disabled. `tlp-stat` yields minimal additional info, with what seems to be an outdated recommendation for the Lenovos to install `tp-smapi kernel modules`, that are in fact deprecated in favor of `thinkpad_acpi`, which appears to be active on the Thinkpads.
```
dmesg | grep thinkpad
[ 19.589434] thinkpad_acpi: ThinkPad ACPI Extras v0.26
[ 19.589439] thinkpad_acpi: http://ibm-acpi.sf.net/
[ 19.589440] thinkpad_acpi: ThinkPad BIOS N22ET50W (1.27 ), EC unknown
[ 19.589441] thinkpad_acpi: Lenovo ThinkPad T480s, model 20L7CTO1WW
[ 19.591883] thinkpad_acpi: radio switch found; radios are enabled
[ 19.591898] thinkpad_acpi: This ThinkPad has standard ACPI backlight brightness control, supported by the ACPI video driver
[ 19.591899] thinkpad_acpi: Disabling thinkpad-acpi brightness events by default...
[ 19.612278] thinkpad_acpi: rfkill switch tpacpi_wwan_sw: radio is unblocked
[ 19.643468] thinkpad_acpi: Standard ACPI backlight interface available, not loading native one
[ 19.674512] thinkpad_acpi: battery 1 registered (start 0, stop 100)
[ 19.674576] input: ThinkPad Extra Buttons as /devices/platform/thinkpad_acpi/
```
`thermald` is not loaded.
### General notes:
https://www.kernel.org/doc/html/v4.12/admin-guide/pm/intel_pstate.html
- This link suggests removing `irqbalance` but I'm skeptical.
https://askubuntu.com/questions/1067866/ubuntu-18-04-steam-games-frame-rate-drop/1073353#1073353?newreg=c7c120f373da4effb7317104571cd573
- https://cateee.net/lkddb/web-lkddb/XEN_ACPI_PROCESSOR.html
Regarding xen_acpi_processor: "It also registers itself as the SMM so that other drivers (such as ACPI cpufreq scaling driver) will not load."
How could `lsmod` report `xen_acpi_processor` as loaded but `xenpm` shows the scaling driver `acpi-cpufreq` ? This might make sense as to the missing `/sys/devices/.../cpufreq` entries.
- The following exchange is dubious at best, the final post gets down to the point of disabling intel microcode. They also suggest the use of `msr-tools`, but that really shouldn't be necessary.
https://bbs.archlinux.org/viewtopic.php?id=231077
- This is good work, but in my opinion, running a script every few seconds in dom0 isn't a legitimate fix.
https://github.com/erpalma/lenovo-throttling-fix
---
### Related issues:
https://github.com/QubesOS/qubes-issues/issues/4491
https://github.com/QubesOS/qubes-issues/issues/450
This issue is about Intel but I’ve seen similar reports about Ryzen CPU’s on the forum. Afaik a kernel parameter would fix it.
EDIT:
Here’s a solution for a slow Ryzen issue: [qubes-users] HCL - Lenovo P14s (AMD Ryzen 7 Pro 4750U) - #2 by Sven
1 Like