[Bug]: Guest Additions 7.2.20 vboxvideo fails to build on Linux kernel 6.12.113 (drm_fb_helper_restore_fbdev_mode_unlocked: too few arguments)

未关闭 适合新手
#918 9 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 6 天内回复

@Berbe 已经在做这个了。

开始于 2026年11月3日。

  • #955 来自 @Berbe —— 未关闭

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
76/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
c, linux

调研方向

故障位于 src/vboxguest-7.2.20/vboxvideo/vbox_main.c 中的 vbox_driver_lastclose;先检查 issue #845 相关修复所使用的内核版本保护条件。使用 Debian 的 6.12.113 头文件重现模块构建,并确认版本保护条件能够处理新增参数,同时保持与较早内核的兼容性;当 vboxvideo 能针对两种内核 API 变体成功构建时,即表示完成。

由索引模型根据 Issue 内容生成。

描述

bug
Version

7.2.20

Host OS Type

Windows

Host OS name + version

Windows 11

Host Architecture

x86

Guest OS Type

Linux

Guest Architecture

x86

Guest OS name + version

Debian 13 - Linux kernel 6.12.113

Component

Guest Additions/Installer

What happened?

After upgrading a Debian 13 guest to kernel 6.12.113+deb13-amd64, the
Guest Additions 7.2.20 kernel modules no longer build. vboxguest and
vboxsf build without errors; vboxvideo fails:

/tmp/vbox.0/vbox_main.c: In function 'vbox_driver_lastclose':
/tmp/vbox.0/vbox_main.c:562:17: error: too few arguments to function 'drm_fb_helper_restore_fbdev_mode_unlocked'
562 | drm_fb_helper_restore_fbdev_mode_unlocked(&vbox->fbdev->helper);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/vbox.0/vbox_drv.h:166,
from /tmp/vbox.0/vbox_main.c:31:
/usr/src/linux-headers-6.12.113+deb13-common/include/drm/drm_fb_helper.h:247:5: note: declared here
247 | int drm_fb_helper_restore_fbdev_mode_unlocked(struct drm_fb_helper fb_helper,
make
** [.../scripts/Makefile.build:234: /tmp/vbox.0/vbox_main.o] Error 1
make: *** [/tmp/vbox.0/Makefile-footer.gmk:146: vboxvideo] Error 2

The DRM helper drm_fb_helper_restore_fbdev_mode_unlocked() gained a
second argument (bool force) in a 6.12.y stable update, now shipped by
Debian. The previous Debian kernel (<6.12.xx+deb13-amd64>) built the
module without errors.

This is the same class of problem as #845 (drm_fb_helper_alloc_info
change in 6.12.107, fixed in 7.2.20): a DRM API change backported into
the 6.12 stable series, so a check on the mainline version alone is not
enough.

Workaround / proposed fix (tested locally, module builds and loads):
in src/vboxguest-7.2.20/vboxvideo/vbox_main.c, pass the new argument:

  • drm_fb_helper_restore_fbdev_mode_unlocked(&vbox->fbdev->helper);
  • drm_fb_helper_restore_fbdev_mode_unlocked(&vbox->fbdev->helper, false);

This should be guarded by a kernel version check covering
6.12.113+ (and whichever mainline version introduced the change),
similar to the fix for #845.

vboxadd-setup.log

How can we reproduce this?
  1. Debian 13 amd64 guest with Guest Additions 7.2.20 installed from the
    Oracle ISO (VBoxLinuxAdditions.run).
  2. apt update && apt upgrade to linux-image-6.12.113+deb13-amd64 and
    linux-headers-6.12.113+deb13-amd64.
  3. Run /sbin/rcvboxadd setup (or reboot).
  4. Check /var/log/vboxadd-setup.log: the vboxvideo build fails as above.
Did you upload all of your necessary log files, screenshots, etc.?
  • Yes, I've uploaded all pertinent files to this issue.
主要语言
C
星标
1.4k
派生
219
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

VirtualBox/virtualbox 的其他 Issue

查看 VirtualBox/virtualbox 的全部 Issue

相似的 Issue

更多 C Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。