All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Kvm virtual machine uses virtio graphics card, the rotating screen is stuck
       [not found] <tencent_38FA65E45E1BD89E5C1965C5@qq.com>
@ 2021-11-23  7:49 ` Jason Wang
  2021-11-23  8:20   ` Gerd Hoffmann
  0 siblings, 1 reply; 2+ messages in thread
From: Jason Wang @ 2021-11-23  7:49 UTC (permalink / raw)
  To: 苟浩; +Cc: virtualization, mst

On Tue, Nov 23, 2021 at 3:00 PM 苟浩 <gouhao@uniontech.com> wrote:
>
> Hello,
>
> I use `xrandr -o left` to rotate the screen in the kvm virtual machine.
> When configured as a Virtio graphics card, the screen will freeze after rotating the screen, and the keyboard and mouse will not respond.
> When configured as a VGA graphics card, it is normal after rotating the screen.
>
> Is the Virtio graphics card not supporting rotating?

Adding list and Gerd for the answer.

Thanks

>
>
> Thanks!

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Kvm virtual machine uses virtio graphics card, the rotating screen is stuck
  2021-11-23  7:49 ` Kvm virtual machine uses virtio graphics card, the rotating screen is stuck Jason Wang
@ 2021-11-23  8:20   ` Gerd Hoffmann
  0 siblings, 0 replies; 2+ messages in thread
From: Gerd Hoffmann @ 2021-11-23  8:20 UTC (permalink / raw)
  To: Jason Wang; +Cc: virtualization, 苟浩, mst

On Tue, Nov 23, 2021 at 03:49:28PM +0800, Jason Wang wrote:
> On Tue, Nov 23, 2021 at 3:00 PM 苟浩 <gouhao@uniontech.com> wrote:
> >
> > Hello,
> >
> > I use `xrandr -o left` to rotate the screen in the kvm virtual machine.
> > When configured as a Virtio graphics card, the screen will freeze after rotating the screen, and the keyboard and mouse will not respond.
> > When configured as a VGA graphics card, it is normal after rotating the screen.
> >
> > Is the Virtio graphics card not supporting rotating?
> 
> Adding list and Gerd for the answer.

Hmm dunno.  Never tried that.  Can't see an obvious reason why virtio
should show different behavior than stdvga, so probably a bug somewhere.

I'm wondering why you want rotate the screen in the first place though.
You can add any resolution you want using xrandr, including portrait
modes like 768x1024 ...

take care,
  Gerd

----------------------------- cut here ------------------------
#!/bin/sh

width="$1"
height="$2"

if test "$width" = "" -o "$height" = ""; then
	echo "usage: $0 width height"
	exit 1
fi

output=$(xrandr --query | awk '/ connected/ { print $1; exit }')
mode="${width}x${height}"
echo "# setting mode $mode on output $output"

if xrandr --query | grep -q -e " $mode "; then
	true # mode already there
else
	modeline=$(cvt $width $height | grep Modeline | cut -d" " -f3-)
	(set -x; xrandr --newmode "$mode" $modeline;
		 xrandr --addmode "$output" "$mode")
fi
(set -x; xrandr --output "$output" --mode "$mode")

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-11-23  8:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <tencent_38FA65E45E1BD89E5C1965C5@qq.com>
2021-11-23  7:49 ` Kvm virtual machine uses virtio graphics card, the rotating screen is stuck Jason Wang
2021-11-23  8:20   ` Gerd Hoffmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.