From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on sa.local.altlinux.org X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_00, DNS_FROM_AHBL_RHSBL, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=hZyiYx9t28Za2qme9Bq9k/aRzfGgQ+HPy2GMIKI9fnE=; b=APnAGT8U4xlaAmnhEw8c8rLBpXumaWyD1TWtTR1Jz3Vi4OrwtLyPcu7t8FRazxptVu dj5HHFkNWYXDWGSU1fIHziQvDKspuSt9Yzw2RtaKwgMgEm38FgJeqdpvqHwgMPyl36Jk IQsdORAqSBrHBjfCaWta8MbNWVbGWdHCbCo2ROb1PcyNXbcJAs3vMwmD920Ku8chv3ZE Agpa0yn7acRJM/baOcDQ+XnFyvNBZ6I8PPWzBRAAILabr6Ff5alWUdSVCCaUxFxViWNF aQlUC/H2HYtZzYBGlnMMe7idjKcAENUGH1OYW2WyfAZb8deX8YCacaN2nVlJsglX284Y E63g== X-Gm-Message-State: ALoCoQlikAWU/J1ZY7YYlWhPshO4tUQljsc/dshWkjUeUPEQYBjeg7efwepWFdU7PbMjEBxJXxx5 X-Received: by 10.112.162.232 with SMTP id yd8mr10982641lbb.41.1427924355566; Wed, 01 Apr 2015 14:39:15 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <20150123021329.GF2702@gardel-login> From: Andy Lutomirski Date: Wed, 1 Apr 2015 14:38:55 -0700 Message-ID: To: Kay Sievers Content-Type: text/plain; charset=UTF-8 X-Mailman-Approved-At: Thu, 02 Apr 2015 00:49:07 +0300 Cc: systemd Mailing List , Lennart Poettering , kbd@lists.altlinux.org Subject: Re: [kbd] [systemd-devel] systemd-vconsole-setup fails very slowly X-BeenThere: kbd@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: Linux console tools development discussion List-Id: Linux console tools development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2015 21:39:17 -0000 Archived-At: List-Archive: On Wed, Apr 1, 2015 at 2:36 PM, Kay Sievers wrote: > On Wed, Apr 1, 2015 at 11:19 PM, Andy Lutomirski wrote: >> On Wed, Apr 1, 2015 at 1:53 PM, Kay Sievers wrote: >>> On Wed, Apr 1, 2015 at 10:45 PM, Andy Lutomirski wrote: >>>> On Apr 1, 2015 12:56 PM, "Kay Sievers" wrote: >>> >>>>> Do you have an idea why the VM does not accept the custom font? If >>>>> that is something obvious, and we can detect it, we could make >>>>> vconsole-setup check for it. But then again, fixing setfont seems like >>>>> the obvious fix here. >>>> >>>> I assume it's because the VM has no graphical console at all. >>> >>> We check the existence of the corresponding /dev/vcs%i, to check if >>> the tty is allocated where we want to apply the font to. Do these >>> devices exist on the running machine? >> >> Yes: >> >> # ls /dev/vcs* >> /dev/vcs /dev/vcs2 /dev/vcs4 /dev/vcsa1 /dev/vcsa3 >> /dev/vcs1 /dev/vcs3 /dev/vcsa /dev/vcsa2 /dev/vcsa4 >> >> Looking at the code, the vc_screen.c code seems to create those >> devices unconditionally. > > They should only get created when something accesses the corresponding > tty. deallocvt(1) can kill unused ones and the device nodes should > disappear. > deallocvt doesn't seem to kill those device nodes for me. >>> And what does this say? >>> grep . /sys/class/tty/tty0/active /sys/class/tty/console/active >> >> # grep . /sys/class/tty/tty0/active /sys/class/tty/console/active >> /sys/class/tty/tty0/active:tty1 >> /sys/class/tty/console/active:ttyS0 >> >> vcs1 has, roughly: >> >> early console in decompress_kernel >> Decompressing Linux... Parsing ELF... done. >> Booting the kernel. >> >> Now I'm wondering how that buffer came to be. >> >> In any event, some tracing of the code suggests that I have >> vga_video_type == VIDEO_TYPE_CGA, and that fails "if (vga_video_type < >> VIDEO_TYPE_EGAM)" in vgacon_font_set. >> >> Indeed, /proc/ioports has: >> >> 03d4-03d5 : cga >> >> and dmesg says: >> >> [ 0.000000] Console: colour *CGA 80x25 >> >> I don't see this information in sysfs anywhere. Perhaps checking for >> an active console and detecting -EINVAL from vgacon_font_get would >> work. > > Hmm, yeah, maybe we could try one of the font-related ioctls to find > out if the driver supports that before we spawn setfont. > >> /proc/fb is empty on this VM, so maybe that would help. Grr, this >> stuff is really old and crufty. >> >> The offending qemu command line args appear to be -vga none -display >> none. I assume I have "CGA" because it's the fallback case in >> vgacon.c if nothing matches. > > Hehe, blast from the past. :) If you give kvm a VGA device, it all works fine? I just tried it. setfont succeeds, and the VGA device matches /dev/vcs's contents. --Andy