Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

systemd-vconsole-setup service not run on boot

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
12 posts • Page 1 of 1
Author
Message
dc740
n00b
n00b
Posts: 14
Joined: Mon Jan 11, 2021 9:04 am

systemd-vconsole-setup service not run on boot

  • Quote

Post by dc740 » Mon Jan 11, 2021 9:14 am

Hi, I'm a first timer with gentoo. I got systemd working just fine reading the x86 handbook (this is a 32 bit system with 4GiB of ram and an ssd). The system was correctly taking the keyboard layout on boot, but it stopped after one reboot (I think after systemctl preset-all).
The profile is default/linux/x86/17.0/systemd

systemd-vconsole-setup status is inactive. I tried to reenable it, but the unit has no installation config. I did not edit this unit manually, and I did not change any other unit manually either. In fact, I'm using the system exactly as detailed in the Handbook.

I only installed the network manager (with iwd), but I did not get to the point of enabling it yet.

The keyboard layout is correctly loaded if I manually start the service:

Code: Select all

systemctl start --all systemd-vconsole-setup
Is this expected? did I miss something? I already reviewed the systemd wiki and found no details on this.
Top
alamahant
Advocate
Advocate
Posts: 4034
Joined: Sat Mar 23, 2019 12:12 pm

  • Quote

Post by alamahant » Mon Jan 11, 2021 11:22 am

This service is static.
Meaning it can NOT be enabled.
I think it is called by other services @boot.
Normally it should work out of the box.
Didi you use a systemd tarball or you just added systemd to openrc?
Have you seen this
https://wiki.gentoo.org/wiki/Keyboard_layout_switching
By the way if this was a new install you should have picked a 17.1 profile.
Furtermore since you are running a desktop you have 2 options
Either choose a desktop profile and add

Code: Select all

USE=".............-bindist systemd -elogind warmstarts -consolekit"
in make.conf
followed by a

Code: Select all

emerge -uDNav @world
OR
Just pick a systemd/desktop/gnome|kde profile.
and run the same above emerge.
Last edited by alamahant on Mon Jan 11, 2021 11:36 am, edited 2 times in total.
:)
Top
dc740
n00b
n00b
Posts: 14
Joined: Mon Jan 11, 2021 9:04 am

  • Quote

Post by dc740 » Mon Jan 11, 2021 11:30 am

I used a systemd stage3 tarball to create the system. (boot minimal installation cd, then follow the setup process with the systemd specific stage3 tarball)

I've seen that wiki too. vconsole.conf has the spanish keyboard defined. Running the service manually works fine (the "es" layout is correctly picked from the configuration) and then the service is shown as "active". If I don't run the service manually I see it "inactive", and the layout is set to "us" standard keyboard.

Regarding the other options, I'm not planning to add an X server at this point, so the console configuration is the only one needed.

Thank you
Top
alamahant
Advocate
Advocate
Posts: 4034
Joined: Sat Mar 23, 2019 12:12 pm

  • Quote

Post by alamahant » Mon Jan 11, 2021 11:35 am

Ah sorry..
I mistakenly thought you were running a graphical environment.
Plz forgive me.
:)
Top
dc740
n00b
n00b
Posts: 14
Joined: Mon Jan 11, 2021 9:04 am

  • Quote

Post by dc740 » Mon Jan 11, 2021 12:10 pm

No problem. Do you happen to know where can I check which service actually should call the vconsole-setup?


PS: Looks like 17.1 is not available for X86. stage 3 is only 1 week old, and 17.1 is not shown in the profile list. Even after running emaint -a sync
Top
alamahant
Advocate
Advocate
Posts: 4034
Joined: Sat Mar 23, 2019 12:12 pm

  • Quote

Post by alamahant » Mon Jan 11, 2021 12:24 pm

I run

Code: Select all

grep -r vconsole-setup /lib/systemd/system
and I got

Code: Select all

/mnt/lib/systemd/system/systemd-vconsole-setup.service:Documentation=man:systemd-vconsole-setup.service(8) man:vconsole.conf(5)
/mnt/lib/systemd/system/systemd-vconsole-setup.service:ExecStart=/lib/systemd/systemd-vconsole-setup
/mnt/lib/systemd/system/systemd-ask-password-console.service:After=plymouth-start.service systemd-vconsole-setup.service

Try running also
man 5 vconsole.conf
man 8 systemd-vconsole-setup.service
You might get some answers there.
:)
Top
dc740
n00b
n00b
Posts: 14
Joined: Mon Jan 11, 2021 9:04 am

  • Quote

Post by dc740 » Mon Jan 11, 2021 4:52 pm

well... now I'm even more confused than before.

It's supposed to be triggered by udev with new consoles, and by localed when using localectl set-keymap.

I double checked, and localedctl set-keymap starts the service systemd-localed.service succesfully (I can see the logs journalctl) but it doesn't call systemd-vconsole-setup.service: there are no logs for this service and systemctl it shows it's inactive (dead). If you start it you can find "Starting Setup Virtual Console" and "Finished Setup Virtual Console".

both vconsole.conf and locale.conf are present in /etc. And are correctly picked up:

Code: Select all

#localectl
System Locale: LANG=C.UTF8
VC Keymap: es
X11 Layout: es
Calling the service manually does the trick, but it does not happen automatically. I ran grep -r on /lib/systemd/system and the output is exactly the same as yours.
calling "localectl set-keymap es" should call it, and it's not doing it... but I have no logs to debug the problem. I don't know where else to look.

systemctl --failed
shows 0 units.
Top
peterbye
n00b
n00b
Posts: 24
Joined: Wed Apr 28, 2004 11:21 pm
Location: UK

  • Quote

Post by peterbye » Tue Mar 09, 2021 5:14 pm

[solved] - see next post
I have exactly this issue, did anyone find a solution?

According to everything I've read, systemd-vconsole-setup should be run at startup by systemd-udevd, which is running:

Code: Select all

[root]~# systemctl status systemd-udevd
● systemd-udevd.service - Rule-based Manager for Device Events and Files
     Loaded: loaded (/lib/systemd/system/systemd-udevd.service; static)
     Active: active (running) since Tue 2021-03-09 16:49:04 GMT; 45s ago
TriggeredBy: ● systemd-udevd-control.socket
             ● systemd-udevd-kernel.socket
       Docs: man:systemd-udevd.service(8)
             man:udev(7)
   Main PID: 1442 (systemd-udevd)
     Status: "Processing with 20 children at max"
        CPU: 2.068s
     CGroup: /system.slice/systemd-udevd.service
             └─1442 /lib/systemd/systemd-udevd
but systemd-vconsole-setup hasn't been run, my console keyboard is not set to uk

Code: Select all

[root]~# systemctl status systemd-vconsole-setup
● systemd-vconsole-setup.service - Setup Virtual Console
     Loaded: loaded (/lib/systemd/system/systemd-vconsole-setup.service; static)
     Active: inactive (dead)
       Docs: man:systemd-vconsole-setup.service(8)
             man:vconsole.conf(5)
After running it manually with systemctl start systemd-vconsole-setup all is good:

Code: Select all

[root]~# systemctl status systemd-vconsole-setup
● systemd-vconsole-setup.service - Setup Virtual Console
     Loaded: loaded (/lib/systemd/system/systemd-vconsole-setup.service; static)
     Active: active (exited) since Tue 2021-03-09 16:50:29 GMT; 6s ago
       Docs: man:systemd-vconsole-setup.service(8)
             man:vconsole.conf(5)
    Process: 1722 ExecStart=/lib/systemd/systemd-vconsole-setup (code=exited, status=0/SUCCESS)
   Main PID: 1722 (code=exited, status=0/SUCCESS)
        CPU: 22ms

Mar 09 16:50:29 meerkat systemd[1]: Starting Setup Virtual Console...
Mar 09 16:50:29 meerkat systemd[1]: Finished Setup Virtual Console.
What's the best/correct way to have systemd-vconsole-setup run at startup?
Top
peterbye
n00b
n00b
Posts: 24
Joined: Wed Apr 28, 2004 11:21 pm
Location: UK

  • Quote

Post by peterbye » Tue Mar 09, 2021 6:06 pm

Putting systemd-udevd into debug shows this in the journal:

systemd-udevd[1462]: vtcon1: '/lib/systemd/systemd-vconsole-setup'(err) 'gzip: error while loading shared libraries: cannot make segment writable for relocation: Operation not permitted'


So the issue is that gzip is unable to unpack the keymap at this time.
Solution for now is to manually gunzip /usr/share/keymaps/i386/qwerty/uk.map.gz after which the keymap is loaded correctly at boot time.

Couple of references:
https://bbs.archlinux32.org/viewtopic.php?id=2953
https://bbs.archlinux32.org/viewtopic.php?id=506
Top
peterbye
n00b
n00b
Posts: 24
Joined: Wed Apr 28, 2004 11:21 pm
Location: UK

  • Quote

Post by peterbye » Tue Mar 09, 2021 6:22 pm

Final word on this - a better solution

- put back the gzipped keymap

- in /etc/portage/package.use add:
app-arch/gzip static

- emerge --oneshot gzip

Now udevd is able to unzip the keymap at boot time without the shared library loading issue
Top
Hu
Administrator
Administrator
Posts: 24403
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Tue Mar 09, 2021 9:13 pm

Nonstatic gzip should work fine for this, if the required shared libraries are available.
Top
DeIM
Guru
Guru
User avatar
Posts: 465
Joined: Tue Apr 11, 2006 7:03 pm

  • Quote

Post by DeIM » Thu Aug 18, 2022 3:34 pm

I can confirm gzip with +static solves problem on x86 laptop without initrd (manual start of systemd-vconsole-setup worked even before)
On x64 PC gzip with -static works. initrd here is present.

May be the source of problem absence of initrd?

How did you put service to debug mode? I can't figure it out. Thanks
Top
Post Reply

12 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic