[GH-ISSUE #1615] Enabling AppArmor support for Chrome disables hardware accelerated rendering #1081

Closed
opened 2026-05-05 07:25:52 -06:00 by gitea-mirror · 3 comments
Owner

Originally created by @jwittlincohen on GitHub (Oct 25, 2017).
Original GitHub issue: https://github.com/netblue30/firejail/issues/1615

I'm not sure if this is a bug or an inevitable consequence of enabling AppArmor support. However, I noticed that after enabling AppArmor support in google-chrome.local, I suffered terrible tearing, regardless of the "Smooth Scroll" setting in chrome:/flags. The issue appears to be that enabling AppArmor disables all hardware accelerated rendering. I made this bug report as I wasn't able to find any discussion of this issue on the Issue tracker or Google.

I did not change the google-chrome.profile at all. My only changes were made to google-chrome.local, and they are the following:

#Blacklist sensitive directories
blacklist /data/backups
blacklist /data/documents

#Allow access to snapshot directory
whitelist /home/jason/Pictures

#Required to allow Yubikey U2F access
ignore private-dev

#Disable AppArmor as it breaks hardware acceleration in Chrome, causing tearing
apparmor

System Information:
Debian Testing (Buster)
Kernel 4.13.0-1-amd64 #1 SMP Debian 4.13.4-2 (2017-10-15) x86_64 GNU/Linux
Firejail Version 0.9.50-3
Chrome Version 62.0.3202.62
Nvidia Driver 375.82-5 (GTX 1070)

#With AppArmor

Graphics Feature Status
• Canvas: Software only, hardware acceleration unavailable
• CheckerImaging: Disabled
• Flash: Software only, hardware acceleration unavailable
• Flash Stage3D: Software only, hardware acceleration unavailable
• Flash Stage3D Baseline profile: Software only, hardware acceleration unavailable
• Compositing: Software only, hardware acceleration unavailable
• Multiple Raster Threads: Enabled
• Native GpuMemoryBuffers: Software only. Hardware acceleration disabled
• Rasterization: Software only, hardware acceleration unavailable
• Video Decode: Software only, hardware acceleration unavailable
• Video Encode: Software only, hardware acceleration unavailable
• WebGL: Hardware accelerated but at reduced performance
• WebGL2: Unavailable

##Without AppArmor

Graphics Feature Status
• Canvas: Hardware accelerated
• CheckerImaging: Disabled
• Flash: Hardware accelerated
• Flash Stage3D: Hardware accelerated
• Flash Stage3D Baseline profile: Hardware accelerated
• Compositing: Hardware accelerated
• Multiple Raster Threads: Enabled
• Native GpuMemoryBuffers: Software only. Hardware acceleration disabled
• Rasterization: Software only. Hardware acceleration disabled
• Video Decode: Software only, hardware acceleration unavailable
• Video Encode: Software only, hardware acceleration unavailable
• WebGL: Hardware accelerated
• WebGL2: Hardware accelerated

Originally created by @jwittlincohen on GitHub (Oct 25, 2017). Original GitHub issue: https://github.com/netblue30/firejail/issues/1615 I'm not sure if this is a bug or an inevitable consequence of enabling AppArmor support. However, I noticed that after enabling AppArmor support in google-chrome.local, I suffered terrible tearing, regardless of the "Smooth Scroll" setting in chrome:/flags. The issue appears to be that enabling AppArmor disables all hardware accelerated rendering. I made this bug report as I wasn't able to find any discussion of this issue on the Issue tracker or Google. I did not change the google-chrome.profile at all. My only changes were made to google-chrome.local, and they are the following: ``` #Blacklist sensitive directories blacklist /data/backups blacklist /data/documents #Allow access to snapshot directory whitelist /home/jason/Pictures #Required to allow Yubikey U2F access ignore private-dev #Disable AppArmor as it breaks hardware acceleration in Chrome, causing tearing apparmor ``` System Information: Debian Testing (Buster) Kernel 4.13.0-1-amd64 #1 SMP Debian 4.13.4-2 (2017-10-15) x86_64 GNU/Linux Firejail Version 0.9.50-3 Chrome Version 62.0.3202.62 Nvidia Driver 375.82-5 (GTX 1070) #With AppArmor Graphics Feature Status • Canvas: Software only, hardware acceleration unavailable • CheckerImaging: Disabled • Flash: Software only, hardware acceleration unavailable • Flash Stage3D: Software only, hardware acceleration unavailable • Flash Stage3D Baseline profile: Software only, hardware acceleration unavailable • Compositing: Software only, hardware acceleration unavailable • Multiple Raster Threads: Enabled • Native GpuMemoryBuffers: Software only. Hardware acceleration disabled • Rasterization: Software only, hardware acceleration unavailable • Video Decode: Software only, hardware acceleration unavailable • Video Encode: Software only, hardware acceleration unavailable • WebGL: Hardware accelerated but at reduced performance • WebGL2: Unavailable ##Without AppArmor Graphics Feature Status • Canvas: Hardware accelerated • CheckerImaging: Disabled • Flash: Hardware accelerated • Flash Stage3D: Hardware accelerated • Flash Stage3D Baseline profile: Hardware accelerated • Compositing: Hardware accelerated • Multiple Raster Threads: Enabled • Native GpuMemoryBuffers: Software only. Hardware acceleration disabled • Rasterization: Software only. Hardware acceleration disabled • Video Decode: Software only, hardware acceleration unavailable • Video Encode: Software only, hardware acceleration unavailable • WebGL: Hardware accelerated • WebGL2: Hardware accelerated
Author
Owner

@jwittlincohen commented on GitHub (Oct 27, 2017):

Here are the apparmor logs when I enable apparmor integration in Chrome profile:

Oct 27 10:33:40 kernel: audit: type=1400 audit(1509114820.549:2963): apparmor="DENIED" operation="mknod" profile="firejail-default" name="/proc/4/fd/63" pid=25972 comm="google-chrome" requested_mask="c" denied_mask="c" fsuid=1000 ouid=1000
Oct 27 10:33:40 kernel: audit: type=1400 audit(1509114820.565:2964): apparmor="DENIED" operation="open" profile="firejail-default" name="/proc/4/oom_score_adj" pid=25972 comm="chrome" requested_mask="wc" denied_mask="wc" fsuid=1000 ouid=1000
Oct 27 10:33:40 kernel: audit: type=1400 audit(1509114820.581:2965): apparmor="DENIED" operation="open" profile="firejail-default" name="/proc/sys/kernel/yama/ptrace_scope" pid=25982 comm="chrome" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Oct 27 10:33:40 kernel: audit: type=1400 audit(1509114820.686:2966): apparmor="DENIED" operation="open" profile="firejail-default" name="/proc/vmstat" pid=25972 comm="chrome" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Oct 27 10:33:40 kernel: audit: type=1400 audit(1509114820.732:2967): apparmor="DENIED" operation="open" profile="firejail-default" name="/proc/sys/net/ipv4/tcp_fastopen" pid=25972 comm="TaskSchedulerFo" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Oct 27 10:33:40 kernel: audit: type=1400 audit(1509114820.751:2968): apparmor="DENIED" operation="open" profile="firejail-default" name="/proc/52/oom_score_adj" pid=26020 comm="chrome" requested_mask="wc" denied_mask="wc" fsuid=1000 ouid=1000
Oct 27 10:33:40 kernel: audit: type=1400 audit(1509114820.765:2969): apparmor="DENIED" operation="ptrace" profile="firejail-default" pid=25972 comm="chrome" requested_mask="trace" denied_mask="trace" peer="firejail-default"
Oct 27 10:33:40 kernel: audit: type=1400 audit(1509114820.765:2970): apparmor="DENIED" operation="ptrace" profile="firejail-default" pid=25972 comm="chrome" requested_mask="tracedby" denied_mask="tracedby" peer="firejail-default"
Oct 27 10:33:40 kernel: audit: type=1400 audit(1509114820.789:2971): apparmor="DENIED" operation="open" profile="firejail-default" name="/proc/modules" pid=26020 comm="chrome" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Oct 27 10:33:40 kernel: audit: type=1400 audit(1509114820.794:2972): apparmor="DENIED" operation="open" profile="firejail-default" name="/proc/modules" pid=26067 comm="nvidia-modprobe" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Oct 27 10:33:45 kernel: audit: type=1400 audit(1509114825.566:3043): apparmor="DENIED" operation="open" profile="firejail-default" name="/proc/456/oom_score_adj" pid=26513 comm="chrome-sandbox" requested_mask="w" denied_mask="w" fsuid=0 ouid=0
Oct 27 10:33:45 kernel: audit: type=1400 audit(1509114825.566:3044): apparmor="DENIED" operation="open" profile="firejail-default" name="/proc/456/oom_adj" pid=26513 comm="chrome-sandbox" requested_mask="w" denied_mask="w" fsuid=0 ouid=0
Oct 27 10:33:45 kernel: audit: type=1400 audit(1509114825.570:3045): apparmor="DENIED" operation="open" profile="firejail-default" name="/proc/456/task/456/status" pid=25972 comm="TaskSchedulerFo" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Oct 27 10:33:45 kernel: audit: type=1400 audit(1509114825.571:3046): apparmor="DENIED" operation="open" profile="firejail-default" name="/proc/456/task/456/status" pid=25972 comm="TaskSchedulerFo" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Oct 27 10:33:45 kernel: audit: type=1400 audit(1509114825.571:3047): apparmor="DENIED" operation="open" profile="firejail-default" name="/proc/456/task/456/status" pid=25972 comm="TaskSchedulerFo" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Oct 27 10:33:46 kernel: audit: type=1400 audit(1509114826.068:3048): apparmor="DENIED" operation="open" profile="firejail-default" name="/proc/473/oom_score_adj" pid=26529 comm="chrome" requested_mask="wc" denied_mask="wc" fsuid=1000 ouid=1000
Oct 27 10:33:46 kernel: audit: type=1400 audit(1509114826.189:3049): apparmor="DENIED" operation="open" profile="firejail-default" name="/proc/480/oom_score_adj" pid=26537 comm="chrome-sandbox" requested_mask="w" denied_mask="w" fsuid=0 ouid=0
Oct 27 10:33:46 kernel: audit: type=1400 audit(1509114826.189:3050): apparmor="DENIED" operation="open" profile="firejail-default" name="/proc/480/oom_adj" pid=26537 comm="chrome-sandbox" requested_mask="w" denied_mask="w" fsuid=0 ouid=0
Oct 27 10:33:46 kernel: audit: type=1400 audit(1509114826.197:3051): apparmor="DENIED" operation="open" profile="firejail-default" name="/proc/480/task/480/status" pid=25972 comm="TaskSchedulerFo" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Oct 27 10:33:46 kernel: audit: type=1400 audit(1509114826.207:3052): apparmor="DENIED" operation="open" profile="firejail-default" name="/proc/480/task/480/status" pid=25972 comm="TaskSchedulerFo" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Oct 27 10:34:04 kernel: audit: type=1400 audit(1509114844.048:3064): apparmor="DENIED" operation="open" profile="firejail-default" name="/proc/541/oom_score_adj" pid=26969 comm="chrome-sandbox" requested_mask="w" denied_mask="w" fsuid=0 ouid=0
Oct 27 10:34:04 kernel: audit: type=1400 audit(1509114844.048:3065): apparmor="DENIED" operation="open" profile="firejail-default" name="/proc/541/oom_adj" pid=26969 comm="chrome-sandbox" requested_mask="w" denied_mask="w" fsuid=0 ouid=0
Oct 27 10:34:04 kernel: audit: type=1400 audit(1509114844.050:3066): apparmor="DENIED" operation="open" profile="firejail-default" name="/proc/541/task/541/status" pid=25972 comm="TaskSchedulerFo" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Oct 27 10:34:04 kernel: audit: type=1400 audit(1509114844.050:3067): apparmor="DENIED" operation="open" profile="firejail-default" name="/proc/541/task/541/status" pid=25972 comm="TaskSchedulerFo" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Oct 27 10:34:04 kernel: audit: type=1400 audit(1509114844.050:3068): apparmor="DENIED" operation="open" profile="firejail-default" name="/proc/541/task/541/status" pid=25972 comm="TaskSchedulerFo" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0

In particular, this one looks particularly interesting:

Oct 27 10:33:40 kernel: audit: type=1400 audit(1509114820.794:2972): apparmor="DENIED" operation="open" profile="firejail-default" name="/proc/modules" pid=26067 comm="nvidia-modprobe" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0

I suffered an unrelated issue with apparmor in which running Totem with the respective apparmor profile enforced resulted in a segmentation fault. One of the Apparmor errors was this:

Oct 27 00:29:25 jason-desktop kernel: [ 96.533987] audit: type=1400
audit(1509078565.953:95): apparmor="DENIED" operation="exec"
profile="/usr/bin/totem" name="/usr/bin/nvidia-modprobe" pid=5475
comm="totem" requested_mask="x" denied_mask="x" fsuid=1000 ouid=0

One of the Debian AppArmor maintainers helped resolve the issue. I just had to add #include <abstractions/nvidia> to the usr.bin.totem profile. Perhaps his solution may help with this issue?

The full bug report is here: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=879900

<!-- gh-comment-id:339990806 --> @jwittlincohen commented on GitHub (Oct 27, 2017): Here are the apparmor logs when I enable apparmor integration in Chrome profile: ``` Oct 27 10:33:40 kernel: audit: type=1400 audit(1509114820.549:2963): apparmor="DENIED" operation="mknod" profile="firejail-default" name="/proc/4/fd/63" pid=25972 comm="google-chrome" requested_mask="c" denied_mask="c" fsuid=1000 ouid=1000 Oct 27 10:33:40 kernel: audit: type=1400 audit(1509114820.565:2964): apparmor="DENIED" operation="open" profile="firejail-default" name="/proc/4/oom_score_adj" pid=25972 comm="chrome" requested_mask="wc" denied_mask="wc" fsuid=1000 ouid=1000 Oct 27 10:33:40 kernel: audit: type=1400 audit(1509114820.581:2965): apparmor="DENIED" operation="open" profile="firejail-default" name="/proc/sys/kernel/yama/ptrace_scope" pid=25982 comm="chrome" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0 Oct 27 10:33:40 kernel: audit: type=1400 audit(1509114820.686:2966): apparmor="DENIED" operation="open" profile="firejail-default" name="/proc/vmstat" pid=25972 comm="chrome" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0 Oct 27 10:33:40 kernel: audit: type=1400 audit(1509114820.732:2967): apparmor="DENIED" operation="open" profile="firejail-default" name="/proc/sys/net/ipv4/tcp_fastopen" pid=25972 comm="TaskSchedulerFo" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0 Oct 27 10:33:40 kernel: audit: type=1400 audit(1509114820.751:2968): apparmor="DENIED" operation="open" profile="firejail-default" name="/proc/52/oom_score_adj" pid=26020 comm="chrome" requested_mask="wc" denied_mask="wc" fsuid=1000 ouid=1000 Oct 27 10:33:40 kernel: audit: type=1400 audit(1509114820.765:2969): apparmor="DENIED" operation="ptrace" profile="firejail-default" pid=25972 comm="chrome" requested_mask="trace" denied_mask="trace" peer="firejail-default" Oct 27 10:33:40 kernel: audit: type=1400 audit(1509114820.765:2970): apparmor="DENIED" operation="ptrace" profile="firejail-default" pid=25972 comm="chrome" requested_mask="tracedby" denied_mask="tracedby" peer="firejail-default" Oct 27 10:33:40 kernel: audit: type=1400 audit(1509114820.789:2971): apparmor="DENIED" operation="open" profile="firejail-default" name="/proc/modules" pid=26020 comm="chrome" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0 Oct 27 10:33:40 kernel: audit: type=1400 audit(1509114820.794:2972): apparmor="DENIED" operation="open" profile="firejail-default" name="/proc/modules" pid=26067 comm="nvidia-modprobe" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0 Oct 27 10:33:45 kernel: audit: type=1400 audit(1509114825.566:3043): apparmor="DENIED" operation="open" profile="firejail-default" name="/proc/456/oom_score_adj" pid=26513 comm="chrome-sandbox" requested_mask="w" denied_mask="w" fsuid=0 ouid=0 Oct 27 10:33:45 kernel: audit: type=1400 audit(1509114825.566:3044): apparmor="DENIED" operation="open" profile="firejail-default" name="/proc/456/oom_adj" pid=26513 comm="chrome-sandbox" requested_mask="w" denied_mask="w" fsuid=0 ouid=0 Oct 27 10:33:45 kernel: audit: type=1400 audit(1509114825.570:3045): apparmor="DENIED" operation="open" profile="firejail-default" name="/proc/456/task/456/status" pid=25972 comm="TaskSchedulerFo" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0 Oct 27 10:33:45 kernel: audit: type=1400 audit(1509114825.571:3046): apparmor="DENIED" operation="open" profile="firejail-default" name="/proc/456/task/456/status" pid=25972 comm="TaskSchedulerFo" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0 Oct 27 10:33:45 kernel: audit: type=1400 audit(1509114825.571:3047): apparmor="DENIED" operation="open" profile="firejail-default" name="/proc/456/task/456/status" pid=25972 comm="TaskSchedulerFo" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0 Oct 27 10:33:46 kernel: audit: type=1400 audit(1509114826.068:3048): apparmor="DENIED" operation="open" profile="firejail-default" name="/proc/473/oom_score_adj" pid=26529 comm="chrome" requested_mask="wc" denied_mask="wc" fsuid=1000 ouid=1000 Oct 27 10:33:46 kernel: audit: type=1400 audit(1509114826.189:3049): apparmor="DENIED" operation="open" profile="firejail-default" name="/proc/480/oom_score_adj" pid=26537 comm="chrome-sandbox" requested_mask="w" denied_mask="w" fsuid=0 ouid=0 Oct 27 10:33:46 kernel: audit: type=1400 audit(1509114826.189:3050): apparmor="DENIED" operation="open" profile="firejail-default" name="/proc/480/oom_adj" pid=26537 comm="chrome-sandbox" requested_mask="w" denied_mask="w" fsuid=0 ouid=0 Oct 27 10:33:46 kernel: audit: type=1400 audit(1509114826.197:3051): apparmor="DENIED" operation="open" profile="firejail-default" name="/proc/480/task/480/status" pid=25972 comm="TaskSchedulerFo" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0 Oct 27 10:33:46 kernel: audit: type=1400 audit(1509114826.207:3052): apparmor="DENIED" operation="open" profile="firejail-default" name="/proc/480/task/480/status" pid=25972 comm="TaskSchedulerFo" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0 Oct 27 10:34:04 kernel: audit: type=1400 audit(1509114844.048:3064): apparmor="DENIED" operation="open" profile="firejail-default" name="/proc/541/oom_score_adj" pid=26969 comm="chrome-sandbox" requested_mask="w" denied_mask="w" fsuid=0 ouid=0 Oct 27 10:34:04 kernel: audit: type=1400 audit(1509114844.048:3065): apparmor="DENIED" operation="open" profile="firejail-default" name="/proc/541/oom_adj" pid=26969 comm="chrome-sandbox" requested_mask="w" denied_mask="w" fsuid=0 ouid=0 Oct 27 10:34:04 kernel: audit: type=1400 audit(1509114844.050:3066): apparmor="DENIED" operation="open" profile="firejail-default" name="/proc/541/task/541/status" pid=25972 comm="TaskSchedulerFo" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0 Oct 27 10:34:04 kernel: audit: type=1400 audit(1509114844.050:3067): apparmor="DENIED" operation="open" profile="firejail-default" name="/proc/541/task/541/status" pid=25972 comm="TaskSchedulerFo" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0 Oct 27 10:34:04 kernel: audit: type=1400 audit(1509114844.050:3068): apparmor="DENIED" operation="open" profile="firejail-default" name="/proc/541/task/541/status" pid=25972 comm="TaskSchedulerFo" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0 ``` In particular, this one looks particularly interesting: `Oct 27 10:33:40 kernel: audit: type=1400 audit(1509114820.794:2972): apparmor="DENIED" operation="open" profile="firejail-default" name="/proc/modules" pid=26067 comm="nvidia-modprobe" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0` I suffered an unrelated issue with apparmor in which running Totem with the respective apparmor profile enforced resulted in a segmentation fault. One of the Apparmor errors was this: ``` Oct 27 00:29:25 jason-desktop kernel: [ 96.533987] audit: type=1400 audit(1509078565.953:95): apparmor="DENIED" operation="exec" profile="/usr/bin/totem" name="/usr/bin/nvidia-modprobe" pid=5475 comm="totem" requested_mask="x" denied_mask="x" fsuid=1000 ouid=0 ``` One of the Debian AppArmor maintainers helped resolve the issue. I just had to add `#include <abstractions/nvidia>` to the usr.bin.totem profile. Perhaps his solution may help with this issue? The full bug report is here: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=879900
Author
Owner

@rusty-snake commented on GitHub (Jun 26, 2019):

Should we do anything here or should we close.

<!-- gh-comment-id:505811919 --> @rusty-snake commented on GitHub (Jun 26, 2019): Should we do anything here or should we close.
Author
Owner

@Vincent43 commented on GitHub (Jun 27, 2019):

This report is quite dated. Firejail apparmor profile allows reading /proc now. I don't see anything from <abstractions/nvidia> not already covered.

<!-- gh-comment-id:506262343 --> @Vincent43 commented on GitHub (Jun 27, 2019): This report is quite dated. Firejail apparmor profile allows reading `/proc` now. I don't see anything from `<abstractions/nvidia>` not already covered.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#1081
No description provided.