Re: Keeping the Screen Turned off While Getting Inputs

2023-08-28 Thread Vladimir Dergachev
On Mon, 28 Aug 2023, Ahmad Nouralizadeh wrote: The laptop model is `Asus N501JW` running `Ubuntu 18.04`. The discrete GPU is `GeForce GTX 960M`. The link below says that by default the system uses `Intel HD graphics` (the iGPU) and using the discrete GPU requires a proprietary driver! Does

Re: Keeping the Screen Turned off While Getting Inputs

2023-08-28 Thread Ahmad Nouralizadeh
The laptop model is `Asus N501JW` running `Ubuntu 18.04`. The discrete GPU is `GeForce GTX 960M`. The link below says that by default the system uses `Intel HD graphics` (the iGPU) and using the discrete GPU requires a proprietary driver! Does this mean that having `nouveau` is not enough?

Re: Keeping the Screen Turned off While Getting Inputs

2023-08-28 Thread Vladimir Dergachev
On Mon, 28 Aug 2023, Ahmad Nouralizadeh wrote: Is it possible to prevent the Xserver from using the iGPU and only use the discrete GPU. I found no BIOS options for this. Why should the two GPUs work simultaneously? Urmm.. BIOS is the wrong place to look for this - if you are trying to

Re: Keeping the Screen Turned off While Getting Inputs

2023-08-28 Thread Ahmad Nouralizadeh
Is it possible to prevent the Xserver from using the iGPU and only use the discrete GPU. I found no BIOS options for this. Why should the two GPUs work simultaneously?

Re: Keeping the Screen Turned off While Getting Inputs

2023-08-27 Thread Vladimir Dergachev
On Sun, 27 Aug 2023, Ahmad Nouralizadeh wrote: Thanks Alan and Vladimir!These are very effective clues to help me understand the whole architecture, but I will need some experiments! :D I may continue with this thread later to ask questions about the main problem discussed here (i.e.,

Re: Keeping the Screen Turned off While Getting Inputs

2023-08-27 Thread Ahmad Nouralizadeh
Thanks Alan and Vladimir!These are very effective clues to help me understand the whole architecture, but I will need some experiments! :D I may continue with this thread later to ask questions about the main problem discussed here (i.e., turning off the screen), if I find my approach feasible!

Re: Keeping the Screen Turned off While Getting Inputs

2023-08-27 Thread Vladimir Dergachev
On Sun, 27 Aug 2023, Ahmad Nouralizadeh wrote: Perhaps I didn't express my question precisely. I understand that you are talking about the mmap function in the kernel which is usually a function pointer in vm_operations... My question is about the userspace structure of X11. IIUC, we have

Re: Keeping the Screen Turned off While Getting Inputs

2023-08-27 Thread Alan Coopersmith
On 8/27/23 09:53, Ahmad Nouralizadeh wrote: Perhaps I didn't express my question precisely. I understand that you are talking about the mmap function in the kernel which is usually a function pointer in vm_operations... My question is about the userspace structure of X11. IIUC, we have X11

Re: Keeping the Screen Turned off While Getting Inputs

2023-08-27 Thread Ahmad Nouralizadeh
Perhaps I didn't express my question precisely. I understand that you are talking about the mmap function in the kernel which is usually a function pointer in vm_operations... My question is about the userspace structure of X11. IIUC, we have X11 clients, which are GUI apps.They have a portion

Re: Keeping the Screen Turned off While Getting Inputs

2023-08-27 Thread Vladimir Dergachev
On Sun, 27 Aug 2023, Ahmad Nouralizadeh wrote: Thanks (also Dave and Carsten)! Full of useful information not easily found (if even found) on the Internet! You are welcome :) So, in summary, the communication is done through a series of memory mapped regions in the address space of the

Re: Keeping the Screen Turned off While Getting Inputs

2023-08-27 Thread Ahmad Nouralizadeh
Thanks (also Dave and Carsten)! Full of useful information not easily found (if even found) on the Internet! So, in summary, the communication is done through a series of memory mapped regions in the address space of the graphics library (e.g., OpenGL).The image data is transferred 1) from the

Re: Keeping the Screen Turned off While Getting Inputs

2023-08-27 Thread Vladimir Dergachev
On Sun, 27 Aug 2023, Ahmad Nouralizadeh wrote: > The framebuffer that is displayed on the monitor is always in video card > memory. There is a piece of hardware (CRTC) that continuously pulls data > from the framebuffer and transmits it to the monitor. So the framebuffer memory should

Re: Keeping the Screen Turned off While Getting Inputs

2023-08-27 Thread Carsten Haitzler
On Sat, 26 Aug 2023 15:28:52 + (UTC) Ahmad Nouralizadeh said: > Hi, > I need to run a set of (graphical) benchmarks with the screen disabled. The > following command did not work: xset dpms force off > > Because any keyboard/mouse input would re-enable the screen. The other option > was the

Re: Keeping the Screen Turned off While Getting Inputs

2023-08-26 Thread Ahmad Nouralizadeh
> The framebuffer that is displayed on the monitor is always in video card > memory. There is a piece of hardware (CRTC) that continuously pulls data > from the framebuffer and transmits it to the monitor. So the framebuffer memory should normally be in the kernel (Perhaps in special cases

Re: Keeping the Screen Turned off While Getting Inputs

2023-08-26 Thread Vladimir Dergachev
On Sun, 27 Aug 2023, Ahmad Nouralizadeh wrote: > In order to display anything on the screen the video card needs an array >of data given color of each pixel. This is usually called "framebuffer" >because it buffers data for one frame of video. Thank you for the enlightening explanation! An

Re: Keeping the Screen Turned off While Getting Inputs

2023-08-26 Thread Ahmad Nouralizadeh
> In order to display anything on the screen the video card needs an array >of data given color of each pixel. This is usually called "framebuffer" >because it buffers data for one frame of video. Thank you for the enlightening explanation! An unrelated question: IIUC the framebuffer is a

Re: Keeping the Screen Turned off While Getting Inputs

2023-08-26 Thread Vladimir Dergachev
On Sat, 26 Aug 2023, Ahmad Nouralizadeh wrote: > > However, I would have expected that VLC would produce a lot > > GPU/iGPU accesses even without drawing anything, because it would > > try to use GPU decoder. For the discrete GPU, the turned off screen requires much smaller bandwidth in any

Re: Keeping the Screen Turned off While Getting Inputs

2023-08-26 Thread Ahmad Nouralizadeh
> > However, I would have expected that VLC would produce a lot > > GPU/iGPU accesses even without drawing anything, because it would > > try to use GPU decoder. For the discrete GPU, the turned off screen requires much smaller bandwidth in any benchmark (reduces from 2GB/s to several KB/s). The

Re: Keeping the Screen Turned off While Getting Inputs

2023-08-26 Thread Dave Howorth
On Sat, 26 Aug 2023 20:46:35 +0100, Dave Howorth wrote: > On Sat, 26 Aug 2023 13:43:21 -0400 (EDT), Vladimir Dergachev wrote: > > > On Sat, 26 Aug 2023, Ahmad Nouralizadeh wrote: > > > > > >> Those accesses might not stop with just the display off - some > > > >> applications may keep

Re: Keeping the Screen Turned off While Getting Inputs

2023-08-26 Thread Dave Howorth
On Sat, 26 Aug 2023 13:43:21 -0400 (EDT), Vladimir Dergachev wrote: > On Sat, 26 Aug 2023, Ahmad Nouralizadeh wrote: > > > >> Those accesses might not stop with just the display off - some > > >> applications may keep redrawing. > > Will these accesses cause iGPU or dedicated GPU accesses to

Re: Keeping the Screen Turned off While Getting Inputs

2023-08-26 Thread Vladimir Dergachev
On Sat, 26 Aug 2023, Ahmad Nouralizadeh wrote: >> Those accesses might not stop with just the display off - some >> applications may keep redrawing. Will these accesses cause iGPU or dedicated GPU accesses to the DRAM? I think that those redrawings originate from the processor. >I'm not

Re: Keeping the Screen Turned off While Getting Inputs

2023-08-26 Thread Ahmad Nouralizadeh
>> Those accesses might not stop with just the display off - some >> applications may keep redrawing. Will these accesses cause iGPU or dedicated GPU accesses to the DRAM? I think that those redrawings originate from the processor. >I'm not sure a graphical benchmark will run without a

Re: Keeping the Screen Turned off While Getting Inputs

2023-08-26 Thread Dave Howorth
On Sat, 26 Aug 2023 12:11:03 -0400 (EDT) Vladimir Dergachev wrote: > On Sat, 26 Aug 2023, Ahmad Nouralizadeh wrote: > > > I want to count the processor-initiated memory accesses. On my 4K > > display, a huge number of accesses originate from the iGPU and > > dedicated GPU. I want to exclude

Re: Keeping the Screen Turned off While Getting Inputs

2023-08-26 Thread Vladimir Dergachev
On Sat, 26 Aug 2023, Ahmad Nouralizadeh wrote: I want to count the processor-initiated memory accesses. On my 4K display, a huge number of accesses originate from the iGPU and dedicated GPU. I want to exclude these accesses. The IMC counter can only track the dedicated GPU accesses.

Re: Keeping the Screen Turned off While Getting Inputs

2023-08-26 Thread Ahmad Nouralizadeh
I want to count the processor-initiated memory accesses. On my 4K display, a huge number of accesses originate from the iGPU and dedicated GPU. I want to exclude these accesses. The IMC counter can only track the dedicated GPU accesses. Therefore, I have to turn the screen off to exclude those

Re: Keeping the Screen Turned off While Getting Inputs

2023-08-26 Thread Dave Howorth
On Sat, 26 Aug 2023 15:28:52 + (UTC) Ahmad Nouralizadeh wrote: > I need to run a set of (graphical) benchmarks with the screen > disabled. Can I ask why? What is you're trying to accomplish? Somehow affect the benchmarks? Stop people seeing the benchmarks being performed? And what is the

Keeping the Screen Turned off While Getting Inputs

2023-08-26 Thread Ahmad Nouralizadeh
Hi, I need to run a set of (graphical) benchmarks with the screen disabled. The following command did not work: xset dpms force off Because any keyboard/mouse input would re-enable the screen. The other option was the following: xrandr --output eDP-1 --off This turns off the screen for a