[SOLVED] Local scaling preference has no effect

simpoltin

New Member
Jan 7, 2022
4
0
1
37
After searching around a bit because I hated having to switch to local scaling on the consoles, I found the option in my settings to have local scaling be the default. Is this working for others?

I can see the "resize: scale" is saved to the web UI's local storage in my browser, currently Firefox 95.0.2 on Arch Linux, but it is not having any effect. I tested in Chromium as well with the same result. It's a small but annoying issue. Just wanted to see if anyone else ran into this or had a fix.
 

dcsapak

Proxmox Staff Member
Staff member
Feb 1, 2016
8,062
990
163
34
Vienna
i just tested it here again, and it work like i'd assumed: setting it to off means no scaling, and setting it to local scales it to the window size.

can you post a screenshot or similar to make the problem more clear?
 

simpoltin

New Member
Jan 7, 2022
4
0
1
37
Screen shots included. Thanks for checking it out and confirming that it should be working Dominik!

Here is the screen cap from the My Settings menu on the ProxMox Host. I can click on Local Scaling again and it turns blue. Any time I enter the menu though this is how it appears.

noVNC_settings.png

Screen cap from a guest VM console window immediately after confirming the setting.

console_guest.png

Screen cap from Host Shell console window, just as a random thought that the setting would only apply to the hosts console shell. Again taken after confirming the setting.

console_host.png

Playing around with it more if I click the fullscreen button after opening the console it will then switch scaling to local, that will persist after I exit full screen for the remainder of that console window session. If I close the console window and reopen it it will revert back to Scaling Mode: Off. The behavior is the same in plain vanilla chromium, and Firefox with all extensions turned off for the Proxmox host's web gui.
 

dcsapak

Proxmox Staff Member
Staff member
Feb 1, 2016
8,062
990
163
34
Vienna
the web interface options will only apply on the next start of a new console and does not influence already running consoles.
(though there seems to be a small bug with the radiobuttons, i'll send a fix for that)

also setting to scale when entering fullscreen is a feature, since most often fullscreen without scaling makes not much sense...
 

simpoltin

New Member
Jan 7, 2022
4
0
1
37
Understood about it applying to the start of a new console, that's the behavior I expected, it just never actually does it. Screen shots from above were console windows opened after the Local Scaling option was set.

Concerning the radio button is it a visual bug with the color I mentioned, or is it not properly configure the setting?

Are you able to tell me if the local scaling option is stored server side or in a cookie/local storage on the user's PC, just so I can target my troubleshooting a little better.

The scale changing when entering full-screen makes sense, I just didn't think that through before typing my last response haha.

Again thanks for the time and effort in helping me out! It is greatly appreciated!
 

dcsapak

Proxmox Staff Member
Staff member
Feb 1, 2016
8,062
990
163
34
Vienna
Understood about it applying to the start of a new console, that's the behavior I expected, it just never actually does it. Screen shots from above were console windows opened after the Local Scaling option was set.
mhmm its working here without issues... maybe some browser setting to prevent browser local storage access?

Concerning the radio button is it a visual bug with the color I mentioned, or is it not properly configure the setting?
no thats just the color when its not focused..

Are you able to tell me if the local scaling option is stored server side or in a cookie/local storage on the user's PC, just so I can target my troubleshooting a little better.
it is stored in the browser local storage under the key 'novnc-scaling'

on chrome you can see it when you open the dev console (F12) and go to:
Application -> Local Storage -> Your pve url
 

simpoltin

New Member
Jan 7, 2022
4
0
1
37
Did some more troubleshooting and took a look at your commit about the radio button. I understand the bug you were talking about now. This is what I've seen so far as I trace down my specific issue.

  • I verified the setting in my settings shown in the screen shots above.
    • Cleared local storage.
    • Logged in. Set local scaling option. Opened console. Scaling remained off.
    • Logged out and back in. Verified setting, Opened console, scaling still off.
    • Before and after clearing the storage there was no key:value pair saved in local storage for novnc-scaling
  • Opened a guest VM console window.
    • Local scaling showed off as in the above screenshots.
    • Manually set scaling to local.
    • A new key:value pair was created in local storage but not in the same format as the other pairs.
      • resize: scale
pve-resize-keypair.png

  • I closed and reopened the guest console window.
    • The scaling option was reverted back to Off
    • The key:value pair remained set as resize: "scale"
    • Manually switching scaling between local and off changed the key:value to the respective setting.
  • Manually added a key:value pair of novnc-scaling: "scale"
    • No change in console scaling behavior
pve-novnc-plain-keypair.png

  • Manually added key:value pair using the saved username entry as a template.
    • ext-novnc-scaling: s%3Ascale
    • Console behavior is now acting as expected.
      • Scaling is defaulted on.
      • Persists between logins.
      • Entry:
        • pve-novnc-formatted-keypair.png
      • Parsed:
        pve-novnc-formatted-keypair-parsed.png
  • This is where things get interesting. I go back to My Settings and set scaling to Off.
    • Key:value pair gets updated as expected.
      • pve-novnc-formatted-keypair-off.png
    • Scaling on new console windows is Off as expected.
    • My Settings now displays the dual radio button selection bug you mentioned.
      • pve-settings-radio-bug.png
  • At this point If I then turn the setting back to Local Scaling.
    • Key:Value remains set to off.
    • The dual radio button selection bug remains in my settings.
    • Scaling is defaulted to off on new windows.
  • I reset the environment.
    • Logged out.
    • Cleared Local Storage.
  • I logged in and changed local scaling setting to Off.
    • The key:value pair was created by the browser without me having to do it manually this time.
    • The dual radio button selection bug appears in my settings.
    • Scaling is defaulted to off on new windows.
  • I change the Scaling setting back to Local.
    • Key:Value remains set to off.
    • The dual radio button selection bug remains in my settings.
    • Scaling is defaulted to off on new windows.
  • I manually change the value to scale.
    • The settings radio button reverts back to only Local Scaling selected (Expected Behavior).
    • Scaling is defaulted to local on new windows (Expected Behavior).


Since the Key:Value pair will get created if I set it to off I do not think it is a local storage permissions issue. Other settings such as remember username and the WebInterface settings are creating and storing their values properly as well. Manually changing the key is a good workaround for me but I wanted to provide you will all the info I collected tracking it down in the event it could be an edge case bug and not some configuration on my endpoint. I'm getting the same behavior on all three nodes WebGui's in my cluster. I also used a user with Proxmox authentication and a user from Linux Pam authentication just to be thorough. I did the in depth testing on my Arch Linux box with it's info below but am also seeing the same behavior in Firefox and Official Chrome on a W10 laptop.

Main testing machine:
Arch Linux
Kernel 5.15.14-1-LTS (64-bit)
KDE Plasma: 5.23.5
KDE Frameworks: 5.90.0
Chromium 97.0.4692.71 (Official Build) Arch Linux (64-bit) - No Extensions Installed
Mozilla Firefox for Arch Linux 96.0 (64-bit) - All Extensions disabled for WebGUI

ProxMox Host Info:
proxmox-ve: 7.1-1 (running kernel: 5.13.19-2-pve)
pve-manager: 7.1-8 (running version: 7.1-8/5b267f33)
pve-kernel-helper: 7.1-6
pve-kernel-5.13: 7.1-5
pve-kernel-5.11: 7.0-10
pve-kernel-5.13.19-2-pve: 5.13.19-4
pve-kernel-5.13.19-1-pve: 5.13.19-3
pve-kernel-5.11.22-7-pve: 5.11.22-12
pve-kernel-5.11.22-1-pve: 5.11.22-2
ceph: 16.2.7
ceph-fuse: 16.2.7
corosync: 3.1.5-pve2
criu: 3.15-1+pve-1
glusterfs-client: 9.2-1
ifupdown2: 3.1.0-1+pmx3
ksm-control-daemon: 1.4-1
libjs-extjs: 7.0.0-1
libknet1: 1.22-pve2
libproxmox-acme-perl: 1.4.0
libproxmox-backup-qemu0: 1.2.0-1
libpve-access-control: 7.1-5
libpve-apiclient-perl: 3.2-1
libpve-common-perl: 7.0-14
libpve-guest-common-perl: 4.0-3
libpve-http-server-perl: 4.0-4
libpve-storage-perl: 7.0-15
libspice-server1: 0.14.3-2.1
lvm2: 2.03.11-2.1
lxc-pve: 4.0.11-1
lxcfs: 4.0.11-pve1
novnc-pve: 1.3.0-1
openvswitch-switch: 2.15.0+ds1-2
proxmox-backup-client: 2.1.2-1
proxmox-backup-file-restore: 2.1.2-1
proxmox-mini-journalreader: 1.3-1
proxmox-widget-toolkit: 3.4-4
pve-cluster: 7.1-3
pve-container: 4.1-3
pve-docs: 7.1-2
pve-edk2-firmware: 3.20210831-2
pve-firewall: 4.2-5
pve-firmware: 3.3-4
pve-ha-manager: 3.3-1
pve-i18n: 2.6-2
pve-qemu-kvm: 6.1.0-3
pve-xtermjs: 4.12.0-1
qemu-server: 7.1-4
smartmontools: 7.2-1
spiceterm: 3.2-2
swtpm: 0.7.0~rc1+2
vncterm: 1.7-1
zfsutils-linux: 2.1.1-pve3
 
Last edited:

dcsapak

Proxmox Staff Member
Staff member
Feb 1, 2016
8,062
990
163
34
Vienna
ok my best guess what happens is that you did not actually set it to 'local-scale' by clicking and then the 'default' (not-set) behaviour was there:
in the embedded console set to local-scaling, in the popup console was set to off

i sent and additional patch[0] (already committed, not yet packaged) that adds an 'auto' mode (which is the default, not-set variant)

with that patch, the issue you have should be fixed

0: https://git.proxmox.com/?p=pve-manager.git;a=commitdiff;h=f7a3e303c3ff483bbd0ea2fc3cf1f20d93d16c0a
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get your own in 60 seconds.

Buy now!