Bug 802189 - /etc/ini.d/kbd is not invoked at boot time
Summary: /etc/ini.d/kbd is not invoked at boot time
Status: RESOLVED DUPLICATE of bug 780516
Alias: None
Product: openSUSE 12.2
Classification: openSUSE
Component: Installation (show other bugs)
Version: Final
Hardware: i586 openSUSE 12.3
: P4 - Low : Normal (vote)
Target Milestone: ---
Assignee: Stanislav Brabec
QA Contact: Jiri Srain
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-05 16:31 UTC by Forgotten User PMIZxl2pGW
Modified: 2014-09-23 13:15 UTC (History)
4 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Forgotten User PMIZxl2pGW 2013-02-05 16:31:22 UTC
User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:18.0) Gecko/20100101 Firefox/18.0

After I have changed openSUSE-11.4 to 12.2 I've found that
in/etc/sysconfig/console registered consolefonts are not accepted.
Obviously the /etc/init.d/kbd is not been called.

cd/etc/init.d/ and here ./kbd start works.
   	
Tried this with PC (desktop) and laptop

It seems to be a bug to me.

No solutions in other forums.

Reproducible: Always

Steps to Reproduce:
1.booting to kde login
2.Strg+Alt F2
3.now in tty2
4.no selected consolefont is to be seen.

Actual Results:  
In /etc/sysconfig/console selected consolefont is in ttyX not to bee seen.

Expected Results:  
ttyX appeare NOT in selected consolefont

Selected as an example
/usr/share/kbd/consolefonts/suse12x22.psfu.gz
Comment 1 Forgotten User PMIZxl2pGW 2013-02-05 17:40:31 UTC
Sorry, my mistake:

Expected Results:
ttyX do appear of course in the chosen console-font,
I expect.
Comment 2 Forgotten User PMIZxl2pGW 2013-02-05 21:48:53 UTC
Sorry, my mistake:

Expected Results:
ttyX do appear of course in the chosen console-font,
I expect.
Comment 3 Stanislav Brabec 2013-04-02 16:08:20 UTC
Not calling /etc/init.d/kbd is an intentional behavior in systems with systemd. Systemd has its own implementation of kbd setup.

Well, support for console font setup in /etc/sysconfig/console is not probably implemented there. I'll look whether systemd has its own implementation or if it lacks this feature at all.
Comment 4 Stanislav Brabec 2013-04-03 17:42:07 UTC
Confirming the problem.

Font is not set after boot. One has to call e. g. unicode_start to set the font.
Comment 5 Stanislav Brabec 2013-04-03 18:17:17 UTC
Well, I see two problems here:

1) /usr/lib/systemd/systemd-vconsole-setup apparently calls (in my setup)
/bin/setfont -C /dev/tty0 suse12x22.psfu -m 8859-2
It should set (and in a context of a manual call it sets) the font. But in the context of the boot it does nothing.

2) Even if  /usr/lib/systemd/systemd-vconsole-setup is called by hand, it sets the font only for tty0 and not for other virtual consoles. unicode_start sets the font in all consoles.

Maybe related to this problem: bug 750326
Comment 6 Stanislav Brabec 2013-04-04 15:00:14 UTC
Looking at the setfont strace logs, I see:

Boot:
335   open("/dev/tty0", O_RDWR)         = 3
335   ioctl(3, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS,
{B38400 opost -isig -icanon -echo ...}) = 0
335   ioctl(3, KDGKBTYPE, 0x7fffdf79f42f) = 0
335   ioctl(3, KDGETMODE, 0x7fffdf79f4b4) = 0
335   close(3)                          = 0
335   exit_group(0)                     = ?

Called manually:
3095  open("/dev/tty0", O_RDWR)         = 3
3095  ioctl(3, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS,
{B38400 -opost -isig -icanon -echo ...}) = 0
3095  ioctl(3, KDGKBTYPE, 0x7fff5a60c87f) = 0
3095  ioctl(3, KDGETMODE, 0x7fff5a60c904) = 0
3095  open("8859-2", O_RDONLY)          = -1 ENOENT (No such file or directory)
3095  openat(AT_FDCWD, ".", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 7
...


The place, where the behavior starts to differ seems to be appareantly here:

kbd-1.15.5/src/setfont.c:193

    if (!ioctl(fd, KDGETMODE, &kd_mode) && (kd_mode == KD_GRAPHICS))
      {
        /*
         * PIO_FONT will fail on a console which is in foreground and in
KD_GRAPHICS mode.
         * 2005-03-03, jw@suse.de.
         */
        if (verbose)
          printf("setfont: graphics console %s skipped\n", console?console:"");
        close(fd);
        return 0;
      }


This behavior has a simple reason: During boot, the console displays splash screen => it is in graphics mode => skip the rest of setfont.

There is an easy work-around: Press F2 in the early stage of boot to turn off the splash screen, and setfont will succeed.

Font will change then. But not in the way I would expect:
- Boot progress screen (probably tty0) changes font.
- tty2 and up change font.
- tty1 does not change font and remains in the default font.
Comment 7 Frederic Crozat 2013-04-08 11:19:04 UTC
Hmm, plymouth upstream has added a dependency to ensure systemd-vconsole-setup.service is started before showing the splash.

However, since we don't ship systemd-vconsole-setup in the initrd, it might be a problem until we switch to dracut (in 13.1, hopefully)..
Comment 8 Petr Gajdos 2014-08-21 14:49:08 UTC
I can still reproduce problem and I cannot workaround it as Standa suggests by pressing F2 nor setting by 'nomodeset nosplash plymouth.enable=0' kernel parameters.

How to easy reproduce: set font in the /etc/sysconfig/console to, say, CONSOLE_FONT="r.fnt" and reboot. Switch to tty and run systemctl restart systemd-vconsole-setup manually to see the difference.

Seting FONT="r.fnt" in /etc/vconsole.conf doesn't work same way except that, if set, it has higher priority than /etc/sysconfig/console setting.

Werner, would you have any hint?
Comment 10 Dr. Werner Fink 2014-08-21 15:00:57 UTC
/etc/ini.d/kbd is not used with systemd, thereore the subject is wrong or the wrong bug is used.  Beside this, if plymouth is running any change for the virtual consoles are lost.  Therefor systemd-vconsole-setup.service has to done before plymouth is started ... or afterwards.

And if you change /etc/sysconfig/console you might run mkinitrd afterwards or your change will never ever executed in the initrd as here the plymouth part is done.
Comment 11 Petr Gajdos 2014-08-22 06:08:16 UTC
(In reply to comment #10)
> /etc/ini.d/kbd is not used with systemd, thereore the subject is wrong or the

Yeah, but that's apparent from comment 3 yet. Subject should be something like 'systemd inegration broke console font setting'?

> wrong bug is used.  Beside this, if plymouth is running any change for the
> virtual consoles are lost.  Therefor systemd-vconsole-setup.service has to done
> before plymouth is started ... or afterwards.

Even if I set plymouth.enable=0 (comment 8)?
Comment 12 Dr. Werner Fink 2014-08-22 09:33:26 UTC
(In reply to comment #11)

If you have a bug for SLES-12 then please open a bug for SLES-12 and our systemd-210 with current setup.

Before doing this check if dracut has included enabled ystemd-vconsole-setup.service  together with /etc/sysconfig/console and /etc/vconsole.conf in initrd *and* if you change the FONT you have to have run mkintrd/dracut to let initrd/dracut know about.
Comment 13 Dr. Werner Fink 2014-08-22 12:12:11 UTC
Also the font its self should be included in the initrd
Comment 14 Petr Gajdos 2014-09-23 13:15:43 UTC
This seems not to be bug against kbd -> don't assign to Stanislav. Marking as duplicate of bug with same symptoms.

*** This bug has been marked as a duplicate of bug 780516 ***