当显示器退出省电模式时桌面无法恢复

当显示器退出省电模式时桌面无法恢复

不确定这是一个错误还是内存不足的问题。

当我使用 从 18.04 LTS 就地升级到 20.04 LTS 时,我就开始注意到这一点do-release-upgrade。偶尔(每周 1-2 次)当我的计算机处于开机状态但显示器处于省电模式时,当我按下键或移动鼠标时,桌面不会完全恢复。显示器将唤醒,我将有一个可以移动的光标,但除此之外屏幕是黑色的。计算机继续在后台运行,我可以切换到其他控制台,但我永远无法恢复我的图形会话。我要么重新启动计算机,要么重新启动 systemd-login。我没有在 syslog 中看到任何异常,但 dmesg 显示以下内容:

[326169.817658] fbcon: Taking over console
[326169.820900] kworker/0:1: page allocation failure: order:4, mode:0x140dc0(GFP_USER|__GFP_COMP|__GFP_ZERO), nodemask=(null),cpuset=/,mems_allowed=0
[326169.820909] CPU: 0 PID: 94980 Comm: kworker/0:1 Not tainted 5.4.0-54-generic #60-Ubuntu
[326169.820910] Hardware name: Hewlett-Packard HP EliteBook 8460p/161C, BIOS 68SCF Ver. F.22 12/22/2011
[326169.820915] Workqueue: events fbcon_register_existing_fbs
[326169.820917] Call Trace:
[326169.820925]  dump_stack+0x6d/0x9a
[326169.820930]  warn_alloc.cold+0x7b/0xdf
[326169.820934]  __alloc_pages_slowpath+0xe07/0xe50
[326169.820937]  ? ep_poll_callback+0x29d/0x2c0
[326169.820940]  ? get_page_from_freelist+0x233/0x390
[326169.820943]  __alloc_pages_nodemask+0x2d0/0x320
[326169.820946]  alloc_pages_current+0x87/0xe0
[326169.820949]  kmalloc_order+0x1f/0x80
[326169.820951]  kmalloc_order_trace+0x24/0xa0
[326169.820953]  __kmalloc+0x220/0x280
[326169.820957]  kzalloc+0xf/0x20
[326169.820959]  vc_do_resize+0xd1/0x610
[326169.820962]  ? kobject_uevent_env+0x124/0x7c0
[326169.820964]  ? fb_match_mode+0x2c/0xa0
[326169.820967]  vc_resize+0x1f/0x30
[326169.820968]  fbcon_init+0x503/0x5e0
[326169.820971]  visual_init+0xd5/0x130
[326169.820974]  do_bind_con_driver+0x1bc/0x2b0
[326169.820976]  do_take_over_console+0x12f/0x1a0
[326169.820979]  do_fbcon_takeover+0x5c/0xb0
[326169.820981]  fbcon_fb_registered+0xf4/0x100
[326169.820982]  fbcon_register_existing_fbs+0x23/0x40
[326169.820985]  process_one_work+0x1eb/0x3b0
[326169.820987]  worker_thread+0x4d/0x400
[326169.820990]  kthread+0x104/0x140
[326169.820991]  ? process_one_work+0x3b0/0x3b0
[326169.820993]  ? kthread_park+0x90/0x90
[326169.820997]  ret_from_fork+0x35/0x40
[326169.820999] Mem-Info:
[326169.821004] active_anon:534408 inactive_anon:166320 isolated_anon:0
                 active_file:63417 inactive_file:70031 isolated_file:0
                 unevictable:5215 dirty:196 writeback:0 unstable:0
                 slab_reclaimable:26838 slab_unreclaimable:52959
                 mapped:128701 shmem:131742 pagetables:13606 bounce:0
                 free:28961 free_pcp:0 free_cma:0
[326169.821008] Node 0 active_anon:2137632kB inactive_anon:665280kB active_file:253668kB inactive_file:280124kB unevictable:20860kB isolated(anon):0kB isolated(file):0kB mapped:514804kB dirty:784kB writeback:0kB shmem:526968kB shmem_thp: 0kB shmem_pmdmapped: 0kB anon_thp: 0kB writeback_tmp:0kB unstable:0kB all_unreclaimable? no
[326169.821009] Node 0 DMA free:15344kB min:264kB low:328kB high:392kB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:15988kB managed:15360kB mlocked:0kB kernel_stack:0kB pagetables:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB
[326169.821013] lowmem_reserve[]: 0 2854 3773 3773 3773
[326169.821016] Node 0 DMA32 free:78196kB min:50908kB low:63632kB high:76356kB active_anon:1665684kB inactive_anon:546600kB active_file:202336kB inactive_file:230784kB unevictable:15288kB writepending:116kB present:3070712kB managed:2980328kB mlocked:16kB kernel_stack:15600kB pagetables:40116kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB
[326169.821020] lowmem_reserve[]: 0 0 919 919 919
[326169.821022] Node 0 Normal free:22304kB min:16404kB low:20504kB high:24604kB active_anon:472064kB inactive_anon:118272kB active_file:50560kB inactive_file:49516kB unevictable:5572kB writepending:200kB present:1015808kB managed:941776kB mlocked:16kB kernel_stack:6320kB pagetables:14308kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB
[326169.821027] lowmem_reserve[]: 0 0 0 0 0
[326169.821029] Node 0 DMA: 0*4kB 0*8kB 1*16kB (U) 1*32kB (U) 1*64kB (U) 1*128kB (U) 1*256kB (U) 1*512kB (U) 0*1024kB 1*2048kB (M) 3*4096kB (M) = 15344kB
[326169.821038] Node 0 DMA32: 7146*4kB (UME) 3669*8kB (UME) 1122*16kB (UME) 96*32kB (UME) 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 78960kB
[326169.821045] Node 0 Normal: 1026*4kB (UME) 1727*8kB (UME) 231*16kB (UEH) 9*32kB (UEH) 0*64kB 1*128kB (H) 0*256kB 0*512kB 1*1024kB (H) 0*2048kB 0*4096kB = 23056kB
[326169.821056] Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB
[326169.821056] 326515 total pagecache pages
[326169.821059] 61300 pages in swap cache
[326169.821060] Swap cache stats: add 5051616, delete 4990506, find 6418224/7774758
[326169.821061] Free swap  = 5812320kB
[326169.821062] Total swap = 8290300kB
[326169.821062] 1025627 pages RAM
[326169.821063] 0 pages HighMem/MovableOnly
[326169.821063] 41261 pages reserved
[326169.821064] 0 pages cma reserved
[326169.821065] 0 pages hwpoisoned

似乎是帧缓冲区代码中与内存相关的一些内容。

硬件详情:惠普 HP EliteBook 8460p 集成英特尔 i915 显卡 双显示器通过显示端口和 DVI 通过 HP 扩展坞连接。注意:我也遇到过这种情况,即使笔记本电脑没有对接。

lspci 片段:

p0:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09) (prog-if 00 [VGA controller])
    DeviceName: 32
    Subsystem: Hewlett-Packard Company 2nd Generation Core Processor Family Integrated Graphics Controller
    Flags: bus master, fast devsel, latency 0, IRQ 39
    Memory at d4000000 (64-bit, non-prefetchable) [size=4M]
    Memory at c0000000 (64-bit, prefetchable) [size=256M]
    I/O ports at 4000 [size=64]
    Expansion ROM at 000c0000 [virtual] [disabled] [size=128K]
    Capabilities: [90] MSI: Enable+ Count=1/1 Maskable- 64bit-
    Capabilities: [d0] Power Management version 2
    Capabilities: [a4] PCI Advanced Features
    Kernel driver in use: i915
    Kernel modules: i915

我只有 4G 的物理内存,但有一个 8G 的交换文件。我的内存使用率通常很高。这会是个问题吗?

$ free
              total        used        free      shared  buff/cache   available
Mem:        3937464     1628756      309464      434736     1999244     1592220
Swap:       8290300      216176     8074124

相关内容