My New Thinkpad P51

Hello,
some time ago I decided to switch back from QubeOS to Windows because of problems that I could not solve in any way. The switch to Windows turned out to be a nightmare: windows started running slow after a very short time and I noticed bugs in windows that contributed to my return to qubes. These “bugs” or in other words “inconveniences” are:

  • inability to create and switch between desktops (the way qubes works);
  • inability to create certificates via the CLI (windows supposedly has something like “wsl”, but running this still causes problems);
  • Hyperv enabled in Windows 10 crashes the network card after a while (this problem has occurred to me on a PC and several laptops over the past few years - the effect is always the same: wifi and ethernet card suddenly stop working, and windows makes it impossible to uninstall the network card from device manager);
  • no possibility to easily separate the business browser from the private browser;
  • no ability to create an independent and private space where I could store passwords or ssh keys;
  • No ability to create independent and separate network connections (firefox_private → vpn, firefox_services → company vpn);
  • Billions of useless notifications;
  • Windows always stutters after a while (even on hardware with i5-8th 3.0Ghz - 3.7Ghz configuration + 16GB RAM + Nvme);;

I realized that Qubes works well on a think business desktop computer, while I always had problems with a private Dell E6520 laptop with i5-2th.
So I decided to buy a new and powerful machine under Qubes.

I searched the entire forum for the “perfect” and reliable hardware and the best recommendation I found is the Lenovo Thinkpad P51 recommended by @Sven https://forum.qubes-os.org/t/community-recommended-computers/5560. I decided to purchase the unit recommended by Sven.
The laptop turned out to be a powerful beast, however, only after making some optimizations, which I will present below (to the qubes team:Shouldn’t models like the P51 have the ability to automatically import the best and community-tested configuration, the so-called hardware profiles)?

My configuration:.
Processor: Intel core i7-7820hq
Screen: 1920x1060
RAM: 32GB
Disk: 1TB Nvme
Filesystem: BTRFS

Word of introduction.
There is a certain belief on this forum according to which the Nvidia graphics card is useless, and the best choice is to use only integrated graphics - a strange and quite erroneous belief. If Nvidia’s processor is responsible for the graphics then the computer should run faster, because Intel’s processor will be relieved; if intel’s processor is responsible for displaying the image, the processor’s performance will drop.

Qubes on Thinkpad P51 - attempt one.
The first thing I did was to update the bios and calibrate the Pantone screen from within Windows.
Then I went into the bios: enabled discrete graphics mode, disabled secure boot mode and enabled “legacy” boot mode. I also changed the power plan and c-state performance in the BIOS to: max_performance . I applied this setting for battery power and AC power.

I then performed the installation of Qubes.
Everything worked properly, however, I had some concerns:

  1. Qubes ran quite slowly;
  2. it took 43s to start all the automatically booting vm’s;
  3. the indicated options did not keep up with the cursor;

Faced with the above drawbacks, I rebooted and changed the graphics to “hybrid” - unfortunately, qubes would no longer boot (I suspect that the nvidia driver was not carried over by the qubes installer).

Approach 2: UEFI + discrete graphics.
I performed a Qubes installation.
Everything worked correctly, however, I still had some concerns:

  1. Qubes was running quite slowly;
  2. it took 38s to start all auto-booting vm’s;
  3. the indicated options did not keep up with the cursor;

Approach 3: UEFI + Hybrid graphics.
I performed a Qubes installation.
Qubes worked fine, except for the following caveats:

  1. The laptop heated up a lot, I had to have the laptop stand on at all times;
  2. it took 36s to start all automatically vm’s;
  3. After a while, the screen started “flashing” for a short while, so I decided to try to switch to discrete graphics. Unfortunately - the startup of all automatic vmek increased by 8s, while the system took much longer to load after logging into the system.

Approach 4: I leave UEFI + hybrid graphics. I try to install the official nvidia driver.

I attempted to install the driver based on the instructions found on the forum. I downloaded the driver from the nvidia website (file: nvidia.run), then unzipped the archive in Dom0, performed compilation and copied the driver to the system. After restarting the computer, the system sort of “slowed down” - it took 39s to start all automatic vmek.
I decided to perform the uninstallation of the driver, however, the effect was still the same.

Repair: approach 4: return to Noveau.
1 I entered the terminal and typed the command:

Xorg -configure

Then I copied open the file with the following command:

vim /root/xorg.conf.new

and next to the graphics card item “Nvidia” I entered the driver: noveau.

Finally, I moved the file that replaced the previous "incorrect “configuration file” of Xorg with the following command:

mv /root/xorg.conf.new /etc/X11/xorg.conf

Then I typed the command:

xinit

And I performed a reboot of the computer. **After the reboot, the startup of all automatic vmek was 18s.

** Approach 5: experimental implementation of Zram based on the instructions:** How To Set And Use ZRAM swap .

  1. zram installation and configuration caused me a bit of a problem because:
  • I tried to perform the intrusion while installing the zram package, which turned out to be redundant and messed up unnecessarily; Zram is implemented in the kernel by default.
  • The “zram_swap” service coming from the “zram” package overlapped with the manually added “zram_swap.service” service script. Uninstalling the “zram” package and restarting the computer fixed this small problem;
  1. after deploying Zram based on the above instructions and creating /dev/zram0 of 32GB + installing Zram in Fedora_37 template + reducing max_mem_Dom0 from 4GB to 1536MB:
    The computer runs like lightning: All auto-starting vmks start in 10s;
    All processes load mega fast - it takes only 10s from login to “fully ready”;
    I am currently writing this post in firefox browser - the computer has not yet fired up its fans at all. Of course, the computer runs very fast with various types of workloads and a large number of fired up vmek.

In summary: Nvidia + UEFI + noveau re-initialization + Zram implementation and reducing max_mem_Dom0 = turbo fast Thinkpad P51.

I’ve included my “history” command log below - feel free to analyze the log.

1  cd grub.d
    2  ls
    3  cd ..
    4  ls
    5  modprobe zram num_devices=1
    6  bash -c "echo lz4hc > /sys/block/zram0/comp_algorithm"
    7  sudo bash -c "echo 32G > /sys/block/zram0/disksize"
    8  mkswap --label zram0 /dev/zram9
    9  mkswap --label zram0 /dev/zram0
   10  swapon -priority 32767 /dev/zram0
   11  swapon --priority 32767 /dev/zram0
   12  zramctl
   13  bash -c "echo 1 > /sys/block/zram0/reset"
   14  qvm-run --pass-io disp625 'cat /user/zram_start' > /usr/local/bin
   15  qvm-run --pass-io disp625 'cat /user/zram_start' > /usr/local/bin/
   16  qvm-run --pass-io disp625 'cat /user/zram_start' > /usr/local/bin/zram_start
   17  qvm-run --pass-io disp625 'cat /home/user/zram_start' > /usr/local/bin/zram_start
   18  qvm-run --pass-io disp625 'cat /home/user/zram_stop' > /usr/local/bin/zram_stop
   19  qvm-run --pass-io disp625 'cat /home/user/zram_swap.service' > /etc/systemd/system/zram_swap.service
   20  systemctl enable zram-swap.service
   21  qubes-update-dom0 zram
   22  qubes-dom0-update zram
   23  systemctl enable zram-swap.service
   24  ls /usr/local/zswap
   25  ls /usr/local/bin
   26  ls /etc/systemd/system
   27  systemctl enable zram-swap.service
   28  vim /etc/sysctl.d/99-sysctl.conf
   29  vim /etc/sysctl.conf
   30  vim /etc/sysctl.d/99-sysctl.conf
   31  systemctl daemon-reload
   32  sysctl -p
   33  vim /etc/default/grub
   34  vim /etc/default/grub
   35  LS
   36  ls
   37  rm grub.swp
   38  vim /etc/default/grub
   39  rm .grub.swp
   40  rm /etc/default/grub.swp
   41  rm /etc/default/.grub.swp
   42  vim /etc/default/grub
   43  grub2-mkconfig -o /boot/grub2/grub.cfg
   44  grub2-mkconfig -o /boot/efi/EFI/qubes/grubx64.cfg
   45  xenpm
   46  xenpm get-cpufreq-average
   47  xenpm get-cpufreq-para
   48  xenpm get-cpufreq-states
   49  freemem
   50  free mem
   51  xl top
   52  xl dmesg
   53  journalctl -b 0 -p 0
   54  journalctl -b 0 -p 0...3
   55  journalctl -b 0 -p 3
   56  journalctl -b 0 -p 2
   57  journalctl -b 0 -p 1
   58  journalctl -b 0 -p 0
   59  journalctl -b 0 -p 4
   60  journalctl -b 0 -p 5
   61  journalctl -b 0 -p 6
   62  journalctl -b 0 -p 7
   63  exit
   64  exit
   65  grub2-mkconfig -o /boot/efi/EFI/qubes/grubx64.cfg
   66  grub2-mkconfig -o /boot/efi/EFI/qubes/grubx64.cfg
   67  grub2-mkconfig -o /boot/grub2/grub.cfg
   68  cat /proc/cmdline
   69  sudo grub2-mkconfig -o /boot/grub2/grub.cfg
   70  cd /etc/grub.d
   71  ls
   72  cd ..
   73  cd grub
   74  cd default
   75  ls
   76  vim grub
   77  ls
   78  cd ..
   79  cd grub.d
   80  ls
   81  cat 40_custom
   82  cat 41_custom
   83  sudo grub2-mkconfig -o /boot/grub2/grub.cfg
   84  dracut -f
   85  cd /boot/efi/EFI/qubes
   86  ls
   87  vim grub.cfg
   88  ls
   89  cd /etc/default
   90  ls -lat
   91  cd grub
   92  vim grub
   93  sudo dracut -f
   94  ls
   95  cd ..
   96  ls
   97  cd grub.
   98  cd grub.d
   99  ls
  100  ls 00_heaser
  101  cat readme
  102  cat README
  103  qvm-run --pass-io personal 'cat /home/user/s' > /home/pawelek85/s
  104  cd ~/
  105  ls
  106  cd ..
  107  ls
  108  cd home
  109  cd pawelek85
  110  ls
  111  cat s
  112  qvm-features dom0 gui-videoram-min $(xrandr --verbose | grep "Screen 0" | sed -e 's/.*current //' -e 's/\,.*//' | awk '{print $1*$3*4/1024}')
  113  grub2-install --efi-directory /boot/
  114  qubes-dom0-update modinfo
  115  qubes-dom0-update grub2
  116  qubes-dom0-update modinfo.sh
  117  vim /biit/efi/EFI/qubes/xen.
  118  vim /boot/efi/EFI/qubes/xen.cfg
  119  cd /boot/efi
  120  cd EFI
  121  cd qubes
  122  ls
  123  vim grub.cfg
  124  grub2-install --efi-directory /boot/cat xen.efi
  125  cat xen.efi
  126  history
  127  exit
  128  ls
  129  exit
  130  exit
  131  cd /boot/efi/EFI
  132  cd qubes
  133  ls
  134  vim grub.cfg
  135  cat grubx64.conf
  136  cat grubx64.cfg
  137  grub2-install
  138  qubes-dom0-update grub2-efi shim grub2-tools
  139  qubes-dom0-update grub2-efi shim grub2-tools
  140  grub2-install --efi-directory /boot/cat xen.efi
  141  qubes-dom0-update grub-pc
  142  qubes-dom0-update grub-pc-bin
  143  qubes-dom0-update grub-efi
  144  qubes-dom0-update grub-x86_x64-efi
  145  dnf reinstall grub2-efi shim grub2-tools
  146  grub2-install --efi-directory /boot/
  147  qubes-dom0-update grub-x86_x64-efi --action=search
  148  cd /etc/sysconfig
  149  vim grub
  150  sudo grub2-mkconfig -o /boot/efi/EFI/qubes/grub.cfg
  151  cd /boot/efi/EFI/qubes
  152  vim grub.cfg
  153  qubes-dom0-update pantone --action=search
  154  qubes-dom0-update gcc kmod grub2-tools perl-bignum make
  155  qubes-dom0-update kernel-latest-devel
  156  qubes-dom0-update kernel-latest-devel
  157  qvm-run --pass-io personal 'cat /home/user/Downloads/NVIDIA.run > /home/pawelek85/Downloads/NVIDIA.run
  158  qvm-run --pass-io personal 'cat /home/user/Downloads/NVIDIA.run' > /home/pawelek85/Downloads/NVIDIA.run
  159  cd Downloads
  160  ls
  161  chmod +x NVIDIA.run
  162  ./NVIDIA.run --ui=none --n--exctract-only
  163  ls
  164  cd NVIDIA-Linux-x86_64-525.116.03 
  165  ls
  166  make module IGNORE_XEN_PRESENCE=y 
  167  make module IGNORE_XEN_PRESENCE=y CC="gcc-DNV_VMAP_4_PRESENT -DNV_SIGNAL_STRUCT_RLIM"
  168  cd kernel
  169  make module IGNORE_XEN_PRESENCE=y CC="gcc-DNV_VMAP_4_PRESENT -DNV_SIGNAL_STRUCT_RLIM"
  170  sudo make module IGNORE_XEN_PRESENCE=y CC="gcc-DNV_VMAP_4_PRESENT -DNV_SIGNAL_STRUCT_RLIM"
  171  sudo make module IGNORE_XEN_PRESENCE=y CC="gcc -DNV_VMAP_4_PRESENT -DNV_SIGNAL_STRUCT_RLIM"
  172  ls
  173  uname -r
  174  echo "blacklist nouveau">> /etc/modprobe.d/blacklist.conf"
  175  echo "blacklist nouveau">> /etc/modprobe.d/blacklist.conf
  176  grub2-install --efi-directory /boot/
  177  sudo grub2-mkconfig -o /boot/efi/EFI/qubes/grub.cfg
  178  qubes-dom0-update kernal-latest-devel
  179  qubes-dom0-update kernal-devel-latest
  180  qubes-dom0-update kernal-devel
  181  qubes-dom0-update kernel-devel-latest
  182  qubes-dom0-update kernel-devel
  183  uname -r
  184  cd Downloads
  185  ls
  186  cd NVIDIA-Linux-x86_64-525.116.03 
  187  ls
  188  sudo make module IGNORE_XEN_PRESENCE=y CC="gcc -DNV_VMAP_4_PRESENT -DNV_SIGNAL_STRUCT_RLIM"
  189  cd kernel
  190  sudo make module IGNORE_XEN_PRESENCE=y CC="gcc -DNV_VMAP_4_PRESENT -DNV_SIGNAL_STRUCT_RLIM"
  191  cp nvidia.ko /lib/modules/$(uname -r)/extra
  192  depmod -a; modinfo nvidia
  193  vim /etc/sysconfig/grub
  194  grub2-mkconfig -o /boot/efi/EFI/qubes/grub.cfg
  195  sudo -i
  196  cd /etc
  197  ls
  198  locate Input
  199  updatedb
  200  locate Input
  201  cd qubes-rpc
  202  vim qubes.InputTablet
  203  cd Downloads
  204  ls
  205  exit
  206  ls
  207  ./NVIDIA.run
  208  glxinfo 
  209  glxinfo |grep "Open"
  210  glxinfo |grep "nvi"
  211  glxinfo |grep "nvi"glxinfo -B
  212  dnf remove kernel-devel
  213  uname -q
  214  rpm -qa kernel\*
  215  qubes-dom0-update kernel-latest
  216  vim /etc/sysconfig/grub
  217  depmod -a; modinfo nvidia
  218  grub2-mkconfig -o /boot/efi/EFI/qubes/grub.cfg
  219  reboot
  220  cd /etc
  221  cd modprobe.d
  222  ls
  223  cat blacklist.conf
  224  rm blacklist.conf
  225  ls
  226  ls
  227  exit
  228  ls
  229  glxinfo |grep "nvi"
  230  glxinfo -B
  231  glxinfo |grep intel
  232  glxinfo |grep nvi
  233  glxinfo |grep "in"
  234  glxinfo |grep "intel"
  235  cd /etc/modprobe.d
  236  ls
  237  locate nvidia
  238  lsmod
  239  insmod
  240  mod
  241  modprobe nvidia
  242  ls
  243  ls
  244  cd ..
  245  ls
  246  exit
  247  ./NVIDIA.run
  248  ./NVIDIA.run
  249  ./NVIDIA.run --ui=none --n--exctract-only
  250  ls
  251  ./NVIDIA.run --ui=none --no-x-check --exctract-only
  252  ls
  253  mkdir nv
  254  ls
  255  cp NVIDIA.run nv
  256  cd nv
  257  ./NVIDIA.run
  258  ls
  259  rm NVIDIA.run
  260  qvm-run --pass-io personal 'cat /home/user/Downloads/NVIDIA.run' > /home/pawelek85/Downloads/NVIDIA.run
  261  cd ..
  262  ls
  263  chmod 777 NVIDIA.run
  264  ./NVIDIA.run
  265  ls
  266  ls -lat
  267  sh ./nvidia.run
  268  ls
  269  sh NVIDIA.run
  270  ls
  271  thaurus
  272  nautilus
  273  thunar
  274  ls
  275  NVIDIA.run --install
  276  lscpi |grep VGA
  277  lspci |grep VGA
  278  qubes-dom0-update nvidia --action=search
  279  Xorg :1 -configure
  280  Xorg -configure
  281  cd /root
  282  ls
  283  vim xorg.conf.new
  284  mv /root/xorg.conf.new /etc/X11/xorg.conf
  285  xinit
  286  Xorg -configure
  287  qubes-dom0-update nvidia-gpu-firmware
  288  lscpi |grep VGA
  289  lspci |grep VGA
  290  lspci |grep nvidia
  291  cd Downloads
  292  ls
  293  ./NVIDIA.run
  294  ls
  295  cat /etc/fstab
  296  nano /etc/fstab
  297  cd /etc/sysconfig
  298  ls
  299  vim grub
  300  grub2-mkconfig -o /boot/efi/EFI/qubes/grub.cfg
  301  cat /sys/module/zswap/parameters/enabled
  302  bash -c "echo 0 > /sys/module/zswap/parameters/enabled"
  303  cat /sys/module/zswap/parameters/enabled
  304  swapoff --all
  305  vim /etc/fstab
  306  modprobe zram num_devices=1
  307  cat /sys/block/zram0/comp_algorithm
  308  bash -c "echo lz4hc > /sys/block/zram0/comp_algorithm"
  309  bash -c "echo lz4hc > /sys/block/zram0/comp_algorithm"
  310  sudo -i bash -c "echo lz4hc > /sys/block/zram0/comp_algorithm"
  311  nano /sys/block/zram0/comp_algorithm
  312  cat /sys/block/zram0/disksize
  313  bash -c "echo 32GB > /sys/block/zram0/disksize"
  314  swapoff --all
  315  bash -c "echo 32GB > /sys/block/zram0/disksize"
  316  vim /etc/fstab
  317  dnf remove zramswap
  318  dnf remove zram-tools
  319  systemctl stop zramswap
  320  systemctl stop dietpi-zram-swap
  321  history
  322  systemctl status zram-swp
  323  systemctl status zram-swap
  324  systemctl stop zram-swap
  325  systemctl status zram-swap
  326  bash -c "echo 32GB > /sys/block/zram0/disksize"
  327  sudo -i bash -c "echo lz4hc > /sys/block/zram0/comp_algorithm"
  328  systemctl start zram-swap.service
  329  sudo -i bash -c "echo lz4hc > /sys/block/zram0/comp_algorithm"
  330  history |grep zra
  331  dnf remove zram
  332  systemctl start zram-swap.service
  333  modprobe zram
  334  bash -c "echo 32G > /sys/block/zram0/disksize"
  335  echo 32G > /sys/block/zram0/disksize
  336  swap0ff --all
  337  swapoff 
  338  swapoff -all
  339  swapoff --all
  340  swapoff /dev/zram0
  341  echo 32G > /sys/block/zram0/disksize
  342  zramctl
  343  zramctl --reset /dev/zram0
  344  zramctl
  345  echo 32G > /sys/block/zram0/disksize
  346  modprobe zram
  347  echo 32G > /sys/block/zram0/disksize
  348  echo 32G > /sys/block/zram0/disksize
  349  bash -c "echo 32G > /sys/block/zram0/disksize"
  350  zramctl
  351  cd /sys/block
  352  ls
  353  cd zram0
  354  cd /etc/modules-load.d
  355  ls
  356  qubes-dom0-update zramctl
  357  qubes-dom0-update zram
  358  modprobe zram
  359  bash -c "echo 32G > /sys/block/zram0/disksize"
  360  modprobe zram num_devices=1
  361  cat /sys/block/zram0/comp_algorithm
  362  sudo -i bash -c "echo lz4hc > /sys/block/zram0/comp_algorithm"
  363  cd /sys/block/zram0
  364  cd /sys/block
  365  systemctl start zram
  366  sudo -i bash -c "echo lz4hc > /sys/block/zram0/comp_algorithm"
  367  cat /sys/block/zram0/comp_algorithm
  368  systemctl status zram
  369  mkdir zram0
  370  bash -c "echo 32GB > /sys/block/zram0/disksize"
  371  bash -c "echo 32GB > /sys/block/zram0/disksize"
  372  sudo -i bash -c "echo lz4hc > /sys/block/zram0/comp_algorithm"
  373  modprobe zram num_devices=1
  374  cat /sys/block/zram0/comp_algorithm
  375  bash -c "echo lz4hc > /sys/block/zram0/comp_algorithm"
  376  modprobe zram num_devices=1
  377  bash -c "echo lz4hc > /sys/block/zram0/comp_algorithm"
  378  zramctl --reset /dev/zram0
  379  zramctl
  380  lz4hc > /sys/block/zram0/comp_algorithm
  381  echo lz4hc > /sys/block/zram0/comp_algorithm
  382  swapoff /dev/zram0
  383  echo lz4hc > /sys/block/zram0/comp_algorithm
  384  zramctl
  385  echo lz4hc > /sys/block/zram0/comp_algorithm
  386  zramctl --reset /dev/zram0
  387  echo lz4hc > /sys/block/zram0/comp_algorithm
  388  zramctl
  389  modprobe zram num_devices=4
  390  echo lz4hc > /sys/block/zram0/comp_algorithm
  391  zramctl
  392  cat /sys/class/zram-control/hot_add
  393  echo 0 > /sys/class/zram-control/hot_remove
  394  cat /sys/class/zram-control/hot_add
  395  echo 0 > /sys/class/zram-control/hot_remove
  396  echo1 > /sys/class/zram-control/hot_remove
  397  echo 1 > /sys/class/zram-control/hot_remove
  398  zramctl --reset /dev/zram0
  399  modprobe zram num_devices=1
  400  echo lz4hc > /sys/block/zram0/comp_algorithm
  401  echo 1 > /sys/block/zram0/reset
  402  umount /dev/zram0
  403  util-linux
  404  qubes-dom0-update util-linux
  405  zramctl --help
  406  modprobe zram num_devices=4
  407  dnf remove zram
  408  modprobe zram num_devices=4
  409  cat /sys/block/zram0/max_comp_streams
  410  rmmod zramctl
  411  insmod zramctl
  412  vim /etc/modules-load.d/zram.conf
  413  vim /etc/modprobe.d/zram.conf
  414  systemtl enable zram
  415  systemctl enable zram
  416  qubes-dom0-update zram
  417  modprobe zram num_devices=1
  418  cat /sys/block/zram0/max_comp_streams
  419  zramctl
  420  ls /sys/block
  421  systemctl start zram
  422  ls /sys/block
  423  modprobe zram num_devices=1
  424  ls /sys/block
  425  systemctl status zram
  426  zram
  427  zramctl
  428  zramctl --help
  429  zramctl -r
  430  zramctl --reset
  431  zramctl --reset /dev/zram0
  432  systemctl status zram
  433  zramctl --rese
  434  modprobe zram
  435  modprobe zram num_devices=1
  436  systemctl status zram
  437  swapon
  438  systemctl status zram
  439  systemctl restart zram
  440  systemctl status zram
  441  systemctl status zramaa
  442  modprobe zram num_devices=1
  443  ls /sys/block
  444  cat /sys/block/zram0/max_comp_streams
  445  echo lz4hc > /sys/block/zram0/comp_algorithm
  446  umount /dev/zram0
  447  lsblk
  448  swapoff /dev/zram0
  449  mkswap /dev/zram0
  450  swapon /dev/zram0
  451  echo lz4hc > /sys/block/zram0/comp_algorithm
  452  swapoff /dev/zram0
  453  echo lz4hc > /sys/block/zram0/comp_algorithm
  454  df -h
  455  cat /proc/swaps
  456  lsblk
  457  locate mkinitcpio.conf
  458  systemctl enable zramswap
  459  systemctl status zram
  460  swapon -s
  461  vim /etc/sysconfig/grub
  462  grub2-mkconfig -o /boot/efi/EFI/qubes/grub.cfg
  463  vim /etc/sysconfig/grub
  464  grub2-mkconfig -o /boot/efi/EFI/qubes/grub.cfg
  465  systemctl status zram
  466  zramctl
  467  echo lz4hc > /sys/block/zram0/comp_algorithm
  468  swapoff /dev/zram0
  469  echo lz4hc > /sys/block/zram0/comp_algorithm
  470  swapon -s
  471  echo lz4hc > /sys/block/zram0/comp_algorithm
  472  systemctl status zram
  473  umount /dev/zram0
  474  modprobe zram num_devices=1
  475  systemctl status zram
  476  echo lz4hc > /sys/block/zram0/comp_algorithm
  477  modprobe zram num_devices=1
  478  cat /sys/block/zram0/comp_algorithm
  479  echo lz4hc > /sys/block/zram0/comp_algorithm
  480  bash -c "echo 1 > /sys/block/zram0/reset"
  481  modprobe -r zram
  482  modprobe zram num_devices=1
  483  echo lz4hc > /sys/block/zram0/comp_algorithm
  484  bash -c "lz4hc > /sys/block/zram0/comp_algorithm"
  485  bash -c "echo lz4hc > /sys/block/zram0/comp_algorithm"
  486  cat /sys/block/zram0/comp_algorithm
  487  bash -c "echo 32G> /sys/block/zram0/disksize"
  488  mwap --label zram0 /dev/zram0
  489  mswap --label zram0 /dev/zram0
  490  zramctl
  491  swapon --priority 32767 /dev/zram0
  492  swapoff /dev/zram0
  493  swapoff --all
  494  swapon --priority 32767 /dev/zram0
  495  swap --label zram0 /dev/zram0
  496  mswap
  497  mkswap --label zram0 /dev/zram0
  498  swapon --priority 32767 /dev/zram0
  499  zramctl
  500  swapoff /dev/zram0
  501  bash -c "echo 1> /sys/block/zram0/reset"
  502  bash -c "echo 1 > /sys/block/zram0/reset"
  503  modprobe -r zram
  504  ls /usr/local/bin
  505  vim /usr/local/bin/zram_start
  506  vim /usr/local/bin/zram_stop
  507  cd /etc/systemd
  508  vim zram_swap.service
  509  ls
  510  systemctl start zram-swap
  511  systemctl status zram-swap
  512  dnf remove zram
  513  modprobe -r zram
  514  qvm-run --pass-io personal 'cat /home/user/zram_swap.service' > /etc/systemd/system/zram_swap.service
  515  ls
  516  cd system
  517  ls
  518  cat zram_swap.service
  519  systemctl start zram-swap
  520  ls -lat
  521  chmod 761 zram_swap.service
  522  ls
  523  chmod 751 zram_swap.service
  524  ls
  525  ls -lat
  526  chmod 777 zram_swap.service
  527  ls -lat
  528  chmod 741 zram_swap.service
  529  ls -lat
  530  chmod 751 zram_swap.service
  531  ls -lat
  532  chmod 721 zram_swap.service
  533  ls -lat
  534  chmod 761 zram_swap.service
  535  ls
  536  ls -lat
  537  chmod 771 zram_swap.service
  538  ls -lat
  539  systemctl start zram-swap
  540  systemctl start zram_swap
  541  systemctl status zram_swap
  542  vim /etc/sysctl.d/99-sysctl.conf
  543  sysctl -p
  544  systemctl status zram_swap
  545  swapon --show
  546  systemctl enable zram_swap
  547  systemctl status zram_swap
  548  systemctl status zram_swap
  549  swapon -show
  550  history

I just got P51 and I am setting up Qubes to it. I would want to ask few questions connected to this Pawelek85s post and couple outside of it.

From this I get an impression that this setup ended up using Nvidia and Noveau drivers, but presivously it seems that system was set up to use Noveau only. Is there some benefits to install Nvidia drivers and then change x11.conf and mentioned in this:

How is Dom0s RAM recuded to 1536MB, where is this variable “max_mem_Dom0” located and how to change it?

I installed Qubes using btrfs and previously I used ext4 (and lvm). Now when I start AppVM, its disk usage changes much larger, probably size of its template + size on AppVM when shutdown. After shutdown AppVMs size returns to “normal”. Just curious why this differs from previous behaviour…
4)
I can’t power down this instance of Qubes from desktops “Shut Down” -button. Os starts to power down but hangs to black screen without completely powering down. I have to long press power button. Shutting down with “sudo shutdown now -h” works as should.
I have read that TMP 2.0 module may cause this and it should be set ot legacy mode TMP1.2 in BIOS, but in my Bios there isn’t this option. I have dissabled TMP, but still shutdown hangs.
I hope that someone could answer these questions. Thanks.