Re: Virtual machine affects client screen resolution
On Friday 24 February 2023 10:03:31 pm Max Nikulin wrote: > On 25/02/2023 00:55, Roy J. Tellason, Sr. wrote: > > On Wednesday 22 February 2023 09:24:17 pm Max Nikulin wrote: > >> On 19/02/2023 01:01, Roy J. Tellason, Sr. wrote: > >>> So this got me curious, and I tried it out. In the terminal that's > >>> running inside of the virtualbox instance where I'm doing emails, it > >>> comes back with: > >>> > >>> :0 > >> > >> Have you tried to emulate multiple monitors in virtualbox? > > > > I'm not sure what I need to do with the computer to make this happen. > > VirtualBox can emulate multiple monitors, they may be represented as > several windows on the same physical device. It is convenient to test > behavior of applications in the configuration with multiple monitors. > There is an option in VM configuration UI. I don't recall seeing that, I'll have another look... > >>> But in a terminal which is running on the host Debian system, it comes > >>> back with: > >>> > >>> :0.0 > >>> > >>> I wonder why the difference? > >> > >> My guess is that it may depend on graphics adapter and its driver. > > > > It's an older machine with a VGA output being used. I assume that I'll > > need to get some kind of a card with an HDMI output and a cable to make > > that happen. No idea what the driver is, probably nothing special. > > It does not matter if it is special or not. My guess (that may be wrong) > that even noveau vs. nvidia may behave differently. I have never gone > deeper, since I do not remember any problem with setting DISPLAY=:0 when > it was necessary. Driver in use should appear in Xorg.0.log, e.g. > > (II) modeset(0): [DRI2] DRI driver: i965 Only thing I'm finding that resembles that is these lines: [ 13041.620] (II) modeset(0): [DRI2] DRI driver: i965 [ 13041.620] (II) modeset(0): [DRI2] VDPAU driver: i965 > >> I have heard that a display may have several screens (it is not the same > >> as multiple monitors that show > >> different regions of the same display and screen). I have never tried such > >> configuration. > > > > Are you referring to multiple desktops? I have that going, for sure. > > My impression is that multiple screens of a display is not the same as > virtual desktops (and not the same as multiple monitors). I am not > familiar with X11 protocol so closely. Frankly speaking, I has a hope > that somebody will post a proper link. My curiosity is not strong enough > yet to filter search engine results myself. -- Member of the toughest, meanest, deadliest, most unrelenting -- and ablest -- form of life in this section of space, a critter that can be killed but can't be tamed. --Robert A. Heinlein, "The Puppet Masters" - Information is more dangerous than cannon to a society ruled by lies. --James M Dakin
Re: Virtual machine affects client screen resolution
On 25/02/2023 00:55, Roy J. Tellason, Sr. wrote: On Wednesday 22 February 2023 09:24:17 pm Max Nikulin wrote: On 19/02/2023 01:01, Roy J. Tellason, Sr. wrote: So this got me curious, and I tried it out. In the terminal that's running inside of the virtualbox instance where I'm doing emails, it comes back with: :0 Have you tried to emulate multiple monitors in virtualbox? I'm not sure what I need to do with the computer to make this happen. VirtualBox can emulate multiple monitors, they may be represented as several windows on the same physical device. It is convenient to test behavior of applications in the configuration with multiple monitors. There is an option in VM configuration UI. But in a terminal which is running on the host Debian system, it comes back with: :0.0 I wonder why the difference? My guess is that it may depend on graphics adapter and its driver. It's an older machine with a VGA output being used. I assume that I'll need to get some kind of a card with an HDMI output and a cable to make that happen. No idea what the driver is, probably nothing special. It does not matter if it is special or not. My guess (that may be wrong) that even noveau vs. nvidia may behave differently. I have never gone deeper, since I do not remember any problem with setting DISPLAY=:0 when it was necessary. Driver in use should appear in Xorg.0.log, e.g. (II) modeset(0): [DRI2] DRI driver: i965 I have heard that a display may have several screens (it is not the same as multiple monitors that show different regions of the same display and screen). I have never tried such configuration. Are you referring to multiple desktops? I have that going, for sure. My impression is that multiple screens of a display is not the same as virtual desktops (and not the same as multiple monitors). I am not familiar with X11 protocol so closely. Frankly speaking, I has a hope that somebody will post a proper link. My curiosity is not strong enough yet to filter search engine results myself.
Re: Virtual machine affects client screen resolution
On Wednesday 22 February 2023 09:24:17 pm Max Nikulin wrote: > > On 19/02/2023 01:01, Roy J. Tellason, Sr. wrote: > > On Saturday 18 February 2023 12:17:20 am Max Nikulin wrote: > >> echo "$DISPLAY" > > > > So this got me curious, and I tried it out. In the terminal that's > > running inside of the virtualbox instance where I'm doing emails, it > > comes back with: > > > > :0 > > Have you tried to emulate multiple monitors in virtualbox? Not yet. I would like to go to multiple monitors at some point, particularly once I get going with some of the CAD stuff I have installed that I really haven't done anything much with yet. I'm not sure what I need to do with the computer to make this happen. > > But in a terminal which is running on the host Debian system, it comes > > back with: > > > > :0.0 > > > > I wonder why the difference? > > My guess is that it may depend on graphics adapter and its driver. It's an older machine with a VGA output being used. I assume that I'll need to get some kind of a card with an HDMI output and a cable to make that happen. No idea what the driver is, probably nothing special. > I have heard that a display may have several screens (it is not the same as > multiple monitors that show > different regions of the same display and screen). I have never tried such > configuration. Are you referring to multiple desktops? I have that going, for sure. -- Member of the toughest, meanest, deadliest, most unrelenting -- and ablest -- form of life in this section of space, a critter that can be killed but can't be tamed. --Robert A. Heinlein, "The Puppet Masters" - Information is more dangerous than cannon to a society ruled by lies. --James M Dakin
Re: Virtual machine affects client screen resolution
On 19/02/2023 01:01, Roy J. Tellason, Sr. wrote: On Saturday 18 February 2023 12:17:20 am Max Nikulin wrote: echo "$DISPLAY" So this got me curious, and I tried it out. In the terminal that's running inside of the virtualbox instance where I'm doing emails, it comes back with: :0 Have you tried to emulate multiple monitors in virtualbox? But in a terminal which is running on the host Debian system, it comes back with: :0.0 I wonder why the difference? My guess is that it may depend on graphics adapter and its driver. I have heard that a display may have several screens (it is not the same as multiple monitors that show different regions of the same display and screen). I have never tried such configuration. I am unsure which approach is used in nvidia's xinerama.
Re: Virtual machine affects client screen resolution
My thanks to David Wright and Max Nikulin. That was a good wake-up call. Most of my VMs are safe, but it was interesting to learn what was really going on. ForwardX11 was enabled for the ssh session. Initially I imagined vncviewer (to the KVM host though ssh) was the one causing the problem, but now it is clear that the ssh session to the VM was responsible for it. This was the result of checking open tcp ports on the VM: $ netstat -nlt Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State ... tcp0 0 127.0.0.53:53 0.0.0.0:* LISTEN tcp0 0 127.0.0.1:6010 0.0.0.0:* LISTEN $ echo $DISPLAY localhost:10.0 It was also a good opportunity to learn about XPRA and test it. Albert On 2/17/23 22:15, David Wright wrote: On Fri 17 Feb 2023 at 20:57:38 (-0500), Albert S. wrote: Running “xrandr --size 800x600” on a virtual machine affected both monitors on my workstation. That was completely unexpected and I am wondering how to explain that. Below you will find the detailed description. [ … ] But my real concern is how a xrandr command issued on a VM which is running on another machine could affect the video of the client machine used to access that VM. I would appreciate an explanation for that. The clue is in your use of the word "client". In fact, the "video of the machine used to access that VM" is the X /server/. The applications that you control on this machine, and others that you connect to, which you thought were servers, are in fact the clients. So, for example, I'm sitting at my All-in-One, running an X server as usual. In a room down the hall, I have a laptop that's booted up, but hasn't been used yet. It's sitting at a VC prompt waiting for someone to log in. There's no X server running on it. I've connected to the laptop with ssh from an xterm here on my A-i-O, and typed into the /laptop/: $ xrandr --output eDP --rotate right and immediately, my screen blanks, comes back a second later, and everything is sideways. When I type: $ xrandr --output eDP --rotate normal then normality is restored. So I ran xrandr on the laptop, but xrandr is not concerned with that machine, but only with the X /server/, running on my A-i-O. https://en.wikipedia.org/wiki/X_Window_System Cheers, David.
Re: Virtual machine affects client screen resolution
On Saturday 18 February 2023 12:17:20 am Max Nikulin wrote: > echo "$DISPLAY" So this got me curious, and I tried it out. In the terminal that's running inside of the virtualbox instance where I'm doing emails, it comes back with: :0 But in a terminal which is running on the host Debian system, it comes back with: :0.0 I wonder why the difference? -- Member of the toughest, meanest, deadliest, most unrelenting -- and ablest -- form of life in this section of space, a critter that can be killed but can't be tamed. --Robert A. Heinlein, "The Puppet Masters" - Information is more dangerous than cannon to a society ruled by lies. --James M Dakin
Re: Virtual machine affects client screen resolution
On 18/02/2023 08:57, Albert S. wrote: If you think I issued the xrandr command on the wrong machine, that was not the case: history makes it clear. Behavior depends on the DISPLAY environment value at the moment when xrandr was executed. Likely it was pointed not to vnc Xserver, but to the socket forwarded to your workstation by ssh. Try echo "$DISPLAY" In a local shell, in a ssh session, and from vncviewer.
Re: Virtual machine affects client screen resolution
On Fri 17 Feb 2023 at 20:57:38 (-0500), Albert S. wrote: > Running “xrandr --size 800x600” on a virtual machine affected both > monitors on my workstation. That was completely unexpected and I am > wondering how to explain that. > > Below you will find the detailed description. [ … ] > But my real concern is how a xrandr command issued on a VM which is > running on another machine could affect the video of the client > machine used to access that VM. > > I would appreciate an explanation for that. The clue is in your use of the word "client". In fact, the "video of the machine used to access that VM" is the X /server/. The applications that you control on this machine, and others that you connect to, which you thought were servers, are in fact the clients. So, for example, I'm sitting at my All-in-One, running an X server as usual. In a room down the hall, I have a laptop that's booted up, but hasn't been used yet. It's sitting at a VC prompt waiting for someone to log in. There's no X server running on it. I've connected to the laptop with ssh from an xterm here on my A-i-O, and typed into the /laptop/: $ xrandr --output eDP --rotate right and immediately, my screen blanks, comes back a second later, and everything is sideways. When I type: $ xrandr --output eDP --rotate normal then normality is restored. So I ran xrandr on the laptop, but xrandr is not concerned with that machine, but only with the X /server/, running on my A-i-O. https://en.wikipedia.org/wiki/X_Window_System Cheers, David.
Virtual machine affects client screen resolution
Running “xrandr --size 800x600” on a virtual machine affected both monitors on my workstation. That was completely unexpected and I am wondering how to explain that. Below you will find the detailed description. I run KVM on a Debian 11 server, which has no monitor or keyboard attached to it. One of the VMs running on that server is a Ubuntu desktop 22.04 LTS (I needed the desktop version due to the application I was running there). From another machine (a workstation running Debian 11, xfce) with two monitors I access the Ubuntu VM when I need to. I use ssh to the server to establish a ssh tunnel, and then access the Ubuntu machine with the command “/usr/lib/ssvnc/vncviewer localhost:5906 &”. A couple of weeks ago I decided to increase the Ubuntu VM resolution to 1600x1200 to make my work easier, and that initially worked. However, today, after a reboot of the Debian server and all VMs, I noticed that the Ubuntu screen (through VNC) would still have the resolution of 1600x1200 when displayed on my workstation, but it would display as black on the top and gray on the bottom, without any image. The VM console was dead. However, I could still access the VM through ssh. So, I started trying different commands to fix the problem. One of the commands I issued on the VM (through ssh) was “xrandr –size 800x600”. When I issued the xrandr command, one display on my workstation turned off, and the other one went to 800x600 resolution. That was completely unexpected. I am asking myself how can a command issued on a VM which is running on a different machine affect the screen resolution of the workstation used to access that VM. Just to be clear, I was accessing that VM both through ssh and through vncviewer (still back and gray screen image) when that happened. If you think I issued the xrandr command on the wrong machine, that was not the case: history makes it clear. Just to be complete, the solution to the video problem was to make a change on the KVM xml file, from video type=vga to type=virtio. But my real concern is how a xrandr command issued on a VM which is running on another machine could affect the video of the client machine used to access that VM. I would appreciate an explanation for that. Thanks, Albert