Bug 93624

Summary: scaling mode value is case sensitive, causing confusion
Product: xorg Reporter: Kamil Páral <kparal>
Component: App/xrandrAssignee: Keith Packard <keithp>
Status: RESOLVED MOVED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium    
Version: 7.7 (2012.06)   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Kamil Páral 2016-01-07 10:33:04 UTC
If I run xrandr --prop, I see this:

	scaling mode: None
		supported: None, Full, Center, Full aspect

Note that the value start with an upper-case letter. If I try to set the value with invalid casing, no error is printed out, but the scaling mode is not set accordingly. For example:

$ xrandr --output DisplayPort-0 --set "scaling mode" center
$ xrandr --prop

	scaling mode: center
		supported: None, Full, Center, Full aspect

It *seems* like the new mode applied, but in fact, it is still "None". That is very confusing for people, as you can see for example in bug 80868 comment 17 to 19. It confused me as well in the beginning, because I also first tried to set the values all in lowercase, but fortunately I realized the modes could be case-sensitive and found out that it really makes a difference.

In order to make this functionality better usable and mistake-free, please consider one of this solutions:

a) make the values case-insensitive, so "center", "Center" and "CeNtEr" would all set Center mode correctly

- OR -

b) print out a warning/error about invalid mode name when a person tries to set a wrong-case mode name. Also, do not show this invalid mode name as the current mode. So:

$ xrandr --output DisplayPort-0 --set "scaling mode" center
ERROR: Unknown "scaling mode" value "center". Supported modes are: <...>. Please note mode names are case sensitive.

$ xrandr --prop
	scaling mode: None           <---- not replaced by invalid value "center"
		supported: None, Full, Center, Full aspect


Thank you.

xorg-x11-server-utils-7.7-17.fc23.x86_64
Comment 1 Oleg 2016-01-07 15:50:53 UTC
Well it could be even better if xrandr gave some response in general as to was the value applied or not. The numeric and boolean ones are silently ignored if invalid, while the string ones (output_csc and scaling mode) can be assigned with any garbage e.g. sjkdhfkjsdhf. Could use some cleaning indeed. Or at least a warning in --prop's output.
Comment 2 GitLab Migration User 2018-08-10 20:34:33 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/app/xrandr/issues/27.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.