Debian HVM - small screen resolution

As it is a linux HVM you can set it to run at 10,240,000 x 7,680,000 if
you want to… It’s a virtual…

But if you set it that high you may want to assign it about 1 GB of Video
RAM thoguh…

I was unable to change the screen resolution to higher than 1920x1080 (ideally I need a screen resolution of 2560x1440).
I tried different methods, using .xprofile did not work for me, the commands are not executed.
I installed Ubuntu HVM and followed the instructions given:

But I get errors:

$ xrandr --newmode "2560x1440_60.00"  311.83  2560 2744 3024 3488  1440 1441 1444 1490  -HSync +Vsync
X Error of failed request:  BadName (named color or font does not exist)
  Major opcode of failed request:  139 (RANDR)
  Minor opcode of failed request:  16 (RRCreateMode)
  Serial number of failed request:  20
  Current serial number in output stream:  20

I’ve tried a variety of Linux OS and I can’t change the screen resolution above 1920x1080.
The problem is that I am not a confident Linux user. I have to read a lot and search for information on Google.

I’ve been sitting on this problem for 3 days, I’m ready to pay money to someone who can write clear instructions on how to change the screen resolution to 2560x1440 in Linux HVM, which will not change after rebooting the system.

I give up, I just don’t have the strength, there are people on the forum with the same problems and no one could solve this problem.
I am ready to pay money to use the instructions myself and help people like me who are faced with this problem.

WHO WILL WRITE INSTRUCTIONS ON HOW TO CHANGE THE SCREEN RESOLUTION (2560x1440) IN LINUX HVM?
The screen resolution should remain the same after a reboot.

I’ll pay the MONEY! We will agree on the amount, payment will be made using BTC.

Add it to ~/.xprofile … I told you earlier…

I couldn’t get ~/.xprofile to work.
I set the default screen resolution to 2560x1440 before starting the screen manager using xorg.conf:

Modeline "2560x1440_144.00"  808.75  2560 2792 3072 3584  1440 1443 1448 1568 -hsync +vsync
Option "PreferredMode" "2560x1440_144.00"

After reboot Linux HVM I get a black window with a screen resolution of 1920x1080, this is because my virtual screen (Virtual-1) cannot be larger than 1920x1080.

It works for you because you connect additional equipment (Monitor), it doesn’t work for me because I’m setting up a virtual screen (Virtual-1), these are different things, they have nothing to do with each other.

If you think I’m wrong and that setting ~/.xprofile will solve the screen resolution problem, you can try setting up a virtual screen (Virtual-1) in Linux HVM yourself and get paid for it.
I will pay you in any way convenient for you: PayPal, Western Union, Bank Transfer, BTC, etc…

I can get it to run to 2560x800.

In general, can’t exceed a number of pixels.

The largest resolution I can run is 2096688 pixels in size.

As long as you are under that, it will work fine.

2560 x 819 has 209640 pixels.

Currently building a script to calculate and accomodate these numbers in the system for setting.

As for the details you are wondering about the details go into the ~/.xsessionrc in Debian to set after X is started fully.

Increasing the available VRAM for the virtual did not work either.

So there is the limitation that you are working with.

Someone else may have a workaround for this without having to install the Qubes-Tools, which is the only othe roptino that I can think of.

I just tried adding 2560x800 screen resolution inside Linux HVM and it worked, then I tried adding 2560x900 screen resolution inside Linux HVM and it didn’t work.
This means that your theory about the pixel is correct.

But then the question arises, is this a problem in QubeOS or in the driver?
Since I have Windows HVM and it can work with a maximum screen resolution of 2560x1600, but Linux HVM does not work with the maximum screen resolution, therefore I can assume that the problem is in the driver or am I wrong ?

It would NOT be the DRIVER for Qubes.
I can gaurantee that it is NOT the Qubes Driver.
I put a fresh install of Debian 12 into my system to do the testing.
That is what I thought you were doing as you wanted an HVM.
I’m still running some tests to see what I can do though.

I can set my Devuan to 2560x1080 easily.

So it is just the version of Linux that is being used.
Perhaps you should try Devuan ?

Okay, I can set my Devuan to whatever I want to, but I’m working on a little issue with it at this time to find out what the problem is.

It may be my machine since none of my monitors go over 1080p, so i’m just investigating what the issue is.

I did give the virtual 512 MB of VRAM just in case that was the issue.

Maybe you can run a test since you have a screen and display that handles a larger resolution please?
I use BeoWulf mainly, but looking to upgrade to later versions.
This version of Linux is safer and more secure and so uch easier to use and view logs and do much more since it has no SystemD in it.
So it has no Microsoft Influence.

You can also check the later variants too.

Let me know how you go on your higher screen resolution.

Thanks.

I mean I’ve even tried to add the Virtual Display to the virtual, but it just keeps not working or adding properly. Machine off, it says it’s an invalid domain, have it on it can’t add device with the path.

So I think the question is… How do we ADD a Display to the virtual for XEN ?

Every time I try to look it up on the internet all I get is details on GPU Passthru…

I tested all three versions of the operating system that you indicated above.
Here’s what I got:

devuan_beowulf_3.1.1_amd64_desktop : Maximum screen resolution 2560x1300

devuan_chimaera_4.0.0_amd64_desktop : Maximum screen resolution 2560x800

devuan_daedalus_5.0.1_amd64_desktop : Maximum screen resolution 2560x800

To be honest, I have already come to terms with the fact that in Linux HVM there is no way to make the screen resolution equal to the screen resolution as in dom0.

Based on this topic on adding a virtual network interface:

We can try adding a virtual display:

In dom0:

sudo mkdir /etc/libvirt/hooks/
sudo nano /etc/libvirt/hooks/libxl

Paste this script inside:

#!/bin/bash
guest_name="$1"
libvirt_operation="$2"
timeout=60

if [ "$guest_name" = "myvmname" ] && [ "$libvirt_operation" = "started" ]; then
    (
        exec 0</dev/null
        exec 1>/dev/null
        exec 2>/dev/null
        for i in $(seq 1 $timeout);
        do
            if qvm-ls --running $guest_name | grep -q Running; then
                xl vdispl-attach $guest_name Connectors='id0:1920x1080;id1:800x600;id2:640x480'
                break
            fi
            sleep 1
        done
    ) & disown
fi

Then add execute permission command:

sudo chmod +x /etc/libvirt/hooks/libxl

Reboot.

The syntax for adding a virtual display is described in more detail in the documentation:
https://xenbits.xen.org/docs/unstable/man/xl.1.html#VDISPL-DEVICES

Problem is that the virtual is running, so it can’t attach and use.

But it can’t do it while powered off either.

What do you add your display to? Is it a Qubes Template? Or is it one you have installed yourself that is an HVM, for example, Devuan?

This is the script that I have on my machine to make it easier to apply a resolution when doing things. This way I can make sure everything is right before I apply the resolution.

It first does all the settings, so I can go and check in xrandr and all to see if the settings are all there appropriately. After that I can just tell it to apply the resolution.

You may also notice that I remove the hsync and vsync from the Modeline, as it often causes issues having it there.

wid=$1
hei=$2
maxset=2096688
val=$(($wid*$hei))
if [ $maxset -lt $val ]; then
  echo "WARNING! Number of pixels may be more than can be handled. $val > $maxset ";
fi
 echo $val " pixels in this resolution "
 modeline=`cvt $wid $hei | grep "Modeline" | sed "s/Modeline //" | sed "s/-hsync +vsync//"`
 widthheight=`cvt $wid $hei $ref | awk -F[\"] '{print $2}' | tr -d [:space:]`


 echo "xrandr --newmode $modeline"
 echo "xrandr --addmode Virtual-1 \"$widthheight\""
 echo "xrandr --output Virtual-1 --mode \"$widthheight\""


read -r -p 'Apply this resolution?' choice
case "$choice" in
  n|N) break;;
  y|Y) xrandr --newmode $modeline ; xrandr --addmode Virtual-1 "$widthheight";  xrandr --output Virtual-1 --mode "$widthheight"; break;;
  *) echo 'no response';
esac

Also, have you tried adding such a high resolution? 2560x1440 ?

I tried the code… It fails dismally…

I run the following…

xl vdispl-attach ScreenSizer-1 Connectors='id0:2560x1440;id1:2560x1080;id2:800x600'

I get the message…

Unknown string "Connectors=id0:2560x1440;id1:2560x1080;id2:800x600" in vdispl spec

So this is very confusing… It isn’t working…

And yes I have got my menu system for hooks/libxl running, so I know that it’s working properly and executing correctly.
This command I’m running manually on the guest to see what the error was, and that’s what the error is.

I installed 3 HVM operating systems:

devuan_beowulf_3.1.1_amd64_desktop

devuan_chimaera_4.0.0_amd64_desktop

devuan_daedalus_5.0.1_amd64_desktop

I added different screen resolutions to each virtual machine (Devuan HVM) using xrandr.
2560x800, 2560x900, 2560x1000, 2560x1200, 2560x1300, 2560x1440, 2560x1600.

Test results with these operating systems:

devuan_beowulf_3.1.1_amd64_desktop : Maximum screen resolution 2560x1300

devuan_chimaera_4.0.0_amd64_desktop : Maximum screen resolution 2560x800

devuan_daedalus_5.0.1_amd64_desktop : Maximum screen resolution 2560x800

Yes, I tried absolutely everything, I re-read the forum, I re-read Google, I tried everything you suggested, I tried everything that people suggested in other topics on the forum, I tried praying to God, all that remains is to go to church and light a candle, I tried the rest and it didn’t give any results.
I don’t know what else I can try, I can get the screen resolution to 2560x1600 in Windows HVM, without installing Qubes Tools. This is not possible in Linux, and it is very strange.

I took this part of the code from the documentation, a Google search did not yield any results.

Thank you very much for trying to help, it’s very rare to see such an attitude on this forum, I really appreciate it.
But I think that our efforts will not yield results, apparently this is a problem with the Qubes OS, and you and I are powerless here =(

Ok, I was able to fix the issue with resolution by increasing the qube’s video ram in Xen config.
You can test whatever this will fix it for you as well by running these commands in dom0:

sudo mkdir -p /etc/qubes/templates/libvirt/xen/by-name/
cat << 'EOF' | sudo tee /etc/qubes/templates/libvirt/xen/by-name/YourQubeName.xml
<!-- import default template-->
{% extends 'libvirt/xen.xml' %}
<!-- we wanna alter the devices block -->
{% block devices %}
    <!-- import default device block -->
    {{ super() }}
    <!-- manual video config -->
    <video>
      <model type='vga' vram='32768' heads='1' primary='yes'/>
    </video>
{% endblock %}
EOF

Change YourQubeName to your qube name.

2 Likes

Yahuuuuuuuuuuuuuuuuuuuuuuuu!
It works, I just can’t believe it, you’re just a magician =)
Thank you.

And so, I promised a monetary reward for a working method, please send me a Bitcoin wallet in private messages if this payment method is acceptable to you.
Thanks again.

As always App, nicely done!

Brilliant fix.

So why didn’t setting the VRAM the normal way work?