A Proposal To Fix the Full-Screen X11 Window Mess
jones_supa writes "The SDL developers Ryan Gordon and Sam Lantinga have proposed a window manager change to work out the full-screen X11 window mess, primarily for games. The proposal is to come up with a _NET_WM_STATE_FULLSCREEN_EXCLUSIVE window manager hint that works out the shortcomings of the full-screen hint used currently by most games, _NET_WM_STATE_FULLSCREEN. Ryan and Sam have already worked out an initial patch for SDL but they haven't tried hooking it to any window manager yet. Those interested in the details, information is available from this mailing list message. One of the key changes is that software would make the request to the window manager to change the resolution, rather than tapping RandR or XVidMode directly. Martin Gräßlin of KDE was rather wary about the patch and said that games changing the resolution just tend to mess up the desktop."
Seems like a reasonable idea, given a bit of time to mature as a spec. In KDE's case, a separate daemon from the window manager handles resolution changes so going through the WM would add complexity, and the plasma shell still has no way to realize that it shouldn't reflow the desktop widgets. Setting window properties seems like a sensible IPC method for communicating intent though (without making yet another aspect of the X desktop reliant upon the not-very-network-transparent dbus): "hey, I need to resize, but just for me so don't reshuffle the desktop and docks."
So, ugh... fix your desktop?
Just start the goddamn games on a totally different TTY. There, problem solved!
With Linux finally becoming a more "proper" gaming platform (i.e. Steam and others), it's "about time" that this is dealt with. _NET_WM_STATE_FULLSCREEN_EXCLUSIVE, where have you been my whole adult life? Gotta hand it to Ryan Gordon ("Icculus," as I recall) for consistently making Linux gaming that much more viable.
Who is still running a CRT? Who wants any program to change the resolution of their screen?
This strikes me as the wrong solution to the problem: A program should instead request the "current monitor's resolution" (because there can be more than one!) set its display area to that size, and then tell the window manager to "fullscreen" it by removing title bar and border decorations and moving it to (0,0) of that monitor. But NEVER EVER RESIZE MY MONITORS. Thank you. The window manager should always be superior to the app, and one should always be able to manage the window (task switch, move to another desktop, etc) using the window manager, regardless of what the app thinks it is doing.
1^2=1; (-1)^2=1; 1^2=(-1)^2; 1=-1; 1=0.
Was reading that e-mail from Martin Gräßlin. He's completely missing the point, he's complaining about all the issues this proposal *is meant to fix*, the whole idea is that a program going fullscreen doesn't interfere with anything else. Way to go.
Martin Gräßlin of KDE was rather wary about the patch and said that games changing the resolution just tend to mess up the desktop
KDE doesn't need the help.
So another ten years? Seriously, this is well past due. This is the second story about someone wanting to fix the desktop in the last month or so. Hopefully if there are enough one of them might actually gain traction. Here is hoping. The X system really is a heap. As much as the purists like to bitch about it, thank goodness for nvidia when it comes to multiple monitor support. Too bad it doesn't help the gaming though.
-- I ignore anonymous replies to my comments and postings.
We can all agree the X is a gigantic mess. It needs replaced by something better -- badly.
Yeah, we'll lose ... a lot ... but won't it ultimately be worth it in the end?
Required reading for internet skeptics
I still think X needs to go. For truely forward thinking, it needs to be replaced. Just look at Andriod. Andriod would not be useful if it was forced to use X.
Frankly, X does too many things that too few people need. It was designed for a different era and it scales to modern workflows very clumsily. Multi-monitor desktops and gaming on windows is effortless. On X it's frankly a chore.
Sorry, no, network transperancy is not an important feature anymore. Probalby implemented by .001% of regular users. VNC/RDP style remote access is the way it's done now. An no, nobody cares if it's tehnically inferior. It's hundreds of times easier to implment and use.
Modern toolkits pretty much ignore 95% of X's built in features an just pass bitmaps.
Yeah, X has lots of cool things but you have to realize most of them are impractical or unnecessary. Today we really have the memory, computational power, and bandwith to bang whatever we want on to the screen with out any trouble. The latency and overhead X present are the enemies today.
Now stop. - Yes you, stop. I know you're about to type up a 10 paragraph screed about how you ported X ap to obscure platform Y, or remotely managed 10,000 servers with facial twitches and GTK. Just stop. Your use case does not represent the vast majority of computer users. It doesn't even represent a full fraction of a percent.
Legacy baggage and clinging to old ideas spawned x.org. The same thing is what will spawn whatever is to replace X.
It is a bit unusual to craft a news entry with deeply technical stuff taken from project mailing lists. What is _NET_WM_STATE_FULLSCREEN_EXCLUSIVE? A flag in some protocol?
And then make sure that different versions of it cant coexist on the same system and cant run each others code. Perhaps change all the method calls every build.
"Have you ever thought about just turning off the TV, sitting down with your kids, and hitting them?"
This is exactly how some games work on Mac OS X, for instance Source-based games like Portal and Half-Life 2. They don't muck with the actual screen resolution, but just render into an offscreen buffer at whatever resolution ant blit it stretched to the full screen. Switching from the game back to other apps doesn't disturb the desktop in any way. Would definitely love to see more Linux games using this technique.
Chu vi parolas Vikipedion?
When a game starts, it wants the entire desktop, it doesn't want the other desktop elements at all, no dock, no icons, interaction, etc.
Why isn't there a function to create a new virtual desktop at any resolution you want and leave the other desktop untouched? So when you switch between them it knows to switch resolutions as well. Have the resolution tag part of the desktop, so when you switch between them it knows what to switch to.
Seems like an easy fix.
Linux is a serious OS, it shouldn't pander to those Windows-raised babies that use computers for trivial shit like gaming.
Quick solution? Strip 3D graphics HW support from all X11 drivers. Problem solved.
The only problem as far as I'm concerned is SDL's god-awful and inconsistent handling of input when in fullscreen mode.
They go out of their way use "raw input" methods which disable conveniences like alt-tab.
And if you're using SDL_ShowCursor(0) in fullscreen, woe onto you if you're using something like a tablet in a game like civilisation, as the cursor will be constantly offset by several thousand pixels each update. (I believe they blame the X guys, but this is SDL's fault, pure and simple)
And the first was an absolute pain in the ass a few years back too.
SDL_Mixer, thanks to racing condition bugs, happened to fuck with memory allocated to the NVIDIA driver and lock up various fullscreen applications too.
As a result, I've been conditioned to run everything windowed...
And Ryan Gordon, What the hell where you thinking by making your ports (like Aquaria) exhibit this exact same inane behaviour in windowed mode!?
This is one case where I'm with Martin and the Wayland guys, "fullscreen games" should render into an appropriately sized offscreen buffer which is then blit onto the screen. It's sweet, simple, has little overhead, and if you happen to still have a CRT, it even avoids the moire patterns with low resolutions.
captcha: evident
Force ALL games to run at 640x480 -- problem solved.
Except for those i386 Linux systems who are trying to run Half Life 2 .. perhaps we should lower that resolution to 320x240, just to guarantee we're not butting heads with the window manager. After all, the first goal of every Linux game designer should be to ensure the tail log window you're running is properly proportioned at all times.
I don't know if kids today remember, but Loki Games was one of the first commercial plays for big name games on Linux. Ended in tragic business troubles and financial doom.
It warms my heart to see that Sam Lantinga is still working on SDL.
That is all.
This is exactly the sort of case where Wayland should be used instead of patching around problems in X11 and/or window managers.
Yes, there are the huge amounts of servers where XWayland can still be used.
For many many users and use-cases X11 just needs to die, finally.
This works - but wastes both ram space and performance.
Get it fucking right.
Even Windows had it right by the time of XP SP1, when no game worth even pirating actually broke anything when changing resolution.
Ho comes Linux can't do that?
Yeah, I know some answers. Fuck those answers. I can install HackOSX on the same machine and it works even better even when it's not even supposed to.
That speaks of QUALITY.
Linux's state of hardware 3D support and everything that needs for it to Just Work Right fucking SUCKS, and that this article exists is a symptom of that. A band-aid on a wooden leg, a hack on top of a hack, and nothing works right anyway.
That's actually the one first reason I hate using Linux. One more datapoint in the graphs, but I know I'm not exceptional enough that I'm not in a statistically-significant place. Are YOU that arrogant? Do you deserve to?
Games shouldn't need to change resolutions in the first place. If the real unemasculated cards were sold at reasonable prices, everyone could play every current game at native resolution in the year they come out, and next ones at native res and lessened candy.
Lolno not gonna happen. It's not like I don't know it. But that's what we deserve for spending money on things. A graph card that can't display current games at native resolutions is a scam deserving of a class-action for damages beyond bankruptcy until one company (or some Open Design) gets it right.
Just so that we use tech the way it's designed to be used.
Making laws based on opinions that stem up from false informations leads to witch hunts.
I think....you guys have heard of the Windows 7 distro from Microsoft right?
As a hardcore gamer and extreme noob to linux...
I gotta say who the fuck knows what this means... it don't mean shit to me...
Sounds like linux is finally figuring out something that everyone else has had working since the early days of multitasking...
took 20 years to copy it eh?
I'm glad they have a fix for this issue but it isnt one exclusive to X11. Try loading a fullscreen game at an alternate resolution on a multi-screen desktop in windows and you will see the other screens get all messed up
http://interserver.net/
Switch to OS X or Windows and dump Linsux already.
Actually, I keep a Windows box to use for gaming. Linux works just fine for everything else.
(And would probably work just fine for gaming, if anyone would bother making games for it.)
Sheesh, evil *and* a jerk. -- Jade
Not sure what 'mess' is referred to in the title but I sidestepped the issues I met with Baldur's Gate by running it in its own X-server on a separate VT.
As I recall it just took a simple script to start the server and the game, and one extra command to make the mouse cursor less fugly. My main desktop remained completely undisturbed and just an Alt-F7 away. A little polish and this approach could be a good general solution, no?
Do you know by any chance what the performance hit is? The RAM hit isn't too bad, given that GPUs these days ship with 1GB or more, but I could see performance possibly being an issue in some circumstances.
Why hasn't Linux taken off yet on the mainstream desktop (er, laptop)? Why don't average folks want to run Linux yet? Isn't it ready for prime time?
This is a hacked account, for which the owner can not be held responsible.
>Linsux
Anyone who says this or "loonix" or a variation on this is just as bad as someone who spells Microsoft as Micro$oft and variations thereof.
--
BMO
Disclaimer: I had that habit but then I grew up.
...that make me realize I may not really belong here.
Your brain is not a computer.
One screen buffer takes up tiny fraction of the gpu memory, resizing it to 1080p at 60fps requires about 124 megapixel fillrate, 1/10 of what a playstation 2 was capable of.ten years ago.
Exceedingly little, though.
Modern games render to more than one off-screen buffers already (necessitated by HDR, deferred shading, and other fun things), only blitting and gamma-correcting the final bits to the screen's framebuffer at the very end.
The tiny amount of RAM occupied by the 8-bit framebuffer to accommodate a large screen resolution is dwarfed by these several framebuffers, some which will use 16-bit components.
The amount of GPU needed to draw a solid full-screen quad really is too trivial to care about.
Fullscreen mode is a concept that's all twisted and warped by what's come before. An application should never have to change the video card output resolution from the desktop. Hell even the embedded Intel chips can handle having stuff rendered to a surface at a lower resolution then composited to the desktop.
Isn't fullscreen mode just a relic from the days when we didn't have compositing window managers? Mouse pointer exclusivity should be handled separately and is something that mistakedly gets bundled in with the concept of a 'fullscreen mode resolution change'.
Use a window manager without this problem (ie. everything apart from gnome and kde) until they fix their window managers or this extension especially for them is added.
yeah because osx is just so awesome for gaming right?
Examples instead of future hopes please.
As a Linux Dabbler / Windows Gamer it does seem kind of silly that the X crowd doesn't embrace: A) The idea of change. B) The idea of the change helping to make Linux more popular. Why can't X support a module or a plugin or behavior switch along those lines that does what some people want AND still do what it has done all along? This could be added right into the config which then makes the choice at boot up. You get your cake and eat it too...althought this Wayland project sounds interesting as well. I just keep wondering: why can't X just add this functionality ontop of its core functionality with ability to swap methods prior to it starting up the display, sort of like how I can choose to use GNOME or I can choose to use KDE prior to logging in?
LCDs have one resolution, but the scaler between the video cable and the LCD has several resolutions. I'll grant that cheap monitors are more likely to have cheap looking scalers.
For the myriad of responses that brought up this point: the answer is video card hardware scaling.
And this is exactly the solution that the Xbox 360 uses. A lot of newer games are fill rate limited. Because of the complexity of the pixel shaders that games use, the AMD Xenos integrated GPU in the Xbox 360 (similar to a Radeon X1800) can't run it with an acceptable frame rate at any resolution over 1024x576. So games use the Xenos's scaler to turn 1024x576 into 1280x720 or 1920x1080 pixels for the component or HDMI output.
You should NEVER have to upscale images if you are doing things right.
Doing things right in real time is often cost prohibitive, as it'd need a newer, much more powerful GPU that the user may not already own. This is why a lot of Xbox 360 games run in 576p and upscale to 720p or 1080p as the system settings request.
Unless your game uses OpenGL and you have a fully accelerated driver (read: the proprietary Catalyst or nVidia blob), it will not be able to scale fast enough. Most games use SDL and main memory surfaces that are then blitted to the screen.
I thought "most games" made for PC and sold in 2012 either were 3D (and relied on OpenGL or DirectX) or were designed for Flash or HTML5. I thought user expectations were beyond the point where commercial games could still use SDL software rendering. Or by "most games" are you including hobbyist productions?
"Standard resolution" arcade games have 240p graphics that can be scaled up by a factor of four to look good on a 1080p monitor.
Do you mean DisplayPostScript from NeXT? Apple never used X11 for their primary display [on mainstream products]
The implication is that NeXT fixed X11 by replacing it with DPS, and Apple continued this by basing Quartz on the PDF data model.
Games are one roadblock to Linux adoption that went away on its own at least with regard to desktop Linux. If you aren't a gamer you don't care about high end games and if you are a gamer you don't game on the PC anymore. Gaming is all about the console these days.
Linux already runs on shipping laptops, albeit not necessarily GNU/Linux or X11/Linux. There are Android tablets with a clamshell keyboard (e.g. ASUS Transformer series), there are Android netbooks, and there are Chromebooks.
There are two exceptions.
"Micro$oft" is immature, but "M$" alludes to Microsoft's origins as a BASIC interpreter publisher and distinguishes it from the other MS. As the old joke goes, the difference between M$ and MS is that one is a debilitating and surprisingly widespread affliction that renders the sufferer barely able to perform the simplest task, and the other is a medical condition.
"Loonix" and "Linsux" are immature, but "LUnix" is an operating system for Commodore 64/128.
Don't you mean a Ctrl-Alt-F7 away? At least, that how I change between x-server windows on Debian...
Every X-user I know uses network transparency. And given your numbers and estimated number of people using X for their desktop, I apparently know every single network transparency using person in the world, and then some.
It is much more common than you think, apparently.
I feel compelled to keep parent honest. He failed to disclose that he is a member of an X11 network transparency religious order that has taken a vow of solitude and lives in a monastery on a Himalayan mountain top.
Other than that semi-tangential detail, what he said was absolutely true: he *does indeed* know every network transparency using person in the world (and then some)—they are the fellows of his order and their acolyte trainees.
I tried to switch to OSX, but it wouldn't boot on my system. Told me something about needing genuine Apple hardware.
I want to change the resolution and I will tell you why. On 32" monitor, I can't read the text unless it runs in 720P of even 800x600.
Actually, unless you have become totally inured to blocky, pixelated displays what you really want is for everything to be rendered larger.
Fortunately, many operating systems support resolution independence, which would allow you to keep your display at its high, native resolution and still draw your widgets, text, etc at a large size. This is done by changing the DPI hint in the OS so that it knows to render things larger (or smaller).
This approach would accomplish the overall effect you desire while avoiding the blocky scaling artifacts. As a bonus, changing the DPI typically gives you the ability to change the size of things at a much finer granularity than the handful of resolutions offered by a display, so you can often make things precisely the size you desire rather than having to settle (as it appears you have been forced to do with 720p vs 800x600).
I'm uncertain which GUI you're using, but if you Google for " change dpi" you may find that it's only a few clicks to tweak it.
When DEs like KDE and Gnome allowed you to specify through X11 the virtual viewport to be the screen size whilst the rendered (and partially off screen) "X11 desktop" was bigger (allowing, for example, 800x600 on a 15" moitor when your X11 session was pretending to run on 1280x1024), screen resize didn't screw up your desktop.
The DEs now DEMAND you use full screen and now they screw up your desktop if it gets resized.
The problem isn't X11.
It's the DEs.
I am TheRaven on Soylent News
It seems that you could benefit of "Cognitive Retention Therapy, a dementia treatment". ;)
What about MICROS~1?
SJW n. One who posts facts.
"X is a very old protocol": this is not a problem.
"Things like font rendering and 2d drawing routines." DirectDraw ring a bell?
"Things that nobody actually uses anymore." So they don't actually make the product worse. They just make writing it a bigger task. Since we already have it, not a problem.
"But X still has support for all the old stuff, and so it's huge and lumbering." How can code it isn't running make it huge and lumbering? And despite this, X11 with Compiz did 3D desktop better and with less resource use than Vista did. Proof that it isn't huge and cumbersom "by industry norms".
"Wayland is a new protocol designed..." You were asked why X11 was bad. Not why Wayland.
"One side effect of this is the Wayland library API is *much* simpler to use than the X libraries" Since there are plenty of window managers and you already say most of the "unused" code is "unused", therefore DOES NOT HAVE TO BE CALLED, how can binding to X11 with a WM be harder?
Smartphones and handhelds will want to use colour maps and indexed colours. STBs and so on as well. Linux is more than your gaming PC.
And the keyboard handling has allowed the same pogram to manage programmable keyboards, joysticks, non-haptic devices (e.g. remotes) and so on to work with it, all for the cost of being a little arcane. A fair compromise. If it were a commercial entity, they'd be able to pressure companies into writing their own UI for configuring program and the arcanity would be hidden from users.
That one is a valid criticism.
Long filename support on FAT file systems was a joke. I had one FAT filesystem literally blow up on me because Windows forgot how to string together the 8.3 filename kludge to make the long filenames.
File.001
File.002
File.003
Dir.001
Dir.002
Dir.003
And so on...
Try finding your data after this happens.
--
BMO
X needs to be replaced with something the way Linux replaced Unix. X is full of old solutions to old problems, loads of features and methods that nobody (or hardly anybody) uses, is far too complex. It's stuck with an architecture and components slavishly oriented to the client/server pattern rather than distributed peers and meshes of servers for shared AV on multiple devices of very different power that people actually use.Android ditched X. We should replace it even on Linux with Skia, adding a multi-window extension and a widget that allows both X and Skia to display simultaneously. Until nobody uses X anymore.
Make these windows into objects that can be easily collected into groups, pipe data among them, flick them among networked machines (including public screens). A new infrastructure for the new, ubiquitous AV presentation we're running on mobile parallel supercomputers.
--
make install -not war
windows had this issue fixed a long, long time ago. whilst windows was focused on usability, linux was focused on security. sure, what microsoft did made their OS less secure and what the linux community did made their OS more secure then one question is begging to be asked: was it worth it for either side?
X had half of a solution to this decades ago. It's called the Viewport. Remember back when you scrolled around your 1600x1280 desktop on your 800x600 monitor? Rather than simply changing the resolution of the display and saying fuck everything else that's running, the operation should be to set the viewport to the current resolution, then lock it to prevent it from scrolling away from the origin. Then you can decrease the display resolution without fucking up the desktop.
The other half, if you want to have an 800x600 desktop and game at 3200x5000 or something ridiculous, that's left as an exercise to the reader.
If I have been able to see further than others, it is because I bought a pair of binoculars.
The RAM hit isn't too bad, given that GPUs these days ship with 1GB or more
Sure, for desktops. What about laptops?
Rather than try to cram modern features into the creaky old pile of bloat that is X11, that ancient technology needs to be relegated to server-only usage, and replaced with something modern that can talk more closely to the hardware without going through half a dozen abstraction layers.
Yes, network transparency, I know. 99% of users don't give a shit, and just want things to display and animate smoothly – which X11 fails miserably at. Keep that on servers, where it matters, and drop it on desktops, where it doesn't. There is a reason why, when Google borrowed parts of Linux to make Android, they dropped the X11 layer without a second thought.
The desktop market is probably the last thing that Linux should be trying to succeed in.
Linux isn't really an OS. It's more like a box of parts for an OS. Some people have slick packages that have been put together that work pretty well, but you're going to get the most out of it if you have an interest in getting under the hood -- starting with installing it. For most people having to install an OS is a non-starter.
For "serious" computing this can be inescapable. It's also useful to embedded developers.
So tell me what's so compelling about the desktop market anyway? Users will hammer the developers ("Isn't it ready for prime time?") if the product isn't perfect in every way, and generally aren't interested in paying for support or even the OS itself. If you've read The Old New Thing, you may recall that they considered each product-support call to cost about the same as the sale price of the software. When people (mostly anti-Linux commentators these days) talk about how Linux should be a contender in the desktop market, I can only think of millions of complaints as vacuous as yours, or worse.
I believe that mass-market appeal and the ability to tinker with system internals are diametrically opposed. Android and iOS are the success stories of recent OS history: do note that these are single-user systems with extremely limited system configuration options. I haven't played much with Win8, but it seems like they're running in this direction as fast as they can.
The refrain seems to be "Linux has technical problem X which means it's not suitable for the desktop!" I would like to hear a compelling argument that [a] the technical perfection of an OS has anything to do with market share, and [b] that the desktop market is worth participating in.
Those who advocate genocide deserve every protection afforded by law, and none afforded by common human decency.
Actually, I'm not sure it does - how do you scale mouse input if you're just scaling the window to fill the display rather than changing the display resolution, for instance?
... my delicate compiz configuration or I will get mad and whine.
now we need to go OSS in diesel cars
the low end game of WOW with all the special effects on in a populated area will easilly use all of that 1GB and probably can now even use at least 2GB. I know 2 expansions ago people were running into the 4GB per 32 bit app memory limit.
All of the above was encrypted with a Quad ROT-13 method. Unauthorized decryption is in violation of the DMCA.
XInput2 provides the ability for the window manager to perform arbitrary coordinate transforms on user input, for precisely this reason (the use case was screen magnifiers, wanting to make a window larger and still have input work correctly).
I am TheRaven on Soylent News