Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x11failsafe - deprecated? #554

Closed
magist3r opened this issue Nov 28, 2017 · 21 comments
Closed

x11failsafe - deprecated? #554

magist3r opened this issue Nov 28, 2017 · 21 comments
Assignees

Comments

@magist3r
Copy link

I see 'x11failsafe' and 'nomodeset' in failsafe_kernel_options. By the way I can't boot my image with any of these options (X doesn't start at all). I think these options are deprecated and need to be removed. Thoughts?

@schaefi
Copy link
Collaborator

schaefi commented Nov 29, 2017

Let's ask the X experts

I'll drop Stefan Dirsch a note

@schaefi schaefi self-assigned this Nov 29, 2017
@sndirsch
Copy link

Just verified, that YaST2 still writes /etc/X11/xorg.conf.install (the assumably working X configuration during install) during installation of our currently developed enterprise product (i.e. sle15), based on Tumbleweed. So "x11failsafe" still makes sense on regular installations (at least if you still use xdm; seems to be ignored by gdm e.g.). Of course this may not apply to image installations not using YaST for installation at all. 'nomodeset' still disables KMS support, so X falls back to fbdev X driver, which should be even more safe to use than 'modeset' X driver on top of KMS.

@sndirsch
Copy link

@magist3r I need to know, why X fails to start with these options. Could you attach /var/log/Xorg.0.log, please when using xdm as display manager?

@magist3r
Copy link
Author

magist3r commented Dec 1, 2017

I can run X using startx command btw after login to console.
@schaefi could you provide some minimal graphical kiwi config with xdm to test it?

@magist3r
Copy link
Author

magist3r commented Dec 1, 2017

Ok, looks like I found the root of the problem:

● display-manager.service - X Display Manager
Loaded: loaded (/usr/lib/systemd/system/display-manager.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2017-12-01 22:23:04 EST; 1min 25s ago
Process: 6293 ExecStart=/usr/lib/X11/display-manager start (code=exited, status=6)

Dec 01 22:23:03 linux display-manager[6293]: KEYTABLE: us
Dec 01 22:23:03 linux display-manager[6293]: Command: localectl set-keymap us
Dec 01 22:23:04 linux display-manager[6293]: I: Using systemd /usr/share/systemd/kbd-model-map mapping
Dec 01 22:23:04 linux display-manager[6293]: Starting service sddm
Dec 01 22:23:04 linux display-manager[6293]: The failsafe X.Org configuration /etc/X11/xorg.conf.install no longer exists.
Dec 01 22:23:04 linux display-manager[6293]: Either move it back (if still available) or copy /etc/X11/xorg.conf to
Dec 01 22:23:04 linux display-manager[6293]: /etc/X11/xorg.conf.install to use the native graphics driver instead of the
Dec 01 22:23:04 linux display-manager[6293]: failsafe graphics driver. Of course the latter option no longer can be called
Dec 01 22:23:04 linux display-manager[6293]: failsafe.
Dec 01 22:23:04 linux display-manager[6293]: ..unused

nomodeset option works as expected.

@magist3r magist3r changed the title x11failsafe and nomodeset - deprecated? x11failsafe - deprecated? Dec 1, 2017
@sndirsch
Copy link

sndirsch commented Dec 2, 2017

That's exactly the behaviour as designed. Bailout in failsafe mode, if no safe X configuration exists.
Check /usr/lib/X11/display-manager. Linux console looks more failsafe to me than a possibly freezing Xserver during startup.

@magist3r
Copy link
Author

magist3r commented Dec 3, 2017

Ok. Where this file comes from? It is created during installation process?
I think that I can simply copy this file from my system (Leap 42.3) to image description to solve this issue.

@sndirsch
Copy link

sndirsch commented Dec 4, 2017

Yes, the file is created during a regular YaST2 installation process, but this may not apply to your image installation. Yes, you can copy it from your Leap 42.3 system. I noticed, that the error message is no longer correct. There is no xorg.conf any longer (completely replaced by xorg.conf.d snippets). I will adjust this.

@magist3r
Copy link
Author

magist3r commented Dec 4, 2017

Ok.
@schaefi maybe add /etc/X11/xorg.conf.install to generic image descriptions to provide graphical failsafe login? And mention it in doc?

@schaefi
Copy link
Collaborator

schaefi commented Dec 4, 2017

@magist3r /etc/X11/xorg.conf.install is not owned by any package and created from the YaST startup code afaik. So there is no reliable source for this file and we could only go and add a static overlay file which will probably be out of sync with what yast creates very soon.

I'm more open to delete the use of x11failsafe by kiwi and leave it up to the author of the image description to add that option in its image description when needed which also implies that a file /etc/X11/xorg.conf.install needs to be provided along with the image description.

In a suse specific documentation section it would also be possible to document the use and requirements of x11failsafe

nomodeset seems to be used by the kernel, thus I expect this to be generically valid and could stay as part of kiwi's standard failsafe boot

Thoughts ?

@sndirsch
Copy link

sndirsch commented Dec 4, 2017

Correct, xorg.conf.install is being created on-the-fly by YaST2 during installation, so kiwi repackaging it won't fly. And, if it's not being used during installation, we simply cannot assume it is safe anyway! So there's no point in providing it.
IMO if we no longer can start a safe Xsession, we should no longer try to start X at all in failsafe mode. So replace "x11failsafe" with "3", i.e. start in runlevel 3 without X. This should also prevent Wayland sessions trying to be started, that may also suffer from graphics driver issues.

@sndirsch
Copy link

sndirsch commented Dec 4, 2017

And yes, nomodeset definitely still makes sense, since KMS can break Linux console from the beginning, not only X/Wayland.

@magist3r
Copy link
Author

magist3r commented Dec 4, 2017

I'm more open to delete the use of x11failsafe by kiwi and leave it up to the author of the image description to add that option in its image description when needed which also implies that a file /etc/X11/xorg.conf.install needs to be provided along with the image description.

This is the best option I think.

@sndirsch
Copy link

sndirsch commented Dec 4, 2017

Then what's still left in "failsafe_kernel_options"?

@schaefi
Copy link
Collaborator

schaefi commented Dec 4, 2017

This is the current list:

@classmethod
    def get_failsafe_kernel_options(self):
        """
        Failsafe boot kernel options

        :return: kernel options list
        :rtype: list
        """
        return ' '.join(
            [
                'ide=nodma',
                'apm=off',
                'noresume',
                'edd=off',
                'powersaved=off',
                'nohz=off',
                'highres=off',
                'processor.max+cstate=1',
                'nomodeset',
                'x11failsafe'
            ]
        )

If we agree on the solution I would delete x11failsafe from the list

Does the rest still makes sense from your point of view ?

Keep in mind this list is rather old and has been inherited from the former kiwi version

Thanks for your feedback

@sndirsch
Copy link

sndirsch commented Dec 4, 2017

Well, I disagree. I would replace "x11failsafe" with "3" (i.e. runlevel 3 without X). Reason I've given before. I guess many of the other options are meanwhile outdated/irrelevant/ignored or even should no longer been used. I suggest to ask on our internal 'research' or 'kernel' ML or external opensuse-factory list for help. Or you can try to figure out yourself by investing hours of research ...

@schaefi
Copy link
Collaborator

schaefi commented Dec 4, 2017

Hmm, why do you think "failsafe kernel options" == "No X11" I think that's not what a customer would expect. I think failsafe boot means "less performance but failsafe". Correct me when I'm wrong but switching off kernel modesetting still means I can have X or is that wrong ?

The setup of the runlevel is in the hand of the one who designs the image, I think forcing a runlevel would be the wrong way to go unless the other kernel options really cause that

I guess many of the other options are meanwhile outdated/irrelevant/ignored or even should no >longer been used

I'll check our official product iso and see which options are used here

@sndirsch
Copy link

sndirsch commented Dec 4, 2017

Well, with no xorg.conf.install available we don't have a failsafe X configuration. So if the graphics driver is the issue, and my guess is that in most cases this is the reason to boot into failsafe, we gain exactly nothing with this failsafe kernel boot entry. Of course you can tell then the customer to add "3" in addition. OTOH with nomodeset we disable KMS and most drivers meanwhile require KMS, so we see as fallback driver either fbdev or vesa (if framebuffer has been disabled as well). And these drivers hopefully will just work.

@schaefi
Copy link
Collaborator

schaefi commented Dec 5, 2017

ok so failsafe in fact means no X. Thanks I'll adapt the list and also set the runlevel as you suggested

@schaefi schaefi removed the Question label Dec 5, 2017
@sndirsch
Copy link

sndirsch commented Dec 5, 2017

Thanks!

schaefi added a commit that referenced this issue Dec 5, 2017
Delete obsolete parameters and make sure a failsafe boot
does boot into runlevel 3. This Fixes #554
@schaefi
Copy link
Collaborator

schaefi commented Dec 5, 2017

@sndirsch could you take a short look on the pull request ? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants