Help with Panning and virtual screen resolution

Hey all,

I’ve just got my DevTerm A06.

I’m looking for some help with panning the screen. What I’d like to have is the desktop in 16:9 format with 1.2 scale, and the viewport panning to allow me to pan up/down the virtual screen space.

What I’ve tried so far is mixing together xrandr commands using the guidance here: https://wiki.clockworkpi.com/index.php/How-Tos_and_Tweaks

If I just use: xrandr --fb 1280x960 --output DSI-1 --panning 960x0 the screen area when I pan down is black.

Has anyone had this working on a DevTerm?

I played with a few variations on an RPI-CM3 DevTerm but really it should work the same with anything using this kind of panel.

I didn’t see a black area, but one difference is I’m using a different window manager (Window Maker). It was nice enough to repeat my desktop background over the entire framebuffer. Unfortunately the handling of the pop-up menu is broken in WMaker and it just shoots off screen whenever I try to move over the menu items. I tried it with LXDE and it also wasn’t black, but the pop-up menu was only appearing in the top area and not under the mouse cursor. I could drag windows down to the other area and still kind of use it.

My suspicion is that the XRandR and root window events are not being picked up (surprising in the year 2022). Restarting your window manager with the setting might work. Moving the option into /etc/X11/xorg.conf.d/10-yourpanning.conf might help so that the window manager sees the framebuffer size on start.

What worked best for me (based on the xrandr man page) was:
xrandr --fb 1280x960 --output DSI-1 --mode 480x1280 --panning 480x0

You can probably omit the --mode, but I’ve already messed with mine that I wanted to give you what actually worked and not what I think theoretically works :slight_smile:

To get a stacks 3 panel heights high I tried this and it worked too:
xrandr --fb 1280x1440 --output DSI-1 --panning 480x0

Yes, but not satisfactorily. :frowning:

Thanks for the detailed response.

I’ve had no joy yet, the odd thing I’ve noticed today is that panning works if the scale is set to 1.2 on xfce’s display settings, but stops scaling.

I’ll experiment again later and report back.

Cheers for letting me know what worked for you, and pointing me towards the config files, they’ve given me more to look at.

I’ve also switched to arch+lightdm+xfce4 now so more to look at, but is should be essentially the same rough concepts.

After banging my head against the wall for a couple of days I’ve reached some progress. xrandr with panning works as expected on cinnamon, I’m guessing the issue I was having was related to xfce.

It looks like there’s not much of a way to do this on wayland and I’ve not tried gnome on xorg yet; so I’ve not had success with gnome.

I’ll probably land on changing the desktop environment on my new setup and I’ll post back what I did when I get it all working.

Thanks for the help again. If anyone else gets here through frustration; change desktop environment, I switched to clockworkos (reports ubuntu 21 in screenfetch?) with gdm and cinnamon.

I’ll report back when I get something I like. I’m aiming for arch+lightdm with a desktop environment that’s not too heavy.

Panning working on Cinnamon with persistence:

Works:

  • Vertical Panning
  • Windows below the fold

Doesn’t work well:

  • Scaling: resets to 1x after the xrandr command.
  • Horizontal Panning: Can’t work it out, get an error when setting the horizontal panning value.
  • Panel: Can’t be at the bottom of the virtual screen
  • Menu: uses Actual screen resolution to determine menu height
  • Background: Tiles vertically
  1. Install cinnamon on your os.

For clockwork that’s

sudo apt-get install cinnamon-desktop-environment

For Arch:

sudo pacman -S cinnamon
  1. log out to lightdm/the display manager
  2. switch to Cinnamon in the Desktop Environment switcher.
  3. Open Startup Applications
  4. Turn off Cinnamon Settings Daemon - xrandr
  5. Create ~/.xprofile with contents something like this:
#!/usr/bin/env bash

xrandr --fb 1280x720 --output DSI-1 --mode 480x1280 --panning 720x0 --rotate right

  1. Reboot
  2. Right click the panel, move it somewhere that’s not the middle of the screen

Going to try out other desktop environments and window managers now to see if anything gets closer to what I’m after. Then I’m going to forget about xrandr, and never revisit it.

Whilst most of this is me barking into the wind; I hate when someone leaves a question open, if they find a solution to their problem.

So, after experimenting I can safely say the dodgey functionality after an xrandr call is down to the window manager being used.

Cinnamon kind of works however; windows and menus are placed in the natural screen area, the top 480px. The panel can’t be dropped to the bottom of the screen. It all feels a bit hacky and a bit not satisfactory.

However, thanks to OrangeTide pointing me in the right direction I now have something I’m happy with.

Solution

I now have a setup which allows for vertical panning, with the wallpaper spanning the whole screen area, and windows & menus placed anywhere on the virtual screen area.

I dropped the requirement of also scaling by 1.2x because the more I’ve worked with the devterm the less I like that idea.

I like this solution, it gives me as much vertical screen space as I want. I think it could be equally adapted to panning horizontally.

Caveat

The only caveat is that the solution involves using a hackable/customisable window manager. A wm where the screen resolution can be updated via a script. In this instance I’ve opted for awesome-wm, it works, it suits the DevTerm and I like it.

Steps

Install AwesomeWM

https://awesomewm.org/

I opted for getting rid of the DisplayManager and just using startx. (sudo systemctl disable lightdm)

With a ~/.xinitrx:

# … other stuff
# turn off x display sleeping to avoid having to reboot when the screen doesnt wake up properly
xset s off -dpms

# resize screen
xrandr --fb 1280x720 --output 480x1280 --panning 720x0 --rotate right

# start awesome
# with logging piped somewhere to cat it later
exec awesome 2>&1 $HOME/.cache/awesome/awesome.log

FakeResize screen in awesome

Awesome uses an rc.lua file to set up config & theming. It also has a resize for virtual screen sizing, this worked for me:

-- … your other config
awful.screen.connect_for_each_screen(function(s)
  local geom = s.geometry
  if geom.height == 480
  then
    s:fake_resize(geom.x, geom.y, 1280, 720)
  end
end)

Ignoring the messyness & hard coded-ness that works^… just need to clean it up and consider sharing it.

Summary

I’m pretty sure the reson this is an issue is because window managers are written to handle multiple screens over panning.

It’s much more common to spend lots of development hours making multiple screens work well rather than one screen pan, because it’s much more common nowadays to have multiple screens than one diddy screen.

So, this is an option, another would be to test out other window managers and hope. I tested xfwm4, gnome, cinnamon, gnome-classic, some others, none had good support for panning.

Other WMs probably support this but awesome was where I landed. It feels firmly like a devterm issue that should be resolved if DevTerm is gonna be much more than a toy. Damn glad I have something I like now.

1 Like

I just found this topic only now :-/

Anyway, I wanted something similar and found out it is because of the compositor, so if you want to use xfwm, you can restart it without a compositor, like this: xfwm4 --replace --compositor=off (however, this will deprive you of the Alt+Fn+trackball zoom) - see DevTerm Tips & Tricks - #3 by garabik for the commands I use.