Screen-privacy couldn't work

Bug #1966178 reported by Bin Li
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OEM Priority Project
Fix Released
Undecided
Unassigned
gnome-control-center (Ubuntu)
Won't Fix
Low
Unassigned
mutter (Ubuntu)
Fix Released
Undecided
Marco Trevisan (Treviño)

Bug Description

On ThinkPad X13 it supports 'Privacy Guard', but on jammy the g-c-c couldn't control it.

From the GUI, I click 'Restrict Viewing Angle' on and off, there are no change at screen.

From Fn+D, it could let screen change, and the GUI could follow the changes.

Revision history for this message
Bin Li (binli) wrote (last edit ):

Cause the 5.15.0-23-generic couldn't support it, I used 5.17 mainline kernel.

$ cat /proc/acpi/ibm/lcdshadow
status: 0
commands: 0, 1

And after press the Fn + D, the screen display angle changed, and the content of /proc/acpi/ibm/lcdshadow is changed, and the GUI of 'Restrict Viewing Angle' is synced between on and off. But we could control from 'Restrict Viewing Angle' in g-c-c.

Here is the bug for kernel.
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1966061

tags: added: oem-priority originate-from-1956808 sutton
Revision history for this message
Sebastien Bacher (seb128) wrote :

The kernel support landed in 5.17 only yes.

Marco, do we have a way to hide the UI if the kernel support is missing?

Changed in gnome-control-center (Ubuntu):
importance: Undecided → Low
Revision history for this message
Bin Li (binli) wrote :

@seb,

 It's buggy even on 5.17 kernel, we could not control from g-c-c. Thanks!

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

So, I've checked with the latest kernel, but the KMS properties aren't either showing:

proptest | grep privacy -A3
 98 privacy-screen sw-state:
  flags: enum
  enums: Disabled=0 Enabled=1
  value: 0
 99 privacy-screen hw-state:
  flags: immutable enum
  enums: Disabled=0 Enabled=1 Disabled-locked=2 Enabled-locked=3
  value: 0

However, with properly compiled kernel I noticed there are also issues, I think that's due to some recent upstream changes to the initial patch, I'll check that again.

Changed in mutter (Ubuntu):
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

> Marco, do we have a way to hide the UI if the kernel support is missing?

Ah, I missed the question... Indeed if the feature is not supported, there's no UI visible.

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Ok, got it...

It was due to the triple-buffering patch that was ignoring the pending update, see
  https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1441#note_1428961

Changed in gnome-control-center (Ubuntu):
status: New → Won't Fix
Changed in mutter (Ubuntu):
status: New → In Progress
tags: added: jammy triple-buffering
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mutter - 42.0-3ubuntu1

---------------
mutter (42.0-3ubuntu1) jammy; urgency=medium

  [ Marco Trevisan (Treviño) ]
  * debian/patches: Cherry-pick various upstream commits for 42.1:
    + onscreen/native: Fall back if COPY_MODE_SECONDARY_GPU fails to init
      (LP: #1964037, #1959888)
  * debian/patches: Allow any drag timestamp as drag start serial (LP: #1964541)
  * debian/patches: Move x11-fractional scaling under ubuntu namespace
  * debian/patches: Account ClutterStage grabs on Wayland key focus sync
    (LP: #1964442)
  * debian/libmutter-10-0.symbols: Update including new internal symbols
  * debian/patches: Avoid memory errors when comparing gamma values
  * debian/patches: Fix privacy-screen and connectors updates with
    triple-buffering (LP: #1966178)
  * debian/patches: Ensure privacy screen settings are applied on startup
    (LP: #1966178)

  [ Jeremy Bicha ]
  * Merge from Debian unstable. Remaining changes:
    - debian/patches/x11-Add-support-for-fractional-scaling-using-Randr.patch:
      + X11: Add support for fractional scaling using Randr
    - Add triple-buffering patch
    - debian/libmutter-10-0.symbols: Add symbols for triple buffering patch
    - ubuntu/wayland-data-device-Allow-any-drag-timestamp-as-drag-star.patch:
      + handle DnD for old (snapped) gtk apps that used wrong wayland serials

mutter (42.0-3) unstable; urgency=medium

  [ Marco Trevisan (Treviño) ]
  * debian/patches: Cherry-pick upstream fixes targeting 42.1
  * debian/patches: Ensure repick happens on actors visibility changed
    (LP: #1964545)

  [ Jeremy Bicha ]
  * Release to unstable

 -- Marco Trevisan (Treviño) <email address hidden> Wed, 13 Apr 2022 03:30:39 +0200

Changed in mutter (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Daniel van Vugt (vanvugt) wrote (last edit ):

I proposed a fix upstream in:
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1441#note_1429238
but can't test it myself.

Comment #7 leads me to find it was instead declared fixed in:
monitor-manager-Ensure-monitors-settings-after-backend-ha.patch

Should I revert my experimental fix from !1441?

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Nope, I handled it as I mentioned in the previous upload as I needed something done by FF, but we can reiterate this easily with a fix on next mutter upload.

It shouldn't lead to any problem, isn't it?

Bin Li (binli)
Changed in oem-priority:
status: New → Fix Released
Revision history for this message
Bin Li (binli) wrote :

Tested on 5.17.0-1003-oem kernel, this privacy item could be showed.

But it couldn't sync with 'Fn + D', if it is disabled, click the 'Fn + D', it changed enabled, and changed back to disabled quickly. Looks like it's a kind of bug.

Tested my own build image based on 5.15.0-27-generic with upstream patches, it works perfectly. So the new issue might be related kernel side.

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1966061/comments/3

Tested kernel are here.
https://people.canonical.com/~binli/5.15.0-27.28binli1/

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.