The Ui Conundrum


mindlord

Notices Two Things
Joined
Mar 10, 2006
Messages
1,786
Location
In a cave.
Website
Visit site
Please excuse the gross misspelling of the title of this topic. I have a raging headcold that interferes with my internal spell checker

I know I haven't been an active member of the Pandora community, but I've been a quiet observer for some time. Initially, I thought about hurrying up and finishing Sycophant as an entrant into the Pandora UI arena, but I'm not sure that's what the community is really after.

There are two camps of thought, have a simple UI that launches single applications (Gmenu, or Sycophant) or a full blown window manager (Qtopia, KDE, or Gnome).

The single application approach does have quite a few benefits, like blazing fast load times, and ease of use to someone picking up the unit for the first time. There are some drawbacks too, running more than one app at a time is cumbersome, and someone has to develop the UI from scratch - specifically for the Pandora. GMenu is a good starting point, and plugins could allow for some additional "background task" functionality, but it still means having to wait for X to load-up to use everyone's favorite browser.

While the single application approach is appealing on a handheld device certain tasks beg for a window manager, web browsing, email, note-taking and such, when performing PDA-like tasks a full WM seems logical and indeed a natural choice. Personally, I think that the Pandora could run a full WM pretty well, and it makes sense to for the purposes of it's PDA-like abilities. In this camp, QTopia, KDE, and a few other suggestions have been made, and all are fine choices, but I thought it might be worthy to inject another possibility: Xfce or even Xfce over DirectFB.

XFCE is very gnomelike (GTK+ derived), light, and offers a wide variety of tools out of the gate and has plugins enabling the use of KDE and Gnome dock/panel applets, many of which could be very useful to the Pandora. Even if you don't go the Direct FB route, Xfce is a fine lightweight WM for X11, albeit not very flashy. I am of course biased because Xfce is my preferred WM of choice on my desktop and laptop as well. Even as powerful as my desktop is, it's nice to squeeze every ounce of performance I can out of it. The screen of the Pandora is large enough, and at a high enough resolution and the system core strong enough that iceweasel, mousepad, and Thunar would render nicely and run at a reasonable speed.

Window Managers aside - the Pandora encounters the same issues as every other piece of hardware with a GUI operating system. How do you have a system that is multitasking and robust like Windows, KDE or Gnome and still sensible enough to unload itself from memory and give all the computer's resources to an application that requests it? Currently I can think of no operating system, Window Manager, or mechanism in linux that does this. If there is one, I'd like to know because it surely would make gaming on my laptop a lot better.

If the OS would just step aside and leave just enough of itself exposed to the game developer to do fantastic things with the hardware. Linux is a good platform for this scenario, but when a window manager is already loaded there is some overhead to contend with.

I'm going to use X as a for example here. You could be running a window manager in DirectFB just as easily.

Programs that want all the resources will be slow to launch as the system unloads X gracefully or at least saving the state of memory of the device to the SD card, so that it can restore itself to the state it was in before starting the resource intensive application.

If you're unloading X, Any background tasks that were running are either killed, or become uncontrollable because the window manager is gone, neither result sounds very good to me. As it could leave zombie processes or other nasties lingering around.

If your saving the state of memory, then you're going to have to kill all the X related processes. But, how would the launcher know which processes to kill? Does it leave the mp3 player daemon running or not? How does it even know the name or pid of the mp3 player daemon? Additionally, when reloading the state some X apps may freak out because of the time differential.

I suppose you could save the X session and restart linux at a different runlevel other than 5. That's pretty time consuming. I'm not sure the average person would want to wait as linux changes runlevel just to play Joust on MAME.

So, is the Pandora going to use a Window Manager when requested as a secondary ability? or Do will it use a window manager as the main interface, give it up to Emulators and other intensive applications when they ask for it?

Eventually it comes down to the end user. If you look at the Pandora and see a ultra mobile PC, you're likely to want a full blown WM and deal with slow load times on the Emulators. If you look at the Pandora and see a portable gaming device you'll likely want a dead simple frontend. If you look at the Pandora and see a Portable multimedia device you might want too look into the linux port of XBMC.
 
simple idea:
on booting, have a GRUB-like menu letting you choose between

"Xfce Window Manager: more flexible and multitasking, slightly slower"

or

"Simple/No Window Manager: more power to one single application"


maybe just "PDA Mode" and "Game/Console mode" or something, don't know.

maybe? maybe some kind of way to do alt-ctrl-baskspace to restart X to avoid having to do a full reboot? :p
 
I'd say I'd rather have one application running at a time than have my handheld slow down on multitasking

nothing stops you from making a hybrid: make it able to open lots of stuff, but "pause" them (not continue to execute them) if they are not on focus. this multitask would able the user to open a lot of apps, but without loosing cpu cycles with executing them all at once.

also, with this setup, you can make special apps (like an mp3 player, or something that needs to be kept running) to set a special condition where they are not "paused" like the others.

developers would have to be sensible enough to judge what kind of app they are playing with.

an emulator would not need to be kept running all the time, so it could have this "pause" switch ready(for it to make a quick savestate of the game, for example, and stop executing).
while an mp3 player would certainly have an "unpausable mode" switch ready(for it to execute only a part of the code, the mp3 decoding and playback part).

maybe too much work to implement? or maybe just a matter of having the multitask linux read if the app would like to "pause"(make a quick savestate, and put major stuff off the ram) when it lose focus?
 
It would be a nice and Utopian world if we could truly rely on the developers to build such mechanisms into their software. But some developers might not be aware of the need, or willing to put such "pause switches" into place. Indeed, some software may not be easily ported to include such switches, since they weren't designed with them in mind. It's really going to have to come down the the operating system itself to manage what to do in these situations.

What CC_Machine suggests is similar to what the Nintendo DS does, by default it just brings up a simple interface that lets the user choose from a few mundane tasks, such as device configuration before booting the main executable loaded into slot1 or slot2. You have the option on the DS to bypass this configuration menu and automatically boot software, and can hold a key combo down when powering on to bring the configuration menu back up.

Something like this might be a workable solution for the Pandora since at boot you could choose the type of task you're after from a dead simple interface before loading the beautiful software launcher, or the functional window manager. And you could configure it to skip the selection/configuration screen and launch one or the other by default depending on your taste, knowing that you could change it later by holding a key-combo at boot.

If the Pandora takes a cue from the GP2X then it will probably look for the autorun file on the slot1 SD card and do whatever it says, unless a key-combo is held down. In which case it will fire up the default configuration shell. In this way you could put X11 on an SD card in slot1 (which boots automatically when you turn the machine on) and a beautiful selector in slot2 and just hold down the proper key combo to choose which one you want to boot when you power the unit on. Maybe, some mechanism could be in place to "soft boot" from one SD card to the other or something. This way someone could have the best of both world fairly easily. It would be nice if the default shell made it super easy to set your autorun preferences and helped you build the autorun files for each of your SD cards as well, but that's probably for something to look forward to in version 2.0 of the kernel. :D

Needless to say, what the Pandora does when you first turn it on, is ultimately going to be the responsibility of the end user. I really don't expect it to do much of anything when you first pull it out of the box and turn it on. It will be up to you to load your SD card up with the software that likens to your taste and what you want out of the Pandora. It's almost impossible to guess what should be there out of the gate, they certainly can't give it everything out of the box.
 
CC_machine said:
simple idea:
on booting, have a GRUB-like menu letting you choose between

"Xfce Window Manager: more flexible and multitasking, slightly slower"

or

"Simple/No Window Manager: more power to one single application"
maybe just "PDA Mode" and "Game/Console mode" or something, don't know.

maybe? maybe some kind of way to do alt-ctrl-baskspace to restart X to avoid having to do a full reboot? :p



I was going to suggest something similar. Because while I still do want to utilize the UMPC-like capabilities of the Pandora, I know some programs, like a possible N64 emulator and the like, will probably need to squeeze as much as possible from the console, and I want to be able to use them without much fuss.

The only foreseeable problem is just the amount of work it would be to code two different UIs as a 'default', i.e. out-of-the-box having two separate but complete interfaces... It puts loads of work and time on the developers, perhaps more than initially anticipated.

Not only that, but will the software that's designed for one UI be able to be run without extra code for the other UI? I might want, one day, to roll with Sonic 3 and want to play some music in the background, but if the Megadrive emulator is coded to run on one UI, where no processes are left but whatever you've chosen to run, and the MP3 player is set to run in 'desktop mode'.... crossover?
 
Last edited by a moderator:
No, two separate UIs is a bad idea. If an app really needs that much ram, an option to kill the Xserver (kdrive or not) when the app starts is enough. Much easier.
 
Apps that require the Pandora's full resources to run optimally must have a way to do so. Otherwise, a multitasking environment for apps that can co-exist without bad performance is just fine.

I know almost nothing about Linux though, so I don't know what the best way to do that would be. But I'm sure Pandora's devs do, so I have faith.
 
Prophet said:
Apps that require the Pandora's full resources to run optimally must have a way to do so. Otherwise, a multitasking environment for apps that can co-exist without bad performance is just fine.

I know almost nothing about Linux though, so I don't know what the best way to do that would be. But I'm sure Pandora's devs do, so I have faith.
If an application needs every bit of system resources it can get, then the best thing to do would probably be to make a super-minimal build of the OS with the application packaged in it. Yes, that would require a reboot (maybe the regular OS session could suspend to disk and resume when the custom OS app is done?) but the programmer could include only the drivers and services that are absolutely necessary for his app. It's kind of a complicated solution, but anybody capable of writing an application that actually needs that level of exclusive system access should be more than capable of building a stripped down linux build to go with it. :D
 
Last edited by a moderator:
Back
Top