From: Duncan <1i5t5.duncan@cox.net>
To: gentoo-amd64@lists.gentoo.org
Subject: [gentoo-amd64] Re: kde4, xorg, xf86-video-ati/radeon, and multi-panel display
Date: Sun, 23 Nov 2008 11:06:52 +0000 (UTC) [thread overview]
Message-ID: <pan.2008.11.23.11.06.42@cox.net> (raw)
In-Reply-To: pan.2008.11.23.07.23.44@cox.net
Duncan <1i5t5.duncan@cox.net> posted pan.2008.11.23.07.23.44@cox.net,
excerpted below, on Sun, 23 Nov 2008 07:23:44 +0000:
>>> So I scripted up a solution using xrandr, put the entries in my kmenu,
>>> and can use them to switch resolutions. But there's still a problem.
>>> The origin coordinates portion appears to be broken, so when I
>>> downgrade resolution, the viewport is always the upper left portion of
>>> the full size version. There's no mouse panning with randr yet
>>> (that's supposed to be added for xorg-server 1.5.3 or possibly later
>>> if what I read is correct), and with origin coordinates broken at
>>> least on the radeon driver on my hardware, upper left (still stacked
>>> at least, but still just upper left) is all I get, and that's not very
>>> practical.
>>>
>> if you could post the script it would be interesting.
>
> I'll post the script in a separate reply...
OK, here it is, as a UUEed attachment below the sig, filenamed
"set-display". As I do the list as a newsgroup thru gmane using pan,
which doesn't handle posting attachments, I use a script setup as pan's
external editor to do the encoding and attaching. Unfortunately, that
limits the encoding choices to UUE and "identity" (which means simply
attach it as text). I hope gmane takes small attachments. If not, I'll
retry with it inline.
If you're familiar with xrandr, it should be pretty easy to follow and
modify as necessary for your setup. The default no-parameter action is
to set both panels to 1920x1200, stacked, my native resolution, so unless
your monitors can handle that, don't try running it as-is without a
parameter. If you feed it a parameter it doesn't recognize, or the usual
-h or --help, it'll spit out some help.
Taking a look at the script code, you can see several of the possible
settings commented. These were valid back on my old CRTs, but aren't
valid on my current setup.
As I said, if you're familiar with xrandr, changing it for your setup
should be pretty simple. I didn't bother with a config file for it, but
the main variables are all set at the top and reasonably abstracted.
Beyond that, you'd need to change the resolutions themselves, but the way
it's setup that's fairly easy. I've already done it once myself, when I
switched to the dual LCD panals from my former CRTs. Given the
abstraction, it shouldn't even be /that/ hard to alter it to deal with
two monitors side by side instead of stacked, tho I obviously designed it
with stacked in mind.
If it worked the way the xrandr documentation says it should, those lines
of fancy math would set the position origins to always center the
viewport, which would grow or shrink in a constant framebuffer. That is,
with stacked monitors and given my constant framebuffer size ($fb) of
1920x2400,the midline separating the two monitors would always remain the
same, x,1200, with the horizontal midpoint of the monitors also remaining
constant at 960,y, thus the constant midpoint, regardless of chosen
resolution, would remain 960,1200.
As I said in my initial post, however, the viewport positioning code
doesn't seem to work on at least my radeon 92xx series video card with
the xf86-video-ati radeon driver. The resolution changes work, but the
viewport is always originated at 0,0, the top left corner.
As you can see, I left the set -x in there for troubleshooting. That
way, if I run it from a terminal window (konsole, of course, since I'm a
KDE guy, situated far enough to the upper left that when I change
resolution I can still see it!!), I can see what the actual xrandr
commands issued are, along with the results, since I set verbose as
well. That's fine since I don't normally run it from konsole anyway, but
rather from the kmenu, as invoked by hotkey. (As I said, I hotkey invoke
nearly /everything/ I use regularly enough to remember a sequence for, in
kde3, thus its brokenness in kde4 in practice means the entirety of kde4
is broken, so far. But that's supposed to be fixed for 4.2...) So when
I run it from konsole and get the output, it's because I'm
troubleshooting and /want/ the output.
If you run the script with -h (or look at the code), you can see the
<size> parameter in both short and long forms corresponds to the x
resolution. Thus, my kmenu entries are along the lines of
Name: SetDisplay-8
Comment: Sets the display to 2x800x600, stacked for 800x1200
Command: set-display 8
I use the "fullscreen" action icon, which is a window with arrows in the
four corners (with the crystal icon theme at least).
The hotkey would be XF86HomePage,F8 (XF86HomePage just because it's one
of the extra buttons on this Logitech keyboard, used here to launch a
menu with a bunch of different secondary key options, in this case F8, to
launch set-display to set 800 width).
The set-display 19-6 option is set with a kmenu title of
SetDisplay-Orion, since that's what I use it for, playing Master of Orion.
What I /intended/ to do, when I was designing the script (thus before I
knew about the above positioning bug), was after I got this script
switching and centering correctly, I'd create another script that I could
invoke to incrementally pan position, say 100 px at a time in the desired
direction. (I intended to experiment with the increment, but obviously
when the positioning failed to work, I never got that far.) Then I could
have invoked the panning script (hotkeys again!) to move the viewport
around the framebuffer as necessary, giving me back at least a crude
version of the panning ability the old merged framebuffer driver had,
before the switch to xrandr.
Hopefully the positioning code will work either on newer radeon hardware,
or at least on other brands and therefore other drivers. If it does and
someone wants those panning scripts, I could probably whip them up
without too much trouble.
Meanwile, as I believe I mentioned, I was scanning the xorg mailing list
and saw a discussion of the schedule and features for the next xorg
release. (BTW, the latest xorg-server release, 1.5.3, isn't in the Gentoo
tree yet, even masked. It's probably in the xorg overlay...) It's
supposed to finally have panning again, which will be nice. Then the
xrandr viewport positioning won't matter so much since you can just pan
it to where you want.
Once again, don't run this without either the -h/--help option or
modifying it to fit your dispaly hardware, first.
Now... will the attachment post?
--
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman
begin 740 set-display
M(R$O8FEN+V)A<V@*<STD>S$Z+3!]"0DC(')E<75E<W1E9"!S:7IE(&9A8W1O
M<B!O<B!H96QP('1R:6=G97(L(&1E9F%U;'0@:7,@(C`B"F9B/3$Y,C!X,C0P
M,`D)(R!T;W1A;"!F<F%M96)U9F9E<B!S:7IE"FUT/59'02TP"0DC(&UO;FET
M;W(M=&]P"FUB/41622TP"0DC(&UO;FET;W(M8F]T=&]M"F\]+2UO=71P=70*
M;3TM+6UO9&4*<#TM+7!O<PIV/2TM=F5R8F]S90IF/2TM9F(*8STB)'8@)&8@
M)&9B("1O(@DC(&-O;6UO;B!P87)T:6%L(&-O;6UA;F1L:6YE"@IH96QP='AT
M*"D@>PH)96-H;PH)96-H;R!5<V%G93H@(B1[,",C*B]](%LM:'PM+6AE;'!\
M/'-I>F4^72(*"65C:&\*"65C:&\@(E-E=',@6"!D=6%L+61I<W!L87D@<VEZ
M92!W:71H:6X@82!F<F%M96)U9F9E<B!O9B`D9F(N(@H)96-H;R`B56YL97-S
M(&]T:&5R=VES92!S=&%T960L(&UO;FET;W(@;W)I96YT871I;VX@:7,@<W1A
M8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T
M;2D*6R`D;71P(%T@?'P@;71P/20H*"`D*"@@)'MF8B5X*GT@+2`D>VUT;25X
M*GT@*2D@+R`R("DI>"0H*"`D>V9B(RIX?2`O(#(@+2`D>VUT;2,J>'T@*2D*
M"B,@)&UB;2]M;VYI=&]R+6)O='1O;2UM;V1E(&1E9F%U;'1S('1O("1M=&T*
M6R`D;6)M(%T@?'P@;6)M/21M=&T*"B,@)&UB<"]M;VYI=&]R+6)O='1O;2UP
M;W-I=&EO;B!D969A=6QT<R!T;R!B96QO=R`D;70*(R!X*'@@;V8@)&UT<"D@
M(G@B('DH>2!O9B`D;71P('!L=7,@>2!O9B`D;71M*0HC("AS:6YC92!O=F5R
M86QL('!O<VET:6]N(&1E9F%U;'1S('1O(&-E;G1E<F5D+"!Y('=I;&P@9&5F
M875L="!T;R!C;VYS=&%N="D*6R`D;6)P(%T@?'P@;6)P/21[;71P)7@J?7@D
M*"@@)'MM='`C*GA]("L@)'MM=&TC*GA]("DI"@IS970@+7@*>')A;F1R("1C
M("1M="`D;2`D;71M("1O("1M8B`D;2`D;6)M"F5C:&\*>')A;F1R("1C("1M
M="`D<"`D;71P"F5C:&\*>')A;F1R("1C("1M8B`D<"`D;6)P"F5C:&\*>')A
B;F1R("1C("1M="`D<"`D;71P("1O("1M8B`D<"`D;6)P"@``
`
end
next prev parent reply other threads:[~2008-11-23 11:07 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-23 7:23 [gentoo-amd64] kde4, xorg, xf86-video-ati/radeon, and multi-panel display Duncan
2008-11-23 10:20 ` [gentoo-amd64] " ABCD
2008-11-23 11:00 ` ABCD
2008-11-23 11:03 ` Beso
2008-11-23 11:39 ` Duncan
2008-11-23 11:56 ` Beso
2008-11-23 13:10 ` Duncan
2008-11-23 11:06 ` Duncan [this message]
2008-11-23 11:38 ` Beso
2008-11-23 12:33 ` Duncan
2008-11-23 11:24 ` [gentoo-amd64] " Beso
2008-11-23 12:08 ` [gentoo-amd64] " Duncan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=pan.2008.11.23.11.06.42@cox.net \
--to=1i5t5.duncan@cox.net \
--cc=gentoo-amd64@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox