Gentoo Archives: gentoo-amd64

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-amd64@l.g.o
Subject: [gentoo-amd64] Re: kde4, xorg, xf86-video-ati/radeon, and multi-panel display
Date: Sun, 23 Nov 2008 11:07:04
Message-Id: pan.2008.11.23.11.06.42@cox.net
In Reply to: [gentoo-amd64] kde4, xorg, xf86-video-ati/radeon, and multi-panel display by Duncan <1i5t5.duncan@cox.net>
1 Duncan <1i5t5.duncan@×××.net> posted pan.2008.11.23.07.23.44@×××.net,
2 excerpted below, on Sun, 23 Nov 2008 07:23:44 +0000:
3
4 >>> So I scripted up a solution using xrandr, put the entries in my kmenu,
5 >>> and can use them to switch resolutions. But there's still a problem.
6 >>> The origin coordinates portion appears to be broken, so when I
7 >>> downgrade resolution, the viewport is always the upper left portion of
8 >>> the full size version. There's no mouse panning with randr yet
9 >>> (that's supposed to be added for xorg-server 1.5.3 or possibly later
10 >>> if what I read is correct), and with origin coordinates broken at
11 >>> least on the radeon driver on my hardware, upper left (still stacked
12 >>> at least, but still just upper left) is all I get, and that's not very
13 >>> practical.
14 >>>
15 >> if you could post the script it would be interesting.
16 >
17 > I'll post the script in a separate reply...
18
19 OK, here it is, as a UUEed attachment below the sig, filenamed
20 "set-display". As I do the list as a newsgroup thru gmane using pan,
21 which doesn't handle posting attachments, I use a script setup as pan's
22 external editor to do the encoding and attaching. Unfortunately, that
23 limits the encoding choices to UUE and "identity" (which means simply
24 attach it as text). I hope gmane takes small attachments. If not, I'll
25 retry with it inline.
26
27 If you're familiar with xrandr, it should be pretty easy to follow and
28 modify as necessary for your setup. The default no-parameter action is
29 to set both panels to 1920x1200, stacked, my native resolution, so unless
30 your monitors can handle that, don't try running it as-is without a
31 parameter. If you feed it a parameter it doesn't recognize, or the usual
32 -h or --help, it'll spit out some help.
33
34 Taking a look at the script code, you can see several of the possible
35 settings commented. These were valid back on my old CRTs, but aren't
36 valid on my current setup.
37
38 As I said, if you're familiar with xrandr, changing it for your setup
39 should be pretty simple. I didn't bother with a config file for it, but
40 the main variables are all set at the top and reasonably abstracted.
41 Beyond that, you'd need to change the resolutions themselves, but the way
42 it's setup that's fairly easy. I've already done it once myself, when I
43 switched to the dual LCD panals from my former CRTs. Given the
44 abstraction, it shouldn't even be /that/ hard to alter it to deal with
45 two monitors side by side instead of stacked, tho I obviously designed it
46 with stacked in mind.
47
48 If it worked the way the xrandr documentation says it should, those lines
49 of fancy math would set the position origins to always center the
50 viewport, which would grow or shrink in a constant framebuffer. That is,
51 with stacked monitors and given my constant framebuffer size ($fb) of
52 1920x2400,the midline separating the two monitors would always remain the
53 same, x,1200, with the horizontal midpoint of the monitors also remaining
54 constant at 960,y, thus the constant midpoint, regardless of chosen
55 resolution, would remain 960,1200.
56
57 As I said in my initial post, however, the viewport positioning code
58 doesn't seem to work on at least my radeon 92xx series video card with
59 the xf86-video-ati radeon driver. The resolution changes work, but the
60 viewport is always originated at 0,0, the top left corner.
61
62 As you can see, I left the set -x in there for troubleshooting. That
63 way, if I run it from a terminal window (konsole, of course, since I'm a
64 KDE guy, situated far enough to the upper left that when I change
65 resolution I can still see it!!), I can see what the actual xrandr
66 commands issued are, along with the results, since I set verbose as
67 well. That's fine since I don't normally run it from konsole anyway, but
68 rather from the kmenu, as invoked by hotkey. (As I said, I hotkey invoke
69 nearly /everything/ I use regularly enough to remember a sequence for, in
70 kde3, thus its brokenness in kde4 in practice means the entirety of kde4
71 is broken, so far. But that's supposed to be fixed for 4.2...) So when
72 I run it from konsole and get the output, it's because I'm
73 troubleshooting and /want/ the output.
74
75 If you run the script with -h (or look at the code), you can see the
76 <size> parameter in both short and long forms corresponds to the x
77 resolution. Thus, my kmenu entries are along the lines of
78
79 Name: SetDisplay-8
80 Comment: Sets the display to 2x800x600, stacked for 800x1200
81 Command: set-display 8
82
83 I use the "fullscreen" action icon, which is a window with arrows in the
84 four corners (with the crystal icon theme at least).
85
86 The hotkey would be XF86HomePage,F8 (XF86HomePage just because it's one
87 of the extra buttons on this Logitech keyboard, used here to launch a
88 menu with a bunch of different secondary key options, in this case F8, to
89 launch set-display to set 800 width).
90
91 The set-display 19-6 option is set with a kmenu title of
92 SetDisplay-Orion, since that's what I use it for, playing Master of Orion.
93
94 What I /intended/ to do, when I was designing the script (thus before I
95 knew about the above positioning bug), was after I got this script
96 switching and centering correctly, I'd create another script that I could
97 invoke to incrementally pan position, say 100 px at a time in the desired
98 direction. (I intended to experiment with the increment, but obviously
99 when the positioning failed to work, I never got that far.) Then I could
100 have invoked the panning script (hotkeys again!) to move the viewport
101 around the framebuffer as necessary, giving me back at least a crude
102 version of the panning ability the old merged framebuffer driver had,
103 before the switch to xrandr.
104
105 Hopefully the positioning code will work either on newer radeon hardware,
106 or at least on other brands and therefore other drivers. If it does and
107 someone wants those panning scripts, I could probably whip them up
108 without too much trouble.
109
110 Meanwile, as I believe I mentioned, I was scanning the xorg mailing list
111 and saw a discussion of the schedule and features for the next xorg
112 release. (BTW, the latest xorg-server release, 1.5.3, isn't in the Gentoo
113 tree yet, even masked. It's probably in the xorg overlay...) It's
114 supposed to finally have panning again, which will be nice. Then the
115 xrandr viewport positioning won't matter so much since you can just pan
116 it to where you want.
117
118 Once again, don't run this without either the -h/--help option or
119 modifying it to fit your dispaly hardware, first.
120
121 Now... will the attachment post?
122
123 --
124 Duncan - List replies preferred. No HTML msgs.
125 "Every nonfree program has a lord, a master --
126 and if you use the program, he is your master." Richard Stallman
127
128 begin 740 set-display
129 M(R$O8FEN+V)A<V@*<STD>S$Z+3!]"0DC(')E<75E<W1E9"!S:7IE(&9A8W1O
130 M<B!O<B!H96QP('1R:6=G97(L(&1E9F%U;'0@:7,@(C`B"F9B/3$Y,C!X,C0P
131 M,`D)(R!T;W1A;"!F<F%M96)U9F9E<B!S:7IE"FUT/59'02TP"0DC(&UO;FET
132 M;W(M=&]P"FUB/41622TP"0DC(&UO;FET;W(M8F]T=&]M"F\]+2UO=71P=70*
133 M;3TM+6UO9&4*<#TM+7!O<PIV/2TM=F5R8F]S90IF/2TM9F(*8STB)'8@)&8@
134 M)&9B("1O(@DC(&-O;6UO;B!P87)T:6%L(&-O;6UA;F1L:6YE"@IH96QP='AT
135 M*"D@>PH)96-H;PH)96-H;R!5<V%G93H@(B1[,",C*B]](%LM:'PM+6AE;'!\
136 M/'-I>F4^72(*"65C:&\*"65C:&\@(E-E=',@6"!D=6%L+61I<W!L87D@<VEZ
137 M92!W:71H:6X@82!F<F%M96)U9F9E<B!O9B`D9F(N(@H)96-H;R`B56YL97-S
138 M(&]T:&5R=VES92!S=&%T960L(&UO;FET;W(@;W)I96YT871I;VX@:7,@<W1A
139 M8VME9"PB"@EE8VAO(")M;V1E<R!D=7!L:6-A=&5D+"!A;F0@<&]S:71I;VX@
140 M8V5N=&5R960@:6X@=&AE(&9R86UE8G5F9F5R+B(*"65C:&\*"65C:&\@(CQS
141 M:7IE/B!M87D@8F4@;VYE(&]F.B(*"65C:&\@(B`@("`Q.7PQ.3(P?#`Z("`@
142 M("`@("`@("`@(#$Y,C!X,3(P,"!E86-H+"`@(#$Y,C!X,C0P,"!T;W1A;"`H
143 M9&5F875L="DB"@EE8VAO("(@("`@,39\,38P,#H@("`@("`@("`@("`@("`Q
144 M-C`P>#$R,#`@96%C:"P@("`Q-C`P>#(T,#`@=&]T86PB"B,)96-H;R`B("`@
145 M(#$R?#$R.#`Z("`@("`@("`@("`@("`@,3(X,'@Y-C`@(&5A8V@L("`@,3(X
146 M,'@Q.3(P('1O=&%L(@H)96-H;R`B("`@(#$P?#$P,C0Z("`@("`@("`@("`@
147 M("`@,3`R-'@W-C@@(&5A8V@L("`@,3`R-'@Q-3,V('1O=&%L(@HC"65C:&\@
148 M(B`@("`@.7PY-C`Z("`@("`@("`@("`@("`@("`Y-C!X-S(P("!E86-H+"`@
149 M("`Y-C!X,30T,"!T;W1A;"(*"65C:&\@(B`@("`@.'PX,#`Z("`@("`@("`@
150 M("`@("`@("`X,#!X-C`P("!E86-H+"`@("`X,#!X,3(P,"!T;W1A;"(*"65C
151 M:&\@(B`@("`@-GPV-#`Z("`@("`@("`@("`@("`@("`V-#!X-#@P("!E86-H
152 M+"`@("`V-#!X.38P("!T;W1A;"(*(PEE8VAO("(@("`@(#5\-3$R.B`@("`@
153 M("`@("`@("`@("`@-3$R>#,X-"`@96%C:"P@("`@-3$R>#<V."`@=&]T86PB
154 M"B,)96-H;R`B("`@("`T?#0P,#H@("`@("`@("`@("`@("`@(#0P,'@S,#`@
155 M(&5A8V@L("`@(#0P,'@V,#`@('1O=&%L(@HC"65C:&\@(B`@("`@,WPS,C`Z
156 M("`@("`@("`@("`@("`@("`S,C!X,C0P("!E86-H+"`@("`S,C!X-#@P("!T
157 M;W1A;"(*"65C:&\*"65C:&\@(B`@,3DM-GPQ.3(P+38T,#H@("`@("`@("`@
158 M(#$Y,C!X,3(P,"`@=&]P+"`@("`V-#!X-#@P("!B;W1T;VT@*'!O<VET:6]N
159 M960@;&5F="DB"@EE8VAO"@EE>&ET"GT*"B,@;71M/21M="UM;V1E+"!M='`]
160 M)&UT+7!O<VET:6]N+"!M8FT])&UB+6UO9&4L(&UB<#TD;6(M<&]S:71I;VX*
161 M(R!D969A=6QT<R!B=70@9F]R(&UT;2!S970@8F5L;W<*8V%S92`D<R!I;@H)
162 M,3E\,3DR,'PP*0EM=&T],3DR,'@Q,C`P.SL)"2,@9&5F875L=`H),39\,38P
163 M,"D);71M/3$V,#!X,3(P,#L["B,),3)\,3(X,"D);71M/3$R.#!X.38P.SL*
164 M"3$P?#$P,C0I"6UT;3TQ,#(T>#<V.#L["B,).7PY-C`I"0EM=&T].38P>#<R
165 M,#L["@DX?#@P,"D)"6UT;3TX,#!X-C`P.SL*"39\-C0P*0D);71M/38T,'@T
166 M.#`[.PHC"35\-3$R*0D);71M/34Q,G@S.#0[.PHC"31\-#`P*0D);71M/30P
167 M,'@S,#`[.PHC"3-\,S(P*0D);71M/3,R,'@R-#`[.PH),3DM-GPQ.3(P+38T
168 M,"D);71M/3$Y,C!X,3(P,#MM8FT]-C0P>#0X,#MM='`],'@P.VUB<#TP>#$R
169 M,#`[.PH)*BD)"6AE;'!T>'0[.PIE<V%C"@HC(%-E="!T:&4@9&5F875L=',@
170 M8F%S960@;VX@)&UT;2!I9B!N96-E<W-A<GD*(R`D;71P+VUO;FET;W(M=&]P
171 M+7!O<VET:6]N(&1E9F%U;'1S('1O(&)O='1O;2!C96YT97(@;V8@=&]P(&AA
172 M;&8*(R!O9B!F<F%M96)U9F9E<BP@<V\@8V]M8FEN960@9&5F875L="!P;W-I
173 M=&EO;B!W:6QL(&)E(&-E;G1E<F5D+@HC('@H*'@@;V8@)&9B(&UI;G5S('@@
174 M;V8@)&UT;2D@+S(I(")X(B!Y*'D@;V8@)&9B("\R(&UI;G5S('D@;V8@)&UT
175 M;2D*6R`D;71P(%T@?'P@;71P/20H*"`D*"@@)'MF8B5X*GT@+2`D>VUT;25X
176 M*GT@*2D@+R`R("DI>"0H*"`D>V9B(RIX?2`O(#(@+2`D>VUT;2,J>'T@*2D*
177 M"B,@)&UB;2]M;VYI=&]R+6)O='1O;2UM;V1E(&1E9F%U;'1S('1O("1M=&T*
178 M6R`D;6)M(%T@?'P@;6)M/21M=&T*"B,@)&UB<"]M;VYI=&]R+6)O='1O;2UP
179 M;W-I=&EO;B!D969A=6QT<R!T;R!B96QO=R`D;70*(R!X*'@@;V8@)&UT<"D@
180 M(G@B('DH>2!O9B`D;71P('!L=7,@>2!O9B`D;71M*0HC("AS:6YC92!O=F5R
181 M86QL('!O<VET:6]N(&1E9F%U;'1S('1O(&-E;G1E<F5D+"!Y('=I;&P@9&5F
182 M875L="!T;R!C;VYS=&%N="D*6R`D;6)P(%T@?'P@;6)P/21[;71P)7@J?7@D
183 M*"@@)'MM='`C*GA]("L@)'MM=&TC*GA]("DI"@IS970@+7@*>')A;F1R("1C
184 M("1M="`D;2`D;71M("1O("1M8B`D;2`D;6)M"F5C:&\*>')A;F1R("1C("1M
185 M="`D<"`D;71P"F5C:&\*>')A;F1R("1C("1M8B`D<"`D;6)P"F5C:&\*>')A
186 B;F1R("1C("1M="`D<"`D;71P("1O("1M8B`D<"`D;6)P"@``
187 `
188 end

Replies