Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
xrandr - Shifting output to one side of the physical display
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
boerKrelis
Apprentice
Apprentice


Joined: 01 Jul 2003
Posts: 241
Location: The Netherlands

PostPosted: Sat Feb 27, 2016 1:56 am    Post subject: xrandr - Shifting output to one side of the physical display Reply with quote

Hello,

Context:
So, about 1/6th of my Thinkpad's X220 display has died - there is a column about 200 pixels wide that's unusable on the left side of the physical display. I'm still debating whether to open up the display to try and fix it.
The output runs at 1366*768. The display can do 1024*768 as well. That resolution would fit inside the working part of the display, giving me a smaller but fully working display, without me needing to move windows outside of the unviewable area.
Thing is, if set it to that resolution, the 1024*768 output is centered in the middle of the 1366*768 physical display. So my viewport is then still within the unusable area on the left AND I'm wasting space on the right side.

Question: How can I shift the output to the right?

Current situation, partly broken display:
Code:

 ____________
|XXX         |
|XXX         |
|XXX         |
|XXX_________|

X = dead but still used pixel



Desired situation (well, a fixed display would be nicer of course)

Code:

 ____________
|BBBO        |
|BBBO Output |
|BBBO        |
|BBBO________|

B = dead but unused pixel

O = alive but unused pixel



Situation after running

xrandr --output LVDS1 --mode 1024x768 --pos $((1366-1024))x0 :

Code:

 ____________
|BBX        O|
|BBX Output O|
|BBX        O|
|BBX________O|



As you can see, setting the output to 1024*768 doesn't help me much, as there will still be pixels addressed which I can't see (X), while there are also perfectly good pixels on the right which are not being used...
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7167

PostPosted: Sat Feb 27, 2016 12:18 pm    Post subject: Reply with quote

I think what you seek is panning, check xrandr panning help section.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43752
Location: 56N 3W

PostPosted: Sat Feb 27, 2016 2:01 pm    Post subject: Reply with quote

boerKrelis,

I would cheat and hand craft a modeline for Xorg that generated 1024x768, or whatever is good on your display.
Xorg can do random resolutions as dictated by the modeline.

You may use xvidtune to do the same thing interactively.
If you run it as root, it can edit your xorg.conf. If you run it as a user, the changes will drop out.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7167

PostPosted: Sat Feb 27, 2016 2:53 pm    Post subject: Reply with quote

while it wasn't a problem for crt, lcd are weird when not in native resolution, making the modeline solve using non native resolution hazardous no?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43752
Location: 56N 3W

PostPosted: Sat Feb 27, 2016 4:32 pm    Post subject: Reply with quote

krinn,

You could destroy a CRT by operating it at the wrong HorizSync because the HorizSync frequency was used to generate the EHT for the CRT final anode.
Early CRTs did not protect themselves from overscan, as a result, it was easy to let the magic smoke out.

LCDs don't have this issue. They can generate some ugly video artefacts but they go blank rather than display them to the user, who may become very alarmed.
This avoids the need for users to wear peril sensitive glasses when doing odd things with LCDs.

Many LCD displays do video scaling from whatever the input is to their native resolution, To put a lower resolution picture on a part of the LCD, and avoid the upscaling means running Xorg with different resolutions on the framebuffer drawing and read out sides. Its a long time since I've done this, deliberately anyway.
In days of old when 640x480 was a good display, it was quite common to have a bigger virtual resolution and use a 640x480 viewport into the bigger virtual desktop.

The Xorg horizontal video timing is
man xorg.conf:
     The  mode-description  is  in  four sections, the first three of
              which are mandatory.  The first is the dot (pixel) clock.   This
              is  a single number specifying the pixel clock rate for the mode
              in MHz.  The second section is a list of four numbers specifying
              the  horizontal  timings.   These  numbers are the hdisp, hsync-
              start, hsyncend, and htotal values.

By reducing hdisp and keeping htotal constant the image will be made smaller (less pixels) and moved right.

The display timing reference point is actually hsync-start but meh.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
boerKrelis
Apprentice
Apprentice


Joined: 01 Jul 2003
Posts: 241
Location: The Netherlands

PostPosted: Sun Feb 28, 2016 3:37 am    Post subject: Reply with quote

Thanks, I'm going to try the modeline approach. Panning doesn't seem to be what I want. Will report back!
Back to top
View user's profile Send private message
Leio
Developer
Developer


Joined: 27 Feb 2003
Posts: 487
Location: Estonia

PostPosted: Sun Feb 28, 2016 9:26 pm    Post subject: Reply with quote

I don't think with modeline approach you are going to get anything different than choosing 1024x768 resolution, maybe if you make it tiny and center or something, but otherwise probably something similar to your last example in original post.
I don't think you can make some magical larger stride displays with modelines that would keep your left side empty, just non-standard resolution modes you can't select otherwise, but you already tried with 1024x768, so if that's what you need but with say 950x768, then modelines could help, but it probably won't be ideal usage of working pixels.
_________________
GNOME team lead; GStreamer; MIPS/ARM64
Back to top
View user's profile Send private message
boerKrelis
Apprentice
Apprentice


Joined: 01 Jul 2003
Posts: 241
Location: The Netherlands

PostPosted: Sun Mar 06, 2016 11:05 am    Post subject: Reply with quote

As Leio foretold, it didn't work. An 1280 px wide output became centered within the TFT frame.

So I ended up screwing the frame open and jamming a piece of cork between the frame and a part of a PCB (found out that when I exert pressure on that location, the dead pixels become alive).

The other alternative would've been to try to tell my tiling window manager (wmii) not to put anything in the dead zone.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43752
Location: 56N 3W

PostPosted: Sun Mar 06, 2016 11:30 am    Post subject: Reply with quote

boerKrelis,

It sounds like the cork is a better solution but I'm surprised the modeline didn't work.

A modeline says how many visible pixels you want on a line, how many total pixels you want and where the timing reference is.
The software guys that made X, had an odd way of defining it all, as the hardware world has always used hsync-start as the reference,
since its hsync-start that drives the display hardware.

Its the number of pixels from hsync-start to the end of the video line that determines where on the screen the image starts, in left/right.
By keeping htotal constant and changing the position of hsync-start with respect to htotal, moves the image left/right.

Some drivers need an Option set before they will use a manual modeline.
Most drivers do not work in individual pixels across the screen. They work in chunks of 8 or 16 pixels.

It appears that the bond between the flexi circuit and the panel has failed on your screen. Keeping it in place with pressure from your cork will work until the contact surfaces oxidise.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
boerKrelis
Apprentice
Apprentice


Joined: 01 Jul 2003
Posts: 241
Location: The Netherlands

PostPosted: Sun Mar 06, 2016 11:40 am    Post subject: Reply with quote

Thanks Neddy.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum