How to enable the (new) GUI VM?

2021-03-16-105716

Here is my error message if I try to start the sys-gui-gpu vm.

And if I try to change the dom0 of any appvm to sys-gui (without gpu) then everyhting is starting and has a green state but I cannot open any apps, terminal and else. Maybe I try to install sys-gui based on fedora-32-xfce template again and not the fed-33-xfce.
Can I just delete the sys-gui qube and then start the commands again after I installed fed-32-xfce ,make it default and then sys-gui should be installed on fed-32-xfce or?

Maybe people that cannot install it on fedora-32-xfce try it with the fedora-33-xfce template available in the itl testing repo and as I think it already has switched to stable, too but I don’t know.
sudo qubes-dom0-upate --enablerepo=qubes-template-itl-testing qubes-template-fedora-33-xfce will definitely install it :wink: I have based my main appvm’s on it and could not notice much problems only with those with the sys-gui vm’s.

update: deleting sys-gui from the qubes manager and running the 3 /4 commands again creates a new sys-gui and everything is working like before. But I Installed the fedora-32-xfce and set it as default and sys-gui even is installed at the fedora-33-xfce template . I don’t know why and maybe that is problem because apps don’t run and sys-gui-gpu is not starting, too. I will be very happy and thankful for help here.

@rasta
Did you have a look at this thread?

I didn’t try things out since then so I don’t know about improvements or anything else but at least back then I could start the guiVMSession and start apps the way described in the linked thread above.

I didn’t experiment with sys-gui-gpu yet because I read that it was tested to work with intel rather than AMD. I have a dedicated gpu so I will try this in the future.

1 Like

Yes I already did it. I can log in to sys-gui from the display manager or with the command. that it is working, but setting qvm-prefs sys-gui in for a vm as a guivm ,then there no app is starting. And I am trying it from dom0 and there I read that it is working for a few people. Now is weekend again hehe and I will try it and research again for a solution, but if not no problem and I just have to wait a bit until it becomes more stable:) And I have got a nvidia ,too and think that sys-gui-gpu is much more difficult to get working because of that, u are right :slight_smile: thank you for every help .

For me it works the same as before. I have to open an app from the drop down menu of said VM (for example: libreofficeWriter in the VM office [that has been added via: qvm-prefs office guivm sys-gui] or via CLI in dom0.
It does not work via the drop-down menu in sys-gui. There are no apps in these menus.

Okay @rasta I tried sys-gui-gpu and had the same error message you had.

When running

sudo qubesctl --all state.highstate

there is an error with the package

dummy-psu-dom0

which fails to install. So in the end there is the message

DOM0 configuration failed, not continuing

Maybe the error message might have something to do with this package?

1 Like

There is a error in sys-gui-gpu config file. Line 14:
It says:

dummy-psu-dom0:
pkg.installed:

https://github.com/QubesOS/qubes-mgmt-salt-dom0-virtual-machines/blob/master/qvm/sys-gui-gpu.sls

When you look at this file sys-gui: Line 13

dummy-psu-sender:
pkg.installed:

https://github.com/QubesOS/qubes-mgmt-salt-dom0-virtual-machines/blob/master/qvm/sys-gui.sls

So you need to change your sys-gui-gpu SLS file.
This file you can found at this location:
/srv/formulas/base/virtual-machines-formula/qvm/default/sys-gui-gpu.sls

After you change this config file and compile your new VM, you will receive new error:

file or directory qubes-input-trigger not found.

I am waiting here for progress.

After reading your Post 10 times again and again, I am still not sure if I get it right.
So…

Note this is still highly experimental and it is quite easy to get locked out. In case of hybrid mode, you can always switch to the text console (ctrl+alt+f2) to access dom0

I get this, no problem

but in case of GPU passthrough, you need to reboot your system with qubes.skip_autostart option added to the dom0 kernel (the line with vmlinuz in grub) - to avoid starting sys-gui-gpu and taking over the graphics card.

This part I do not get.

What do you want to say?
I have to add this line to my /etc/default/grub ?
I know how to add it.

What confuses me is you part:

to avoid starting sys-gui-gpu and taking over the graphics card.

What?

Please, explain this.

Thank you very much.

1 Like

this is same error which I get when I compile VM.

2 Likes

I don’t get that part with the grub-line ,too. I need to add this line that sys-gui-gpu and maybe then it is working or I need that line to repair my system if it is not working anymore ? :wink: Don*t know if it is right to start the sys-gui-gpu from dom0 only .Think the gpu have to be loaded at booting and we need to add this line first, but I really don’t know it!

1 Like

What happen ? Were you able to make everything work normally ? :slight_smile:

2 Likes

I gave sys-gui-gpu a go. I first ran into into the dummy-psu-dom0dummy-psu-sender issue above, I guess that has not been release yet.

After patching sys-gui.sls, I ran into the qubes-input-trigger not found errno 2 reported above too.

I fixed that: Fix for no such file error starting sys-gui by face · Pull Request #415 · QubesOS/qubes-core-admin · GitHub. After applying my PR as a patch in dom0, you must restart the qubes manager api: sudo systemctl restart qubesd.service

I then had to disable the gui-vm with qubesctl, delete the VMs, and run the setup again with qubesctl as sys-gui-gpu was not configured properly from not booting during the salt scripts.

Made progress, but now I’m stuck.
sys-gui-gpu is working, and happy, except I cant see it. On sys-gui-gpu’s console, I see lightdm is running via my 2nd Nvidia GPU and nouveau drivers (I have a newer card and the proprietary drivers don’t work with xen but seem to be working with nouveau in sys-gui-gpu which is farther than I got in dom0 with this card).

dom0 still has my intel GPU and control of the monitors. I tried qubes-prefs default_guivm sys-gui-gpu…but dom0 still has the monitors. The setting seems to work for all other VMs and they send their screens to sys-gui-gpu. which I can not see. At one point in all this, I did get a lightdm login screen take over my KDE desktop…but could never reproduce that.

In another thread @fepitre says to log out and run a GuiVM session or run qvm-run -p --no-gui --service sys-gui-gpu qubes.GuiVMSession. The command returns Timed out waiting for Xorg display :1. If I log out , I can’t figure out how to “start a GuiVM session”. I’m running KDE, and sddm has no option. I stopped sddm and started lightdm, but still see no option for a GuiVM session. I don’t see a way or service to start a GuiVM session w/out lightdm or sddm running. Ref: Sys-gui in Qubes 4.1 - devel - #16 by fepitre

It actually makes no sense to me dom0 is still running a DM when lightdm is running on sys-gui-gpu, so I tried changing the runlevel of dom0 to multi-user.target…but dom0 still has the monitors, just a text console instead of a GUI. Note: If I try to give the intel GPU to sys-gui-gpu, insta hard boot of the entire laptop (xen crashes). Then, same crash on boot when sys-gui-gpu starts (I think because dom0 is using it, and xen doens’t like two VMs using the intel GPU at the same time). I can’t figure out how to tell dom0 to give up the GPU and let the sys-gui-gpu take over.

4 Likes

This is only for sys-gui not sys-gui-gpu.

Thanks. I see now I can hide cards from dom0 using qvm-pci and then kernel options similar to rd.qubes.hide_pci=0a:00.0,0a:00.1

I’ll give sys-gui-gpu another go when I have time now that I see I can hide the intel GPU from dom0 and pass it too.

I also found a bios option to bypass the intel and send all output from the nvidia…might be useful too.

the same question

1 Like

@face
Thanks for the fix!

Just a reminder to myself and others who might encounter the same:
After enabling and starting sys-gui-gpu my wireless mouse didn’t work anymore although it was recognized.
I ran the command for creating my sys-usb again, in my case
sudo qubesctl state.sls qvm.sys-usb
and there was a total of 9 states run with 2 changes.

After that I removed my USB receiver and plugged it in again and the mouse is working again.

1 Like

Thanks, while the qvm.sys-usb did some updates, still no input on sys-gui-gpu. However, I have a usb mouse and keyboard I passed and that works.

So I played some more, and setting the bios for my nvidia card to have the ports worked for my external monitors and sys-gui-gpu. dom0 holds the intel GPU and sys-gui-gpu has the nvidia passed to it. Lol, it really feals like I have two computers now (sys-gui-gpu on the external monitors and dom0 on the laptop screen which is hard wired to the intel GPU).

I’m using the noveau driver as the proprietary are blocking my card in a linux VM. Performance is around the same as with dom0 gui, maybe a little less with video. You can render video in sys-gui-gpu and get better preformance, but that defeats the security model.

I was able to install KDE on sys-gui-gpu (on the fedora-33-xfce template), and set qubes-prefs default_guivm sys-gui-gpu and all my VMs worked ok in sys-gui-gpu. The only issue I ran into was my usb device menu was not working (not sure if that broke with KDE or was always broke). Worked around this by using dom0 on the laptop screen.

I would love to plow ahead with a audio VM and run this way but can’t because dom0 still has the intel GPU and laptop monitor and keyboard. If I try and pass the intel GPU to sys-gui-gpu, xen crashes the computer as both dom0 and sys-gui-gpu are trying to use the GPU at the same time. I can block the intel GPU from dom0 to pass it, but then I can’t type my luks password and boot the computer. So till I can figure out how to get dom0 to give up the GPU when sys-gui-gpu boots…and then how to access dom0? Sys-gui-gpu doesn’t have things I need like qvm-usb.

So to summarize, sys-gui-gpu works great on my external monitors with my nvida GPU. But, I’m at a loss how to get dom0 to let go of the intel GPU after we boot so I can pass it to sys-gui-gpu and use the laptop monitor in sys-gui-gpu. Then, how do I access dom0?


How long should I wait for the last command to end… (Motherboard : GA-970A-DS3P, FX 4300, GTX750Ti, Qubes 4.1 alpha)

A really long time, depending on your bandwidth. It is downloading the fedora-33-xfce template which depending on your bandwidth could take a while.

Isn’t that built on Fedora-34 ??? Anyway I have a pretty fast GPON connection of 30 Mbps up/down but it does not ends at 45 mins. dom0 does not gives any result about what is happening. Shall I give it a try again ?

I got error code 1. Please find the output of dom0 terminal.

[Anirban@dom0 ~]$ sudo qubesctl top.enable qvm.sys-gui
local:
----------
qvm.sys-gui.top:
----------
status:
enabled
[Anirban@dom0 ~]$ sudo qubesctl top.enable qvm.sys-gui pillar=True
local:
----------
qvm.sys-gui.top:
----------
status:
enabled
[Anirban@dom0 ~]$ sudo qubesctl --all state.highstate
[ERROR ] Command ‘systemd-run’ failed with return code: 1
[ERROR ] stdout: Running scope as unit: run-rc28f9fd9937b4a92af56de82f7460ead.scope
Using sys-firewall as UpdateVM to download updates for Dom0; this may take some time…
Running ‘/usr/lib/qubes/qubes-download-dom0-updates.sh --doit --nogui ‘–exclude=qubes-template-whonix-gw-15,qubes-template-debian-10,qubes-template-fedora-34,qubes-template-whonix-ws-15’ ‘-y’ ‘–best’ ‘–allowerasing’ ‘–clean’ ‘–action=install’ ‘qubes-template-fedora-34-xfce’’ on sys-firewall
sys-firewall: command failed with code: 1
[ERROR ] retcode: 1
[ERROR ] Error occurred installing package(s). Additional info follows:

errors:
- Running scope as unit: run-rc28f9fd9937b4a92af56de82f7460ead.scope
Using sys-firewall as UpdateVM to download updates for Dom0; this may take some time…
Running ‘/usr/lib/qubes/qubes-download-dom0-updates.sh --doit --nogui ‘–exclude=qubes-template-whonix-gw-15,qubes-template-debian-10,qubes-template-fedora-34,qubes-template-whonix-ws-15’ ‘-y’ ‘–best’ ‘–allowerasing’ ‘–clean’ ‘–action=install’ ‘qubes-template-fedora-34-xfce’’ on sys-firewall
sys-firewall: command failed with code: 1
[ERROR ] ====== [‘present’] ======
====== stderr ======
/usr/bin/qvm-create sys-gui --class=AppVM --template=fedora-34-xfce --label=black
app: Error creating VM: Got empty response from qubesd. See journalctl in dom0 for details.

====== [‘prefs’] ======
Virtual Machine does not exist!

====== [‘service’] ======
[SKIP] Skipping due to previous failure!

====== [‘features’] ======
[SKIP] Skipping due to previous failure!
local:

      ID: topd-always-passes
Function: test.succeed_without_changes
    Name: foo
  Result: True
 Comment: Success!
 Started: 20:01:57.951700
Duration: 0.984 ms
 Changes:   

      ID: qubes-template-fedora-34-xfce
Function: pkg.installed
  Result: False
 Comment: Error occurred installing package(s). Additional info follows:
          
          errors:
              - Running scope as unit: run-rc28f9fd9937b4a92af56de82f7460ead.scope
                Using sys-firewall as UpdateVM to download updates for Dom0; this may take some time...
                Running '/usr/lib/qubes/qubes-download-dom0-updates.sh --doit --nogui '--exclude=qubes-template-whonix-gw-15,qubes-template-debian-10,qubes-template-fedora-34,qubes-template-whonix-ws-15' '-y' '--best' '--allowerasing' '--clean' '--action=install' 'qubes-template-fedora-34-xfce'' on sys-firewall
                sys-firewall: command failed with code: 1
 Started: 20:02:02.712592
Duration: 292687.428 ms
 Changes:   

      ID: dummy-psu-sender
Function: pkg.installed
  Result: True
 Comment: The following packages were installed/updated: dummy-psu-sender
 Started: 20:06:55.400359
Duration: 26406.807 ms
 Changes:   
          ----------
          dummy-psu-sender:
              ----------
              new:
                  1.0.0-2.fc32
              old:

      ID: dummy-backlight-dom0
Function: pkg.installed
  Result: True
 Comment: 1 targeted package was installed/updated.
 Started: 20:07:21.849464
Duration: 24626.707 ms
 Changes:   
          ----------
          dummy-backlight-dom0:
              ----------
              new:
                  1.0.0-2
              old:

      ID: /usr/share/xsessions/sys-gui.desktop
Function: file.managed
  Result: True
 Comment: File /usr/share/xsessions/sys-gui.desktop updated
 Started: 20:07:46.507336
Duration: 82.714 ms
 Changes:   
          ----------
          diff:
              New file

      ID: sys-gui
Function: qvm.vm
  Result: False
 Comment: ====== ['present'] ======
          ====== stderr ======
          /usr/bin/qvm-create sys-gui --class=AppVM --template=fedora-34-xfce --label=black 
          app: Error creating VM: Got empty response from qubesd. See journalctl in dom0 for details.
          
          ====== ['prefs'] ======
          Virtual Machine does not exist!
          
          ====== ['service'] ======
          [SKIP] Skipping due to previous failure!
          
          ====== ['features'] ======
          [SKIP] Skipping due to previous failure!
 Started: 20:07:46.603628
Duration: 818.917 ms
 Changes:   

      ID: sys-gui-rpc
Function: file.managed
    Name: /etc/qubes/policy.d/50-gui-sys-gui.policy
  Result: True
 Comment: File /etc/qubes/policy.d/50-gui-sys-gui.policy updated
 Started: 20:07:47.422933
Duration: 21.854 ms
 Changes:   
          ----------
          diff:
              New file

      ID: sys-gui-admin-local-rwx
Function: file.append
    Name: /etc/qubes/policy.d/include/admin-local-rwx
  Result: True
 Comment: Appended 2 lines
 Started: 20:07:47.445158
Duration: 21.312 ms
 Changes:   
          ----------
          diff:
              --- 
              
              +++ 
              
              @@ -8,3 +8,5 @@
              
               
               ## Add your entries here, make sure to append "target=dom0" to all allow/ask actions
               
              +sys-gui @tag:guivm-sys-gui allow target=dom0
              +sys-gui sys-gui allow target=dom0

      ID: sys-gui-admin-global-rwx
Function: file.append
    Name: /etc/qubes/policy.d/include/admin-global-rwx
  Result: True
 Comment: Appended 3 lines
 Started: 20:07:47.466618
Duration: 3.329 ms
 Changes:   
          ----------
          diff:
              --- 
              
              +++ 
              
              @@ -8,3 +8,6 @@
              
               
               ## Add your entries here, make sure to append "target=dom0" to all allow/ask actions
               
              +sys-gui @adminvm allow target=dom0
              +sys-gui @tag:guivm-sys-gui allow target=dom0
              +sys-gui sys-gui allow target=dom0

Summary for local

Succeeded: 7 (changed=6)
Failed: 2

Total states run: 9
Total run time: 344.670 s
DOM0 configuration failed, not continuing
[Anirban@dom0 ~]$