Qubes
unread,Aug 14, 2020, 4:47:01 PM8/14/20Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to qubes...@googlegroups.com
I created a new appVM, firefox-test-dvm, that I am using to create my
own disposable VM with a customized Firefox profile that runs with PSD
(Profile Sync Daemon). I have FF running in other appVMs with PSD
already so I decided I will add it to a dvm. FF quickly slows down once
you run into 50+ active tabs that have content loaded, which is easy.
To problem with running that many tabs in FF running on PSD is that
tmpfs (/run/user/1000) is too small. The appVM I am using for my dvm has
400 MB set for its "Initial memory". Default behavior is tmpfs is
allocated 10% of the appVMs "Initial memory" setting. So there are two
ways of increasing the size of tmpfs, either increase the "Initial
memory" to e.g. 800 MB or change the default 10% to 20/30/40%.
I have chosen to increase the size of tmpfs by changing the default 10%
to 40%. This handles many tabs in FF without any issues and I am not
negatively impacted by over budgeting tmpfs since the real impact is
only consumed memory. 40% is only the maximum it may consume.
tmpfs at the default 10%
user@firefox-test-dvm:~$ df -h
Filesystem Size Used Avail Use% Mounted on
tmpfs 35M 12K 35M 1% /run/user/1000 <---- default
To change the default and increase the size of tmpfs to 40% you need to
edit /etc/systemd/logind.conf but since this is an appVM these changes
will be lost after reboot so I bind the file, create it, and change it
to 40%
sudo mkdir -p /rw/config/qubes-bind-dirs.d
sudo vi /rw/config/qubes-bind-dirs.d/50_user.conf
* binds+=( '/etc/systemd/logind.conf' )
sudo mkdir /rw/bind-dirs/etc
sudo mkdir /rw/bind-dirs/etc/systemd
sudo cp /etc/systemd/logind.conf /rw/bind-dirs/etc/systemd/
sudo vi /rw/bind-dirs/etc/systemd/logind.conf
* change RuntimeDirectorySize=40% <---- default customized to 40%
Reboot VM.
user@firefox-test-dvm:~$ df -h
Filesystem Size Used Avail Use% Mounted on
tmpfs 138M 12K 138M 1% /run/user/1000 <---- now visible
Voila tmpfs increased. After shutting down the VM I change it to a
"Disposable VM Template" in Qube Settings.
*******************************************************************************
********************** This is where the problem starts
***********************
*******************************************************************************
If I start for example Krusader using the above created dvm template I
wait until Krusader opens then click on the blue Q in the tray area and
then open a terminal for disp4911. The output shows that the
customization from above is kept in disp4911, as I expected, but, tmpfs
is the same size as when the default 10% is used. I do not understand
that, can someone please help cast some light on this?
user@disp4911:~$ cat /rw/config/qubes-bind-dirs.d/50_user.conf
binds+=( '/etc/systemd/logind.conf' )
user@disp4911:~$ cat /rw/bind-dirs/etc/systemd/logind.conf
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See logind.conf(5) for details.
[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
#HandlePowerKey=poweroff
#HandleSuspendKey=suspend
#HandleHibernateKey=hibernate
#HandleLidSwitch=suspend
#HandleLidSwitchExternalPower=suspend
#HandleLidSwitchDocked=ignore
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
#HoldoffTimeoutSec=30s
#IdleAction=ignore
#IdleActionSec=30min
RuntimeDirectorySize=40%
#RemoveIPC=yes
#InhibitorsMax=8192
#SessionsMax=8192
At 40% the dvm should have 138M of tmpfs space.
user@disp4911:~$ df -h
Filesystem Size Used Avail Use% Mounted on
tmpfs 35M 12K 35M 1% /run/user/1000